rp2/mpbthciport: Remove mp_bthci_uart from set of root pointers.

This is a statically-allocated UART (see machine_uart.c), and doesn't
contain any heap pointers other than the ringbufs (which are already root
pointers), so no need to track it additionally.

Saves needing to add mpbthciport.c to the QSTR sources.

Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
This commit is contained in:
Jim Mussared 2022-07-20 17:16:36 +10:00 committed by Damien George
parent 2e2fc8f60f
commit 8b4298a4bf
1 changed files with 3 additions and 3 deletions

View File

@ -100,8 +100,10 @@ int mp_bluetooth_hci_uart_init(uint32_t port, uint32_t baudrate) {
MP_OBJ_NEW_QSTR(MP_QSTR_timeout), MP_OBJ_NEW_SMALL_INT(1000),
};
// This is a statically-allocated UART (see machine_uart.c), and doesn't
// contain any heap pointers other than the ringbufs (which are already
// root pointers), so no need to track this as a root pointer.
mp_bthci_uart = machine_uart_type.make_new((mp_obj_t)&machine_uart_type, 2, 2, args);
MP_STATE_PORT(mp_bthci_uart) = mp_bthci_uart;
// Start the HCI polling to process any initial events/packets.
mp_bluetooth_hci_start_polling();
@ -197,6 +199,4 @@ MP_WEAK int mp_bluetooth_hci_controller_wakeup(void) {
return 0;
}
MP_REGISTER_ROOT_POINTER(struct _machine_uart_obj_t *mp_bthci_uart);
#endif // MICROPY_PY_BLUETOOTH