Skip to content

Commit c3f7424

Browse files
committed
samd: Make port-specific modules use MP_REGISTER_MODULE.
Signed-off-by: Jim Mussared <[email protected]>
1 parent 62f00a4 commit c3f7424

File tree

3 files changed

+4
-7
lines changed

3 files changed

+4
-7
lines changed

ports/samd/modsamd.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,3 +39,5 @@ const mp_obj_module_t mp_module_samd = {
3939
.base = { &mp_type_module },
4040
.globals = (mp_obj_dict_t *)&samd_module_globals,
4141
};
42+
43+
MP_REGISTER_MODULE(MP_QSTR_samd, mp_module_samd, 1);

ports/samd/modutime.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,3 +99,5 @@ const mp_obj_module_t mp_module_utime = {
9999
.base = { &mp_type_module },
100100
.globals = (mp_obj_dict_t *)&time_module_globals,
101101
};
102+
103+
MP_REGISTER_MODULE(MP_QSTR_utime, mp_module_utime, 1);

ports/samd/mpconfigport.h

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -108,13 +108,6 @@
108108
#define MICROPY_PORT_BUILTINS \
109109
{ MP_ROM_QSTR(MP_QSTR_open), MP_ROM_PTR(&mp_builtin_open_obj) },
110110

111-
extern const struct _mp_obj_module_t mp_module_samd;
112-
extern const struct _mp_obj_module_t mp_module_utime;
113-
114-
#define MICROPY_PORT_BUILTIN_MODULES \
115-
{ MP_ROM_QSTR(MP_QSTR_samd), MP_ROM_PTR(&mp_module_samd) }, \
116-
{ MP_ROM_QSTR(MP_QSTR_utime), MP_ROM_PTR(&mp_module_utime) }, \
117-
118111
#define MICROPY_PORT_ROOT_POINTERS \
119112
const char *readline_hist[8];
120113

0 commit comments

Comments
 (0)