mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-12-19 19:43:52 +01:00
BLE library for ESP32x implements its own version of `os_msys_init`, which is used by the BLE controller implementation for ESP32x and is implicitly called when the BLE controller is enabled.
43 lines
1.3 KiB
Diff
43 lines
1.3 KiB
Diff
From 50faaa367abe07c63f2071fade997c8a2f2bbde2 Mon Sep 17 00:00:00 2001
|
|
From: Gunar Schorcht <gunar@schorcht.net>
|
|
Date: Mon, 7 Apr 2025 18:35:59 +0200
|
|
Subject: [PATCH 2/4] porting/nimble/os_mbuf: conditional definition of
|
|
g_msys_pool_list
|
|
|
|
BLE library for ESP32x defines its own g_msys_pool_list in binary libraries. To avoid multiple definitions, the definition of g_msys_pool_list is conditional here.
|
|
---
|
|
porting/nimble/src/os_mbuf.c | 10 ++++++++--
|
|
1 file changed, 8 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/porting/nimble/src/os_mbuf.c b/porting/nimble/src/os_mbuf.c
|
|
index cebdb29f..0b09e978 100644
|
|
--- a/porting/nimble/src/os_mbuf.c
|
|
+++ b/porting/nimble/src/os_mbuf.c
|
|
@@ -48,9 +48,15 @@
|
|
* @{
|
|
*/
|
|
|
|
+/* If `g_msys_pool_list` is defined in the low-level BLE Controller driver,
|
|
+ * which is the case for the ESP32-H2, for example, `g_msys_pool_list` must
|
|
+ * be declared extern here instead of defining it. */
|
|
+#if NIMBLE_G_MSYS_POOL_LIST_IN_CONTROLLER
|
|
+extern STAILQ_HEAD(, os_mbuf_pool) g_msys_pool_list;
|
|
+#else
|
|
STAILQ_HEAD(, os_mbuf_pool) g_msys_pool_list =
|
|
STAILQ_HEAD_INITIALIZER(g_msys_pool_list);
|
|
-
|
|
+#endif
|
|
|
|
int
|
|
os_mqueue_init(struct os_mqueue *mq, ble_npl_event_fn *ev_cb, void *arg)
|
|
@@ -1242,4 +1248,4 @@ os_mbuf_pack_chains(struct os_mbuf *m1, struct os_mbuf *m2)
|
|
}
|
|
|
|
return m1;
|
|
-}
|
|
\ No newline at end of file
|
|
+}
|
|
--
|
|
2.34.1
|
|
|