Skip to content

Commit c2d889f

Browse files
committed
renesas-ra: Make port-specific modules use MP_REGISTER_MODULE.
Signed-off-by: Jim Mussared <[email protected]>
1 parent 1d33ceb commit c2d889f

File tree

2 files changed

+2
-26
lines changed

2 files changed

+2
-26
lines changed

ports/renesas-ra/modutime.c

+2
Original file line numberDiff line numberDiff line change
@@ -156,3 +156,5 @@ const mp_obj_module_t mp_module_utime = {
156156
.base = { &mp_type_module },
157157
.globals = (mp_obj_dict_t *)&time_module_globals,
158158
};
159+
160+
MP_REGISTER_MODULE(MP_QSTR_utime, mp_module_utime, MICROPY_PY_UTIME);

ports/renesas-ra/mpconfigport.h

-26
Original file line numberDiff line numberDiff line change
@@ -158,16 +158,6 @@
158158
#define MICROPY_PORT_BUILTINS \
159159
{ MP_ROM_QSTR(MP_QSTR_open), MP_ROM_PTR(&mp_builtin_open_obj) },
160160

161-
// extra built in modules to add to the list of known ones
162-
extern const struct _mp_obj_module_t mp_module_ubinascii;
163-
extern const struct _mp_obj_module_t mp_module_ure;
164-
extern const struct _mp_obj_module_t mp_module_uzlib;
165-
extern const struct _mp_obj_module_t mp_module_ujson;
166-
extern const struct _mp_obj_module_t mp_module_uheapq;
167-
extern const struct _mp_obj_module_t mp_module_uhashlib;
168-
extern const struct _mp_obj_module_t mp_module_utime;
169-
extern const struct _mp_obj_module_t mp_module_onewire;
170-
171161
#if MICROPY_PY_MACHINE
172162
#define MACHINE_BUILTIN_MODULE_CONSTANTS \
173163
{ 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;
176166
#define MACHINE_BUILTIN_MODULE_CONSTANTS
177167
#endif
178168

179-
#if MICROPY_PY_UTIME
180-
#define UTIME_BUILTIN_MODULE { MP_ROM_QSTR(MP_QSTR_utime), MP_ROM_PTR(&mp_module_utime) },
181-
#else
182-
#define UTIME_BUILTIN_MODULE
183-
#endif
184-
185-
#if MICROPY_PY_ONEWIRE
186-
#define ONEWIRE_BUILTIN_MODULE { MP_ROM_QSTR(MP_QSTR__onewire), MP_ROM_PTR(&mp_module_onewire) },
187-
#else
188-
#define ONEWIRE_BUILTIN_MODULE
189-
#endif
190-
191-
#define MICROPY_PORT_BUILTIN_MODULES \
192-
UTIME_BUILTIN_MODULE \
193-
ONEWIRE_BUILTIN_MODULE \
194-
195169
// extra constants
196170
#define MICROPY_PORT_CONSTANTS \
197171
MACHINE_BUILTIN_MODULE_CONSTANTS \

0 commit comments

Comments
 (0)