aboutsummaryrefslogtreecommitdiff
path: root/ports/unix/mpconfigport.h
diff options
context:
space:
mode:
authorJim Mussared2020-04-07 15:02:52 +1000
committerDamien George2020-04-29 16:45:46 +1000
commit7563d582100d7947eb61960c9116c8fc10f1e996 (patch)
treef7f3884fa8f98b012c8ffa8814d8ea5c46ae9511 /ports/unix/mpconfigport.h
parentc987adb9e938dbcb1a50e7b0947913c4e37e0943 (diff)
unix: Add support for modbluetooth and BLE using btstack.
This commit adds full support to the unix port for Bluetooth using the common extmod/modbluetooth Python bindings. This uses the libusb HCI transport, which supports many common USB BT adaptors.
Diffstat (limited to 'ports/unix/mpconfigport.h')
-rw-r--r--ports/unix/mpconfigport.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/ports/unix/mpconfigport.h b/ports/unix/mpconfigport.h
index b23b6ce47..5708ceab6 100644
--- a/ports/unix/mpconfigport.h
+++ b/ports/unix/mpconfigport.h
@@ -311,9 +311,17 @@ void mp_unix_mark_exec(void);
#define MP_STATE_PORT MP_STATE_VM
+#if MICROPY_PY_BLUETOOTH && MICROPY_BLUETOOTH_BTSTACK
+struct _mp_bluetooth_btstack_root_pointers_t;
+#define MICROPY_BLUETOOTH_ROOT_POINTERS struct _mp_bluetooth_btstack_root_pointers_t *bluetooth_btstack_root_pointers;
+#else
+#define MICROPY_BLUETOOTH_ROOT_POINTERS
+#endif
+
#define MICROPY_PORT_ROOT_POINTERS \
const char *readline_hist[50]; \
void *mmap_region_head; \
+ MICROPY_BLUETOOTH_ROOT_POINTERS \
// We need to provide a declaration/definition of alloca()
// unless support for it is disabled.