summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ports/mimxrt/boards/MIMXRT1010_EVK/mpconfigboard.h3
-rw-r--r--ports/mimxrt/boards/MIMXRT1015_EVK/mpconfigboard.h3
-rw-r--r--ports/mimxrt/boards/MIMXRT1020_EVK/mpconfigboard.h3
-rw-r--r--ports/mimxrt/boards/MIMXRT1050_EVK/mpconfigboard.h3
-rw-r--r--ports/mimxrt/boards/MIMXRT1060_EVK/mpconfigboard.h3
-rw-r--r--ports/mimxrt/boards/MIMXRT1064_EVK/mpconfigboard.h3
-rw-r--r--ports/mimxrt/boards/OLIMEX_RT1010/mpconfigboard.h4
-rw-r--r--ports/mimxrt/boards/SEEED_ARCH_MIX/mpconfigboard.h3
-rw-r--r--ports/mimxrt/boards/TEENSY40/mpconfigboard.h3
-rw-r--r--ports/mimxrt/boards/TEENSY41/mpconfigboard.h3
-rw-r--r--ports/mimxrt/machine_i2s.c2
-rw-r--r--ports/mimxrt/machine_pin.c2
-rw-r--r--ports/mimxrt/machine_timer.c2
-rw-r--r--ports/mimxrt/mpconfigport.h2
14 files changed, 6 insertions, 33 deletions
diff --git a/ports/mimxrt/boards/MIMXRT1010_EVK/mpconfigboard.h b/ports/mimxrt/boards/MIMXRT1010_EVK/mpconfigboard.h
index 75fda0cad..6c9aaff96 100644
--- a/ports/mimxrt/boards/MIMXRT1010_EVK/mpconfigboard.h
+++ b/ports/mimxrt/boards/MIMXRT1010_EVK/mpconfigboard.h
@@ -74,6 +74,3 @@
I2S_GPIO(1, WS, TX, GPIO_07, IOMUXC_GPIO_07_SAI1_TX_SYNC), \
I2S_GPIO(1, SD, TX, GPIO_04, IOMUXC_GPIO_04_SAI1_TX_DATA00), \
}
-
-#define MICROPY_BOARD_ROOT_POINTERS \
- struct _machine_i2s_obj_t *machine_i2s_obj[MICROPY_HW_I2S_NUM];
diff --git a/ports/mimxrt/boards/MIMXRT1015_EVK/mpconfigboard.h b/ports/mimxrt/boards/MIMXRT1015_EVK/mpconfigboard.h
index 17326cb48..adb97fd24 100644
--- a/ports/mimxrt/boards/MIMXRT1015_EVK/mpconfigboard.h
+++ b/ports/mimxrt/boards/MIMXRT1015_EVK/mpconfigboard.h
@@ -79,6 +79,3 @@
I2S_GPIO(1, WS, TX, GPIO_EMC_27, IOMUXC_GPIO_EMC_27_SAI1_TX_SYNC), \
I2S_GPIO(1, SD, TX, GPIO_EMC_25, IOMUXC_GPIO_EMC_25_SAI1_TX_DATA00), \
}
-
-#define MICROPY_BOARD_ROOT_POINTERS \
- struct _machine_i2s_obj_t *machine_i2s_obj[MICROPY_HW_I2S_NUM];
diff --git a/ports/mimxrt/boards/MIMXRT1020_EVK/mpconfigboard.h b/ports/mimxrt/boards/MIMXRT1020_EVK/mpconfigboard.h
index 1dfe02b65..762499f6c 100644
--- a/ports/mimxrt/boards/MIMXRT1020_EVK/mpconfigboard.h
+++ b/ports/mimxrt/boards/MIMXRT1020_EVK/mpconfigboard.h
@@ -172,6 +172,3 @@
{ IOMUXC_GPIO_AD_B0_15_ENET_TDATA01, 0, 0xB0E9u }, \
{ IOMUXC_GPIO_EMC_40_ENET_MDIO, 0, 0xB0E9u }, \
{ IOMUXC_GPIO_EMC_41_ENET_MDC, 0, 0xB0E9u },
-
-#define MICROPY_BOARD_ROOT_POINTERS \
- struct _machine_i2s_obj_t *machine_i2s_obj[MICROPY_HW_I2S_NUM];
diff --git a/ports/mimxrt/boards/MIMXRT1050_EVK/mpconfigboard.h b/ports/mimxrt/boards/MIMXRT1050_EVK/mpconfigboard.h
index 613095e67..f2a7b0b78 100644
--- a/ports/mimxrt/boards/MIMXRT1050_EVK/mpconfigboard.h
+++ b/ports/mimxrt/boards/MIMXRT1050_EVK/mpconfigboard.h
@@ -162,6 +162,3 @@
{ IOMUXC_GPIO_B1_11_ENET_RX_ER, 0, 0xB0E9u }, \
{ IOMUXC_GPIO_EMC_41_ENET_MDIO, 0, 0xB0E9u }, \
{ IOMUXC_GPIO_EMC_40_ENET_MDC, 0, 0xB0E9u },
-
-#define MICROPY_BOARD_ROOT_POINTERS \
- struct _machine_i2s_obj_t *machine_i2s_obj[MICROPY_HW_I2S_NUM];
diff --git a/ports/mimxrt/boards/MIMXRT1060_EVK/mpconfigboard.h b/ports/mimxrt/boards/MIMXRT1060_EVK/mpconfigboard.h
index a3f006238..5670902d1 100644
--- a/ports/mimxrt/boards/MIMXRT1060_EVK/mpconfigboard.h
+++ b/ports/mimxrt/boards/MIMXRT1060_EVK/mpconfigboard.h
@@ -160,6 +160,3 @@
{ IOMUXC_GPIO_B1_11_ENET_RX_ER, 0, 0xB0E9u }, \
{ IOMUXC_GPIO_EMC_41_ENET_MDIO, 0, 0xB0E9u }, \
{ IOMUXC_GPIO_EMC_40_ENET_MDC, 0, 0xB0E9u },
-
-#define MICROPY_BOARD_ROOT_POINTERS \
- struct _machine_i2s_obj_t *machine_i2s_obj[MICROPY_HW_I2S_NUM];
diff --git a/ports/mimxrt/boards/MIMXRT1064_EVK/mpconfigboard.h b/ports/mimxrt/boards/MIMXRT1064_EVK/mpconfigboard.h
index fe1fb532b..0f4eaf246 100644
--- a/ports/mimxrt/boards/MIMXRT1064_EVK/mpconfigboard.h
+++ b/ports/mimxrt/boards/MIMXRT1064_EVK/mpconfigboard.h
@@ -160,6 +160,3 @@
{ IOMUXC_GPIO_B1_11_ENET_RX_ER, 0, 0xB0E9u }, \
{ IOMUXC_GPIO_EMC_41_ENET_MDIO, 0, 0xB0E9u }, \
{ IOMUXC_GPIO_EMC_40_ENET_MDC, 0, 0xB0E9u },
-
-#define MICROPY_BOARD_ROOT_POINTERS \
- struct _machine_i2s_obj_t *machine_i2s_obj[MICROPY_HW_I2S_NUM];
diff --git a/ports/mimxrt/boards/OLIMEX_RT1010/mpconfigboard.h b/ports/mimxrt/boards/OLIMEX_RT1010/mpconfigboard.h
index c30caa047..8c6d159fb 100644
--- a/ports/mimxrt/boards/OLIMEX_RT1010/mpconfigboard.h
+++ b/ports/mimxrt/boards/OLIMEX_RT1010/mpconfigboard.h
@@ -80,7 +80,3 @@
I2S_GPIO(3, WS, TX, GPIO_SD_00, IOMUXC_GPIO_SD_00_SAI3_TX_SYNC), /* pin D9 */ \
I2S_GPIO(3, SD, TX, GPIO_SD_02, IOMUXC_GPIO_SD_02_SAI3_TX_DATA) /* pin D11 */ \
}
-
-
-#define MICROPY_BOARD_ROOT_POINTERS \
- struct _machine_i2s_obj_t *machine_i2s_obj[MICROPY_HW_I2S_NUM];
diff --git a/ports/mimxrt/boards/SEEED_ARCH_MIX/mpconfigboard.h b/ports/mimxrt/boards/SEEED_ARCH_MIX/mpconfigboard.h
index a6502d335..d366b4535 100644
--- a/ports/mimxrt/boards/SEEED_ARCH_MIX/mpconfigboard.h
+++ b/ports/mimxrt/boards/SEEED_ARCH_MIX/mpconfigboard.h
@@ -173,6 +173,3 @@
#define MIMXRT_IOMUXC_SEMC_WE IOMUXC_GPIO_EMC_28_SEMC_WE
#define MIMXRT_IOMUXC_SEMC_CS0 IOMUXC_GPIO_EMC_29_SEMC_CS0
-
-#define MICROPY_BOARD_ROOT_POINTERS \
- struct _machine_i2s_obj_t *machine_i2s_obj[MICROPY_HW_I2S_NUM];
diff --git a/ports/mimxrt/boards/TEENSY40/mpconfigboard.h b/ports/mimxrt/boards/TEENSY40/mpconfigboard.h
index f2ea86bd0..877573d03 100644
--- a/ports/mimxrt/boards/TEENSY40/mpconfigboard.h
+++ b/ports/mimxrt/boards/TEENSY40/mpconfigboard.h
@@ -104,6 +104,3 @@
.data2 = { GPIO_SD_B0_04_USDHC1_DATA2 }, \
.data3 = { GPIO_SD_B0_05_USDHC1_DATA3 }, \
}
-
-#define MICROPY_BOARD_ROOT_POINTERS \
- struct _machine_i2s_obj_t *machine_i2s_obj[MICROPY_HW_I2S_NUM];
diff --git a/ports/mimxrt/boards/TEENSY41/mpconfigboard.h b/ports/mimxrt/boards/TEENSY41/mpconfigboard.h
index 7d75f62f3..3c6a05185 100644
--- a/ports/mimxrt/boards/TEENSY41/mpconfigboard.h
+++ b/ports/mimxrt/boards/TEENSY41/mpconfigboard.h
@@ -127,6 +127,3 @@
{ IOMUXC_GPIO_B1_11_ENET_RX_ER, 0, 0xB0E9u }, \
{ IOMUXC_GPIO_B1_15_ENET_MDIO, 0, 0xB0E9u }, \
{ IOMUXC_GPIO_B1_14_ENET_MDC, 0, 0xB0E9u },
-
-#define MICROPY_BOARD_ROOT_POINTERS \
- struct _machine_i2s_obj_t *machine_i2s_obj[MICROPY_HW_I2S_NUM];
diff --git a/ports/mimxrt/machine_i2s.c b/ports/mimxrt/machine_i2s.c
index 11a203bae..a5446c7ac 100644
--- a/ports/mimxrt/machine_i2s.c
+++ b/ports/mimxrt/machine_i2s.c
@@ -1224,4 +1224,6 @@ const mp_obj_type_t machine_i2s_type = {
.locals_dict = (mp_obj_dict_t *)&machine_i2s_locals_dict,
};
+MP_REGISTER_ROOT_POINTER(struct _machine_i2s_obj_t *machine_i2s_obj[MICROPY_HW_I2S_NUM]);
+
#endif // MICROPY_PY_MACHINE_I2S
diff --git a/ports/mimxrt/machine_pin.c b/ports/mimxrt/machine_pin.c
index 2424088f0..64066af0e 100644
--- a/ports/mimxrt/machine_pin.c
+++ b/ports/mimxrt/machine_pin.c
@@ -469,3 +469,5 @@ STATIC const mp_irq_methods_t machine_pin_irq_methods = {
.trigger = machine_pin_irq_trigger,
.info = machine_pin_irq_info,
};
+
+MP_REGISTER_ROOT_POINTER(void *machine_pin_irq_objects[MICROPY_HW_NUM_PIN_IRQS]);
diff --git a/ports/mimxrt/machine_timer.c b/ports/mimxrt/machine_timer.c
index c47d9dca2..62a560ebb 100644
--- a/ports/mimxrt/machine_timer.c
+++ b/ports/mimxrt/machine_timer.c
@@ -218,3 +218,5 @@ const mp_obj_type_t machine_timer_type = {
.make_new = machine_timer_make_new,
.locals_dict = (mp_obj_dict_t *)&machine_timer_locals_dict,
};
+
+MP_REGISTER_ROOT_POINTER(struct _machine_timer_obj_t *timer_table[MICROPY_HW_PIT_NUM_CHANNELS]);
diff --git a/ports/mimxrt/mpconfigport.h b/ports/mimxrt/mpconfigport.h
index 0603d8216..2c7446e36 100644
--- a/ports/mimxrt/mpconfigport.h
+++ b/ports/mimxrt/mpconfigport.h
@@ -242,8 +242,6 @@ extern const struct _mp_obj_type_t network_lan_type;
#endif
#define MICROPY_PORT_ROOT_POINTERS \
- struct _machine_timer_obj_t *timer_table[MICROPY_HW_PIT_NUM_CHANNELS]; \
- void *machine_pin_irq_objects[MICROPY_HW_NUM_PIN_IRQS]; \
/* root pointers defined by a board */ \
MICROPY_BOARD_ROOT_POINTERS \