summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ports/rp2/machine_i2s.c2
-rw-r--r--ports/rp2/machine_pin.c2
-rw-r--r--ports/rp2/machine_uart.c3
-rw-r--r--ports/rp2/mpbthciport.c2
-rw-r--r--ports/rp2/mpconfigport.h13
-rw-r--r--ports/rp2/rp2_pio.c3
6 files changed, 12 insertions, 13 deletions
diff --git a/ports/rp2/machine_i2s.c b/ports/rp2/machine_i2s.c
index 988e88d36..1015ba101 100644
--- a/ports/rp2/machine_i2s.c
+++ b/ports/rp2/machine_i2s.c
@@ -1147,3 +1147,5 @@ const mp_obj_type_t machine_i2s_type = {
.make_new = machine_i2s_make_new,
.locals_dict = (mp_obj_dict_t *)&machine_i2s_locals_dict,
};
+
+MP_REGISTER_ROOT_POINTER(void *machine_i2s_obj[2]);
diff --git a/ports/rp2/machine_pin.c b/ports/rp2/machine_pin.c
index a0c5dead9..705f61242 100644
--- a/ports/rp2/machine_pin.c
+++ b/ports/rp2/machine_pin.c
@@ -687,3 +687,5 @@ mp_hal_pin_obj_t mp_hal_get_pin_obj(mp_obj_t obj) {
}
return pin->id;
}
+
+MP_REGISTER_ROOT_POINTER(void *machine_pin_irq_obj[30]);
diff --git a/ports/rp2/machine_uart.c b/ports/rp2/machine_uart.c
index fafa3c1b5..77ccdb5f5 100644
--- a/ports/rp2/machine_uart.c
+++ b/ports/rp2/machine_uart.c
@@ -562,3 +562,6 @@ const mp_obj_type_t machine_uart_type = {
.protocol = &uart_stream_p,
.locals_dict = (mp_obj_dict_t *)&machine_uart_locals_dict,
};
+
+MP_REGISTER_ROOT_POINTER(void *rp2_uart_rx_buffer[2]);
+MP_REGISTER_ROOT_POINTER(void *rp2_uart_tx_buffer[2]);
diff --git a/ports/rp2/mpbthciport.c b/ports/rp2/mpbthciport.c
index 58639fd5b..cd41da017 100644
--- a/ports/rp2/mpbthciport.c
+++ b/ports/rp2/mpbthciport.c
@@ -197,4 +197,6 @@ 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
diff --git a/ports/rp2/mpconfigport.h b/ports/rp2/mpconfigport.h
index 182a3db02..82e8de14d 100644
--- a/ports/rp2/mpconfigport.h
+++ b/ports/rp2/mpconfigport.h
@@ -135,12 +135,6 @@
#define MICROPY_BOARD_ENTER_BOOTLOADER(nargs, args)
#endif
-#if MICROPY_PY_BLUETOOTH
-#define MICROPY_PORT_ROOT_POINTER_BLUETOOTH struct _machine_uart_obj_t *mp_bthci_uart;
-#else
-#define MICROPY_PORT_ROOT_POINTER_BLUETOOTH
-#endif
-
// By default networking should include sockets, ssl, websockets, webrepl, dupterm.
#if MICROPY_PY_NETWORK
#ifndef MICROPY_PY_USOCKET
@@ -215,14 +209,7 @@ extern const struct _mod_network_nic_type_t mod_network_nic_type_wiznet5k;
#endif
#define MICROPY_PORT_ROOT_POINTERS \
- void *machine_pin_irq_obj[30]; \
- void *rp2_pio_irq_obj[2]; \
- void *rp2_state_machine_irq_obj[8]; \
- void *rp2_uart_rx_buffer[2]; \
- void *rp2_uart_tx_buffer[2]; \
- void *machine_i2s_obj[2]; \
MICROPY_BOARD_ROOT_POINTERS \
- MICROPY_PORT_ROOT_POINTER_BLUETOOTH \
#define MP_STATE_PORT MP_STATE_VM
diff --git a/ports/rp2/rp2_pio.c b/ports/rp2/rp2_pio.c
index 990061696..072644eba 100644
--- a/ports/rp2/rp2_pio.c
+++ b/ports/rp2/rp2_pio.c
@@ -839,3 +839,6 @@ STATIC const mp_irq_methods_t rp2_state_machine_irq_methods = {
.trigger = rp2_state_machine_irq_trigger,
.info = rp2_state_machine_irq_info,
};
+
+MP_REGISTER_ROOT_POINTER(void *rp2_pio_irq_obj[2]);
+MP_REGISTER_ROOT_POINTER(void *rp2_state_machine_irq_obj[8]);