diff options
| author | Damien George <damien@micropython.org> | 2021-03-17 12:35:59 +1100 |
|---|---|---|
| committer | Damien George <damien@micropython.org> | 2022-07-22 17:41:21 +1000 |
| commit | 5dbb822ca4a809ac5cb4513afb0411b4eb8dc3cf (patch) | |
| tree | c969809dbd42e9ca90903f8470e4171d213ee413 | |
| parent | e05d0a6335be6a45f29f5d987091b858ad378cfa (diff) | |
esp32/mpconfigport: Enable BLE synchronous events and pairing/bonding.
Signed-off-by: Damien George <damien@micropython.org>
| -rw-r--r-- | ports/esp32/main/CMakeLists.txt | 6 | ||||
| -rw-r--r-- | ports/esp32/mpconfigport.h | 4 |
2 files changed, 9 insertions, 1 deletions
diff --git a/ports/esp32/main/CMakeLists.txt b/ports/esp32/main/CMakeLists.txt index 9ac6537f8..fccfd6b7c 100644 --- a/ports/esp32/main/CMakeLists.txt +++ b/ports/esp32/main/CMakeLists.txt @@ -198,11 +198,15 @@ target_compile_options(${MICROPY_TARGET} PUBLIC -Wno-missing-field-initializers ) +# Additional include directories needed for private NimBLE headers. +target_include_directories(${MICROPY_TARGET} PUBLIC + ${IDF_PATH}/components/bt/host/nimble/nimble +) + # Add additional extmod and usermod components. target_link_libraries(${MICROPY_TARGET} micropy_extmod_btree) target_link_libraries(${MICROPY_TARGET} usermod) - # Collect all of the include directories and compile definitions for the IDF components. foreach(comp ${IDF_COMPONENTS}) micropy_gather_target_properties(__idf_${comp}) diff --git a/ports/esp32/mpconfigport.h b/ports/esp32/mpconfigport.h index 8dc3537e5..dfa577d2b 100644 --- a/ports/esp32/mpconfigport.h +++ b/ports/esp32/mpconfigport.h @@ -70,7 +70,11 @@ // extended modules #ifndef MICROPY_PY_BLUETOOTH #define MICROPY_PY_BLUETOOTH (1) +#define MICROPY_PY_BLUETOOTH_USE_SYNC_EVENTS (1) +#define MICROPY_PY_BLUETOOTH_USE_SYNC_EVENTS_WITH_INTERLOCK (1) +#define MICROPY_PY_BLUETOOTH_SYNC_EVENT_STACK_SIZE (CONFIG_BT_NIMBLE_TASK_STACK_SIZE) #define MICROPY_PY_BLUETOOTH_ENABLE_CENTRAL_MODE (1) +#define MICROPY_PY_BLUETOOTH_ENABLE_PAIRING_BONDING (1) #define MICROPY_BLUETOOTH_NIMBLE (1) #define MICROPY_BLUETOOTH_NIMBLE_BINDINGS_ONLY (1) #endif |
