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 /zephyr/mpconfigport.h | |
parent | d1015f0e0d8bcb297017555f8bd12486704ae4fc (diff) | |
download | micropython-6cc1a7a214e573cf3efc3c53f3ecba6c65ea2d11.tar.gz micropython-6cc1a7a214e573cf3efc3c53f3ecba6c65ea2d11.zip |
zephyr: Integrate modusocket into build.
Diffstat (limited to 'zephyr/mpconfigport.h')
-rw-r--r-- | zephyr/mpconfigport.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/zephyr/mpconfigport.h b/zephyr/mpconfigport.h index ff8a593a49..e0586dcfc1 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 \ |