Skip to content

Commit 5dbb822

Browse files
committed
esp32/mpconfigport: Enable BLE synchronous events and pairing/bonding.
Signed-off-by: Damien George <damien@micropython.org>
1 parent e05d0a6 commit 5dbb822

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

ports/esp32/main/CMakeLists.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,11 +198,15 @@ target_compile_options(${MICROPY_TARGET} PUBLIC
198198
-Wno-missing-field-initializers
199199
)
200200

201+
# Additional include directories needed for private NimBLE headers.
202+
target_include_directories(${MICROPY_TARGET} PUBLIC
203+
${IDF_PATH}/components/bt/host/nimble/nimble
204+
)
205+
201206
# Add additional extmod and usermod components.
202207
target_link_libraries(${MICROPY_TARGET} micropy_extmod_btree)
203208
target_link_libraries(${MICROPY_TARGET} usermod)
204209

205-
206210
# Collect all of the include directories and compile definitions for the IDF components.
207211
foreach(comp ${IDF_COMPONENTS})
208212
micropy_gather_target_properties(__idf_${comp})

ports/esp32/mpconfigport.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,11 @@
7070
// extended modules
7171
#ifndef MICROPY_PY_BLUETOOTH
7272
#define MICROPY_PY_BLUETOOTH (1)
73+
#define MICROPY_PY_BLUETOOTH_USE_SYNC_EVENTS (1)
74+
#define MICROPY_PY_BLUETOOTH_USE_SYNC_EVENTS_WITH_INTERLOCK (1)
75+
#define MICROPY_PY_BLUETOOTH_SYNC_EVENT_STACK_SIZE (CONFIG_BT_NIMBLE_TASK_STACK_SIZE)
7376
#define MICROPY_PY_BLUETOOTH_ENABLE_CENTRAL_MODE (1)
77+
#define MICROPY_PY_BLUETOOTH_ENABLE_PAIRING_BONDING (1)
7478
#define MICROPY_BLUETOOTH_NIMBLE (1)
7579
#define MICROPY_BLUETOOTH_NIMBLE_BINDINGS_ONLY (1)
7680
#endif

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy