diff options
| author | Jim Mussared <jim.mussared@gmail.com> | 2022-04-20 17:25:03 +1000 |
|---|---|---|
| committer | Jim Mussared <jim.mussared@gmail.com> | 2022-05-18 20:56:30 +1000 |
| commit | 7d79fd7e8b4a53d93b690a4a7023d64f5a81599f (patch) | |
| tree | d8d42e13fb55e95f6c970c84de00523a9aa7f732 | |
| parent | 4274b34d6be19874d2868e385e38e5655f83bd32 (diff) | |
mimxrt: Make port-specific modules use MP_REGISTER_MODULE.
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
| -rw-r--r-- | ports/mimxrt/modmimxrt.c | 2 | ||||
| -rw-r--r-- | ports/mimxrt/modutime.c | 2 | ||||
| -rw-r--r-- | ports/mimxrt/mpconfigport.h | 7 |
3 files changed, 4 insertions, 7 deletions
diff --git a/ports/mimxrt/modmimxrt.c b/ports/mimxrt/modmimxrt.c index 041a72f7f..0091c36ff 100644 --- a/ports/mimxrt/modmimxrt.c +++ b/ports/mimxrt/modmimxrt.c @@ -41,3 +41,5 @@ const mp_obj_module_t mp_module_mimxrt = { .base = { &mp_type_module }, .globals = (mp_obj_dict_t *)&mimxrt_module_globals, }; + +MP_REGISTER_MODULE(MP_QSTR_mimxrt, mp_module_mimxrt, 1); diff --git a/ports/mimxrt/modutime.c b/ports/mimxrt/modutime.c index 822e2771d..f24ce43c0 100644 --- a/ports/mimxrt/modutime.c +++ b/ports/mimxrt/modutime.c @@ -134,3 +134,5 @@ const mp_obj_module_t mp_module_utime = { .base = { &mp_type_module }, .globals = (mp_obj_dict_t *)&time_module_globals, }; + +MP_REGISTER_MODULE(MP_QSTR_utime, mp_module_utime, 1); diff --git a/ports/mimxrt/mpconfigport.h b/ports/mimxrt/mpconfigport.h index 1569268cd..05de0306b 100644 --- a/ports/mimxrt/mpconfigport.h +++ b/ports/mimxrt/mpconfigport.h @@ -228,9 +228,6 @@ static inline void restore_irq_pri(uint32_t basepri) { #define MICROPY_PORT_BUILTINS \ { MP_ROM_QSTR(MP_QSTR_open), MP_ROM_PTR(&mp_builtin_open_obj) }, -extern const struct _mp_obj_module_t mp_module_mimxrt; -extern const struct _mp_obj_module_t mp_module_utime; - #if defined(MICROPY_HW_ETH_MDC) extern const struct _mp_obj_type_t network_lan_type; #define MICROPY_HW_NIC_ETH { MP_ROM_QSTR(MP_QSTR_LAN), MP_ROM_PTR(&network_lan_type) }, @@ -238,10 +235,6 @@ extern const struct _mp_obj_type_t network_lan_type; #define MICROPY_HW_NIC_ETH #endif -#define MICROPY_PORT_BUILTIN_MODULES \ - { MP_ROM_QSTR(MP_QSTR_mimxrt), (mp_obj_t)&mp_module_mimxrt }, \ - { MP_ROM_QSTR(MP_QSTR_utime), MP_ROM_PTR(&mp_module_utime) }, \ - #ifndef MICROPY_BOARD_NETWORK_INTERFACES #define MICROPY_BOARD_NETWORK_INTERFACES #endif |
