diff options
author | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2017-03-31 00:06:31 +0300 |
---|---|---|
committer | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2017-03-31 00:06:31 +0300 |
commit | 6cc1a7a214e573cf3efc3c53f3ecba6c65ea2d11 (patch) | |
tree | a5e95d20289e12667a2bdc9eb673030526c469b5 | |
parent | d1015f0e0d8bcb297017555f8bd12486704ae4fc (diff) |
zephyr: Integrate modusocket into build.
-rw-r--r-- | zephyr/Makefile | 1 | ||||
-rw-r--r-- | zephyr/mpconfigport.h | 8 |
2 files changed, 9 insertions, 0 deletions
diff --git a/zephyr/Makefile b/zephyr/Makefile index c3781322a..b78b4be95 100644 --- a/zephyr/Makefile +++ b/zephyr/Makefile @@ -33,6 +33,7 @@ INC += -I$(ZEPHYR_BASE)/net/ip/contiki/os SRC_C = main.c \ help.c \ + modusocket.c \ modutime.c \ modzephyr.c \ modmachine.c \ diff --git a/zephyr/mpconfigport.h b/zephyr/mpconfigport.h index ff8a593a4..e0586dcfc 100644 --- a/zephyr/mpconfigport.h +++ b/zephyr/mpconfigport.h @@ -60,6 +60,11 @@ #define MICROPY_PY_MACHINE (1) #define MICROPY_MODULE_WEAK_LINKS (1) #define MICROPY_PY_STRUCT (0) +#ifdef CONFIG_NETWORKING +// If we have networking, we likely want errno comfort +#define MICROPY_PY_UERRNO (1) +#define MICROPY_PY_USOCKET (1) +#endif #define MICROPY_PY_UTIME (1) #define MICROPY_PY_UTIME_MP_HAL (1) #define MICROPY_PY_ZEPHYR (1) @@ -103,6 +108,7 @@ typedef long mp_off_t; extern const struct _mp_obj_module_t mp_module_machine; extern const struct _mp_obj_module_t mp_module_time; +extern const struct _mp_obj_module_t mp_module_usocket; extern const struct _mp_obj_module_t mp_module_zephyr; #if MICROPY_PY_UTIME @@ -119,11 +125,13 @@ extern const struct _mp_obj_module_t mp_module_zephyr; #define MICROPY_PORT_BUILTIN_MODULES \ { MP_OBJ_NEW_QSTR(MP_QSTR_machine), (mp_obj_t)&mp_module_machine }, \ + { MP_OBJ_NEW_QSTR(MP_QSTR_usocket), (mp_obj_t)&mp_module_usocket }, \ MICROPY_PY_UTIME_DEF \ MICROPY_PY_ZEPHYR_DEF \ #define MICROPY_PORT_BUILTIN_MODULE_WEAK_LINKS \ { MP_OBJ_NEW_QSTR(MP_QSTR_time), MP_ROM_PTR(&mp_module_time) }, \ + { MP_OBJ_NEW_QSTR(MP_QSTR_socket), MP_ROM_PTR(&mp_module_usocket) }, \ // extra built in names to add to the global namespace #define MICROPY_PORT_BUILTINS \ |