summaryrefslogtreecommitdiff
path: root/py
diff options
context:
space:
mode:
authoriabdalkader <i.abdalkader@gmail.com>2021-08-29 18:58:31 +0200
committerDamien George <damien@micropython.org>2021-09-19 23:35:10 +1000
commit2c5e9bbdface4eb163b53f486359ca2208b7b0a5 (patch)
tree5b127dd4fd824111bde507c654e09d4054fe65af /py
parent38f8e852e04013e4616097320bf9cf75051a1b6b (diff)
extmod: Add platform module.
It contains the compiler version, and underlying system HAL/SDK version.
Diffstat (limited to 'py')
-rw-r--r--py/builtin.h1
-rw-r--r--py/objmodule.c3
-rw-r--r--py/py.mk1
3 files changed, 5 insertions, 0 deletions
diff --git a/py/builtin.h b/py/builtin.h
index 1e4769cd6..8639e978f 100644
--- a/py/builtin.h
+++ b/py/builtin.h
@@ -124,6 +124,7 @@ extern const mp_obj_module_t mp_module_webrepl;
extern const mp_obj_module_t mp_module_framebuf;
extern const mp_obj_module_t mp_module_btree;
extern const mp_obj_module_t mp_module_ubluetooth;
+extern const mp_obj_module_t mp_module_uplatform;
extern const char MICROPY_PY_BUILTINS_HELP_TEXT[];
diff --git a/py/objmodule.c b/py/objmodule.c
index a1f9d9d7f..d648f0f8c 100644
--- a/py/objmodule.c
+++ b/py/objmodule.c
@@ -230,6 +230,9 @@ STATIC const mp_rom_map_elem_t mp_builtin_module_table[] = {
#if MICROPY_PY_BLUETOOTH
{ MP_ROM_QSTR(MP_QSTR_ubluetooth), MP_ROM_PTR(&mp_module_ubluetooth) },
#endif
+ #if MICROPY_PY_UPLATFORM
+ { MP_ROM_QSTR(MP_QSTR_uplatform), MP_ROM_PTR(&mp_module_uplatform) },
+ #endif
// extra builtin modules as defined by a port
MICROPY_PORT_BUILTIN_MODULES
diff --git a/py/py.mk b/py/py.mk
index be8296e5e..8e1e23554 100644
--- a/py/py.mk
+++ b/py/py.mk
@@ -195,6 +195,7 @@ PY_EXTMOD_O_BASENAME = \
extmod/modbluetooth.o \
extmod/modussl_axtls.o \
extmod/modussl_mbedtls.o \
+ extmod/moduplatform.o\
extmod/modurandom.o \
extmod/moduselect.o \
extmod/moduwebsocket.o \