Browse Source

extmod/btstack: Use MP_REGISTER_ROOT_POINTER().

This uses MP_REGISTER_ROOT_POINTER() to register
bluetooth_btstack_root_pointers and removes the same from all
mpconfigport.h.

Signed-off-by: David Lechner <david@pybricks.com>
pull/8922/head
David Lechner 2 years ago
committed by Damien George
parent
commit
8fa6191f95
  1. 2
      extmod/btstack/modbluetooth_btstack.c
  2. 8
      ports/stm32/mpconfigport.h
  3. 4
      ports/unix/mpconfigport.h

2
extmod/btstack/modbluetooth_btstack.c

@ -1460,4 +1460,6 @@ int mp_bluetooth_l2cap_recvinto(uint16_t conn_handle, uint16_t cid, uint8_t *buf
#endif // MICROPY_PY_BLUETOOTH_ENABLE_L2CAP_CHANNELS
MP_REGISTER_ROOT_POINTER(struct _mp_bluetooth_btstack_root_pointers_t *bluetooth_btstack_root_pointers);
#endif // MICROPY_PY_BLUETOOTH && MICROPY_BLUETOOTH_BTSTACK

8
ports/stm32/mpconfigport.h

@ -246,13 +246,6 @@ struct _mp_bluetooth_nimble_malloc_t;
#define MICROPY_PORT_ROOT_POINTER_BLUETOOTH_NIMBLE
#endif
#if MICROPY_BLUETOOTH_BTSTACK
struct _mp_bluetooth_btstack_root_pointers_t;
#define MICROPY_PORT_ROOT_POINTER_BLUETOOTH_BTSTACK struct _mp_bluetooth_btstack_root_pointers_t *bluetooth_btstack_root_pointers;
#else
#define MICROPY_PORT_ROOT_POINTER_BLUETOOTH_BTSTACK
#endif
#ifndef MICROPY_BOARD_ROOT_POINTERS
#define MICROPY_BOARD_ROOT_POINTERS
#endif
@ -292,7 +285,6 @@ struct _mp_bluetooth_btstack_root_pointers_t;
\
/* root pointers for sub-systems */ \
MICROPY_PORT_ROOT_POINTER_BLUETOOTH_NIMBLE \
MICROPY_PORT_ROOT_POINTER_BLUETOOTH_BTSTACK \
\
/* root pointers defined by a board */ \
MICROPY_BOARD_ROOT_POINTERS \

4
ports/unix/mpconfigport.h

@ -291,10 +291,6 @@ static inline unsigned long mp_urandom_seed_init(void) {
#define MP_STATE_PORT MP_STATE_VM
#if MICROPY_PY_BLUETOOTH
#if 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;
#endif
#if MICROPY_BLUETOOTH_NIMBLE
struct _mp_bluetooth_nimble_root_pointers_t;
struct _mp_bluetooth_nimble_malloc_t;

Loading…
Cancel
Save