mimxrt: Use MP_REGISTER_ROOT_POINTER().
This uses MP_REGISTER_ROOT_POINTER() to register all port-specific root pointers in the mimxrt port. Signed-off-by: David Lechner <david@pybricks.com>
This commit is contained in:
parent
e2d4db96da
commit
a316a8fdb3
|
@ -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];
|
||||
|
|
|
@ -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];
|
||||
|
|
|
@ -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];
|
||||
|
|
|
@ -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];
|
||||
|
|
|
@ -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];
|
||||
|
|
|
@ -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];
|
||||
|
|
|
@ -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];
|
||||
|
|
|
@ -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];
|
||||
|
|
|
@ -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];
|
||||
|
|
|
@ -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];
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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]);
|
||||
|
|
|
@ -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]);
|
||||
|
|
|
@ -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 \
|
||||
|
||||
|
|
Loading…
Reference in New Issue