diff options
| author | Jim Mussared <jim.mussared@gmail.com> | 2022-04-20 21:20:39 +1000 |
|---|---|---|
| committer | Jim Mussared <jim.mussared@gmail.com> | 2022-05-18 20:57:09 +1000 |
| commit | d0307e79bbdf060a1f7958d6c1e975ac8c061a32 (patch) | |
| tree | 23e0b10e9b04f3cb2e9fd2f17bc24811e93ecf0b | |
| parent | c3f7424a5736fcae94c5855230eb029877c75c36 (diff) | |
teensy: Make port-specific modules use MP_REGISTER_MODULE.
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
| -rw-r--r-- | ports/teensy/modpyb.c | 2 | ||||
| -rw-r--r-- | ports/teensy/mpconfigport.h | 8 |
2 files changed, 3 insertions, 7 deletions
diff --git a/ports/teensy/modpyb.c b/ports/teensy/modpyb.c index f5bb3ea7b..b8fcfaaa5 100644 --- a/ports/teensy/modpyb.c +++ b/ports/teensy/modpyb.c @@ -360,3 +360,5 @@ const mp_obj_module_t pyb_module = { .base = { &mp_type_module }, .globals = (mp_obj_dict_t *)&pyb_module_globals, }; + +MP_REGISTER_MODULE(MP_QSTR_pyb, pyb_module, 1); diff --git a/ports/teensy/mpconfigport.h b/ports/teensy/mpconfigport.h index 3acedcf02..0ee83ba40 100644 --- a/ports/teensy/mpconfigport.h +++ b/ports/teensy/mpconfigport.h @@ -34,14 +34,8 @@ // extra built in names to add to the global namespace #define MICROPY_PORT_BUILTINS \ -// extra built in modules to add to the list of known ones -extern const struct _mp_obj_module_t os_module; -extern const struct _mp_obj_module_t pyb_module; -extern const struct _mp_obj_module_t time_module; -#define MICROPY_PORT_BUILTIN_MODULES \ - { MP_ROM_QSTR(MP_QSTR_pyb), MP_ROM_PTR(&pyb_module) }, \ - // extra constants +extern const struct _mp_obj_module_t pyb_module; #define MICROPY_PORT_CONSTANTS \ { MP_ROM_QSTR(MP_QSTR_pyb), MP_ROM_PTR(&pyb_module) }, \ |
