diff options
author | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2016-10-28 21:38:52 +0300 |
---|---|---|
committer | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2016-10-28 21:38:52 +0300 |
commit | 938c6939487ead395aa92f9c27cb22b1c7ac8740 (patch) | |
tree | c24c87f9c586168e020592e084b1abd519c625e4 | |
parent | cc0cc67815a70b4b7dd7be62b18e3c07054f9b46 (diff) |
zephyr: Support time -> utime module "weaklink".
So, now it's possible to just do normal Python's "import time".
-rw-r--r-- | zephyr/mpconfigport.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/zephyr/mpconfigport.h b/zephyr/mpconfigport.h index 0a3905c3c..4d6f2b493 100644 --- a/zephyr/mpconfigport.h +++ b/zephyr/mpconfigport.h @@ -54,6 +54,7 @@ #define MICROPY_PY_IO (0) #define MICROPY_PY_MICROPYTHON_MEM_INFO (1) #define MICROPY_PY_MACHINE (1) +#define MICROPY_MODULE_WEAK_LINKS (1) #define MICROPY_PY_STRUCT (0) #define MICROPY_PY_UTIME (1) #define MICROPY_PY_UTIME_MP_HAL (1) @@ -104,6 +105,9 @@ extern const struct _mp_obj_module_t mp_module_time; { MP_OBJ_NEW_QSTR(MP_QSTR_machine), (mp_obj_t)&mp_module_machine }, \ MICROPY_PY_UTIME_DEF \ +#define MICROPY_PORT_BUILTIN_MODULE_WEAK_LINKS \ + { MP_OBJ_NEW_QSTR(MP_QSTR_time), MP_ROM_PTR(&mp_module_time) }, \ + // extra built in names to add to the global namespace #define MICROPY_PORT_BUILTINS \ { MP_OBJ_NEW_QSTR(MP_QSTR_help), (mp_obj_t)&mp_builtin_help_obj }, \ |