extmod/moduos: Create general uos module to be used by all ports.
Based on the rp2 port version, with the rp2 port converted to use this module. Signed-off-by: Damien George <damien@micropython.org>
This commit is contained in:
@@ -36,7 +36,7 @@
|
||||
#include "extmod/vfs_lfs.h"
|
||||
#endif
|
||||
|
||||
#if MICROPY_PY_UOS
|
||||
#if MICROPY_PY_UOS_ZEPHYR
|
||||
|
||||
STATIC const mp_rom_map_elem_t uos_module_globals_table[] = {
|
||||
{ MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_uos) },
|
||||
@@ -72,4 +72,4 @@ const mp_obj_module_t mp_module_uos = {
|
||||
.globals = (mp_obj_dict_t *)&uos_module_globals,
|
||||
};
|
||||
|
||||
#endif // MICROPY_PY_UOS
|
||||
#endif // MICROPY_PY_UOS_ZEPHYR
|
||||
|
||||
@@ -83,7 +83,7 @@
|
||||
#endif
|
||||
#define MICROPY_PY_UBINASCII (1)
|
||||
#define MICROPY_PY_UHASHLIB (1)
|
||||
#define MICROPY_PY_UOS (1)
|
||||
#define MICROPY_PY_UOS_ZEPHYR (1)
|
||||
#define MICROPY_PY_UTIME (1)
|
||||
#define MICROPY_PY_UTIME_MP_HAL (1)
|
||||
#define MICROPY_PY_ZEPHYR (1)
|
||||
@@ -144,7 +144,7 @@ extern const struct _mp_obj_module_t mp_module_usocket;
|
||||
extern const struct _mp_obj_module_t mp_module_zephyr;
|
||||
extern const struct _mp_obj_module_t mp_module_zsensor;
|
||||
|
||||
#if MICROPY_PY_UOS
|
||||
#if MICROPY_PY_UOS_ZEPHYR
|
||||
#define MICROPY_PY_UOS_DEF { MP_ROM_QSTR(MP_QSTR_uos), MP_ROM_PTR(&mp_module_uos) },
|
||||
#else
|
||||
#define MICROPY_PY_UOS_DEF
|
||||
|
||||
Reference in New Issue
Block a user