extmod/modnetwork: Use MP_REGISTER_ROOT_POINTER().

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

Signed-off-by: David Lechner <david@pybricks.com>
This commit is contained in:
David Lechner
2022-07-01 15:01:38 -05:00
committed by Damien George
parent e531b72b56
commit a3703584fe
5 changed files with 2 additions and 15 deletions

View File

@@ -135,12 +135,6 @@
#define MICROPY_BOARD_ENTER_BOOTLOADER(nargs, args)
#endif
#if MICROPY_PY_NETWORK
#define NETWORK_ROOT_POINTERS mp_obj_list_t mod_network_nic_list;
#else
#define NETWORK_ROOT_POINTERS
#endif
#if MICROPY_PY_BLUETOOTH
#define MICROPY_PORT_ROOT_POINTER_BLUETOOTH struct _machine_uart_obj_t *mp_bthci_uart;
#else
@@ -227,7 +221,6 @@ extern const struct _mod_network_nic_type_t mod_network_nic_type_wiznet5k;
void *rp2_uart_rx_buffer[2]; \
void *rp2_uart_tx_buffer[2]; \
void *machine_i2s_obj[2]; \
NETWORK_ROOT_POINTERS \
MICROPY_BOARD_ROOT_POINTERS \
MICROPY_PORT_ROOT_POINTER_BLUETOOTH \