Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pkg/nimble: Fix compilation with USEMODULE += nimble_svc_bas #21200

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions pkg/nimble/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ nimble_host_store_ram:
$(QQ)"$(MAKE)" -C $(PDIR)/nimble/host/store/ram/src/ -f $(RIOTBASE)/Makefile.base MODULE=$@

# service implementations
nimble_svc_bas:
$(QQ)"$(MAKE)" -C $(PDIR)/nimble/host/services/bas/src/ -f $(RIOTBASE)/Makefile.base MODULE=$@

nimble_svc_gap:
$(QQ)"$(MAKE)" -C $(PDIR)/nimble/host/services/gap/src/ -f $(RIOTBASE)/Makefile.base MODULE=$@

Expand Down
35 changes: 35 additions & 0 deletions pkg/nimble/patches/0001-port-npl-riot-add-svc_bas-config.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
From 3cd2f7dc9f2c17ffb83499ab569a291988cbbc08 Mon Sep 17 00:00:00 2001
From: Marian Buschsieweke <[email protected]>
Date: Sat, 8 Feb 2025 13:54:20 +0100
Subject: [PATCH] port/npl/riot: add svc_bas config

---
porting/npl/riot/include/syscfg/syscfg.h | 13 +++++++++++++
1 file changed, 13 insertions(+)

diff --git a/porting/npl/riot/include/syscfg/syscfg.h b/porting/npl/riot/include/syscfg/syscfg.h
index 84bdea5..a0b49c8 100644
--- a/porting/npl/riot/include/syscfg/syscfg.h
+++ b/porting/npl/riot/include/syscfg/syscfg.h
@@ -670,6 +670,19 @@
#define MYNEWT_VAL_BASELIBC_PRESENT (1)
#endif

+/*** @apache-mynewt-nimble/nimble/host/services/bas */
+#ifndef MYNEWT_VAL_BLE_SVC_BAS_BATTERY_LEVEL_NOTIFY_ENABLE
+#define MYNEWT_VAL_BLE_SVC_BAS_BATTERY_LEVEL_NOTIFY_ENABLE (1)
+#endif
+
+#ifndef MYNEWT_VAL_BLE_SVC_BAS_BATTERY_LEVEL_READ_PERM
+#define MYNEWT_VAL_BLE_SVC_BAS_BATTERY_LEVEL_READ_PERM (0)
+#endif
+
+#ifndef MYNEWT_VAL_BLE_SVC_BAS_SYSINIT_STAGE
+#define MYNEWT_VAL_BLE_SVC_BAS_SYSINIT_STAGE (303)
+#endif
+
/*** @apache-mynewt-core/sys/console/stub */
#ifndef MYNEWT_VAL_CONSOLE_UART_BAUD
#define MYNEWT_VAL_CONSOLE_UART_BAUD (115200)
--
2.43.0