extmod/modbluetooth: Add compile-config flag to enable pairing/bonding.

Enable it on STM32/Unix NimBLE only (pairing/bonding requires synchronous
events and full bindings).

Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
This commit is contained in:
Jim Mussared
2020-11-25 19:26:56 +11:00
committed by Damien George
parent 5e20f689ad
commit ac89267fef
3 changed files with 15 additions and 0 deletions

View File

@@ -47,6 +47,10 @@
#error l2cap channels require synchronous modbluetooth events
#endif
#if MICROPY_PY_BLUETOOTH_ENABLE_PAIRING_BONDING && !MICROPY_PY_BLUETOOTH_USE_SYNC_EVENTS
#error pairing and bonding require synchronous modbluetooth events
#endif
#define MP_BLUETOOTH_CONNECT_DEFAULT_SCAN_DURATION_MS 2000
#define MICROPY_PY_BLUETOOTH_MAX_EVENT_DATA_TUPLE_LEN 5