diff options
author | Jim Mussared <jim.mussared@gmail.com> | 2022-05-13 16:29:22 +1000 |
---|---|---|
committer | Jim Mussared <jim.mussared@gmail.com> | 2022-05-18 20:57:09 +1000 |
commit | c2d889fc1e21aa39f15c8432dda643e41fe1f3ad (patch) | |
tree | 90d1ea8aef8e4baa49d3f3df2da262842d294bd7 | |
parent | 1d33ceb0d0235d657afac69ba27ab08c6477df4f (diff) |
renesas-ra: Make port-specific modules use MP_REGISTER_MODULE.
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
-rw-r--r-- | ports/renesas-ra/modutime.c | 2 | ||||
-rw-r--r-- | ports/renesas-ra/mpconfigport.h | 26 |
2 files changed, 2 insertions, 26 deletions
diff --git a/ports/renesas-ra/modutime.c b/ports/renesas-ra/modutime.c index bff76035e..2bd0adfa2 100644 --- a/ports/renesas-ra/modutime.c +++ b/ports/renesas-ra/modutime.c @@ -156,3 +156,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, MICROPY_PY_UTIME); diff --git a/ports/renesas-ra/mpconfigport.h b/ports/renesas-ra/mpconfigport.h index 8d60bc244..e66ca6b18 100644 --- a/ports/renesas-ra/mpconfigport.h +++ b/ports/renesas-ra/mpconfigport.h @@ -158,16 +158,6 @@ #define MICROPY_PORT_BUILTINS \ { MP_ROM_QSTR(MP_QSTR_open), MP_ROM_PTR(&mp_builtin_open_obj) }, -// extra built in modules to add to the list of known ones -extern const struct _mp_obj_module_t mp_module_ubinascii; -extern const struct _mp_obj_module_t mp_module_ure; -extern const struct _mp_obj_module_t mp_module_uzlib; -extern const struct _mp_obj_module_t mp_module_ujson; -extern const struct _mp_obj_module_t mp_module_uheapq; -extern const struct _mp_obj_module_t mp_module_uhashlib; -extern const struct _mp_obj_module_t mp_module_utime; -extern const struct _mp_obj_module_t mp_module_onewire; - #if MICROPY_PY_MACHINE #define MACHINE_BUILTIN_MODULE_CONSTANTS \ { MP_ROM_QSTR(MP_QSTR_umachine), MP_ROM_PTR(&mp_module_machine) }, \ @@ -176,22 +166,6 @@ extern const struct _mp_obj_module_t mp_module_onewire; #define MACHINE_BUILTIN_MODULE_CONSTANTS #endif -#if MICROPY_PY_UTIME -#define UTIME_BUILTIN_MODULE { MP_ROM_QSTR(MP_QSTR_utime), MP_ROM_PTR(&mp_module_utime) }, -#else -#define UTIME_BUILTIN_MODULE -#endif - -#if MICROPY_PY_ONEWIRE -#define ONEWIRE_BUILTIN_MODULE { MP_ROM_QSTR(MP_QSTR__onewire), MP_ROM_PTR(&mp_module_onewire) }, -#else -#define ONEWIRE_BUILTIN_MODULE -#endif - -#define MICROPY_PORT_BUILTIN_MODULES \ - UTIME_BUILTIN_MODULE \ - ONEWIRE_BUILTIN_MODULE \ - // extra constants #define MICROPY_PORT_CONSTANTS \ MACHINE_BUILTIN_MODULE_CONSTANTS \ |