summaryrefslogtreecommitdiff
path: root/py
diff options
context:
space:
mode:
authorPaul Sokolovsky <pfalcon@users.sourceforge.net>2016-11-20 23:49:45 +0300
committerPaul Sokolovsky <pfalcon@users.sourceforge.net>2016-11-21 00:05:56 +0300
commit8f5bc3ffc0603bbc338f9a24bd7d278b72d5c9d7 (patch)
tree9eb858eb924b6f094955a59815ba2b11ed5e70c1 /py
parentc28fed6b64248adbd6c1b429a85d4d9e00cd9e36 (diff)
stmhal/moduselect: Move to extmod/ for reuse by other ports.
Diffstat (limited to 'py')
-rw-r--r--py/builtin.h1
-rw-r--r--py/mpconfig.h5
-rw-r--r--py/objmodule.c3
-rw-r--r--py/py.mk1
4 files changed, 10 insertions, 0 deletions
diff --git a/py/builtin.h b/py/builtin.h
index 4477fd246..893e47104 100644
--- a/py/builtin.h
+++ b/py/builtin.h
@@ -108,6 +108,7 @@ extern const mp_obj_module_t mp_module_uheapq;
extern const mp_obj_module_t mp_module_uhashlib;
extern const mp_obj_module_t mp_module_ubinascii;
extern const mp_obj_module_t mp_module_urandom;
+extern const mp_obj_module_t mp_module_uselect;
extern const mp_obj_module_t mp_module_ussl;
extern const mp_obj_module_t mp_module_machine;
extern const mp_obj_module_t mp_module_lwip;
diff --git a/py/mpconfig.h b/py/mpconfig.h
index 1980e649c..4572fc4cc 100644
--- a/py/mpconfig.h
+++ b/py/mpconfig.h
@@ -873,6 +873,11 @@ typedef double mp_float_t;
#define MICROPY_PY_UERRNO (0)
#endif
+// Whether to provide "uselect" module (baremetal implementation)
+#ifndef MICROPY_PY_USELECT
+#define MICROPY_PY_USELECT (0)
+#endif
+
// Whether to provide "utime" module functions implementation
// in terms of mp_hal_* functions.
#ifndef MICROPY_PY_UTIME_MP_HAL
diff --git a/py/objmodule.c b/py/objmodule.c
index 9b06e3b7b..6f7d35d42 100644
--- a/py/objmodule.c
+++ b/py/objmodule.c
@@ -198,6 +198,9 @@ STATIC const mp_rom_map_elem_t mp_builtin_module_table[] = {
#if MICROPY_PY_URANDOM
{ MP_ROM_QSTR(MP_QSTR_urandom), MP_ROM_PTR(&mp_module_urandom) },
#endif
+#if MICROPY_PY_USELECT
+ { MP_ROM_QSTR(MP_QSTR_uselect), MP_ROM_PTR(&mp_module_uselect) },
+#endif
#if MICROPY_PY_USSL
{ MP_ROM_QSTR(MP_QSTR_ussl), MP_ROM_PTR(&mp_module_ussl) },
#endif
diff --git a/py/py.mk b/py/py.mk
index 82e0661ef..ec67ac2a0 100644
--- a/py/py.mk
+++ b/py/py.mk
@@ -219,6 +219,7 @@ PY_O_BASENAME = \
../extmod/modussl_axtls.o \
../extmod/modussl_mbedtls.o \
../extmod/modurandom.o \
+ ../extmod/moduselect.o \
../extmod/modwebsocket.o \
../extmod/modwebrepl.o \
../extmod/modframebuf.o \