Skip to content

Commit d0307e7

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

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

ports/teensy/modpyb.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -360,3 +360,5 @@ const mp_obj_module_t pyb_module = {
360360
.base = { &mp_type_module },
361361
.globals = (mp_obj_dict_t *)&pyb_module_globals,
362362
};
363+
364+
MP_REGISTER_MODULE(MP_QSTR_pyb, pyb_module, 1);

ports/teensy/mpconfigport.h

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,8 @@
3434
// extra built in names to add to the global namespace
3535
#define MICROPY_PORT_BUILTINS \
3636

37-
// extra built in modules to add to the list of known ones
38-
extern const struct _mp_obj_module_t os_module;
39-
extern const struct _mp_obj_module_t pyb_module;
40-
extern const struct _mp_obj_module_t time_module;
41-
#define MICROPY_PORT_BUILTIN_MODULES \
42-
{ MP_ROM_QSTR(MP_QSTR_pyb), MP_ROM_PTR(&pyb_module) }, \
43-
4437
// extra constants
38+
extern const struct _mp_obj_module_t pyb_module;
4539
#define MICROPY_PORT_CONSTANTS \
4640
{ MP_ROM_QSTR(MP_QSTR_pyb), MP_ROM_PTR(&pyb_module) }, \
4741

0 commit comments

Comments
 (0)