summaryrefslogtreecommitdiff
path: root/py/objmodule.c
diff options
context:
space:
mode:
authorScott Shawcroft <scott@chickadee.tech>2016-11-03 15:50:59 -0700
committerScott Shawcroft <scott.shawcroft@gmail.com>2016-11-21 14:11:52 -0800
commitccbb5e84f980e252f7380d96fcc5c417a8a64523 (patch)
tree743fef26c6176aca6582b92a85829a565e60c414 /py/objmodule.c
parent93218281588b42331d83e4aaa45ac1abe4af130b (diff)
This introduces an alternative hardware API called nativeio structured around different functions that are typically accelerated by native hardware. Its not meant to reflect the structure of the hardware.
Docs are here: http://tannewt-micropython.readthedocs.io/en/microcontroller/ It differs from upstream's machine in the following ways: * Python API is identical across ports due to code structure. (Lives in shared-bindings) * Focuses on abstracting common functionality (AnalogIn) and not representing structure (ADC). * Documentation lives with code making it easy to ensure they match. * Pin is split into references (board.D13 and microcontroller.pin.PA17) and functionality (DigitalInOut). * All nativeio classes claim underlying hardware resources when inited on construction, support Context Managers (aka with statements) and have deinit methods which release the claimed hardware. * All constructors take pin references rather than peripheral ids. Its up to the implementation to find hardware or throw and exception.
Diffstat (limited to 'py/objmodule.c')
-rw-r--r--py/objmodule.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/py/objmodule.c b/py/objmodule.c
index 9b06e3b7b..7ed3175c0 100644
--- a/py/objmodule.c
+++ b/py/objmodule.c
@@ -201,13 +201,13 @@ STATIC const mp_rom_map_elem_t mp_builtin_module_table[] = {
#if MICROPY_PY_USSL
{ MP_ROM_QSTR(MP_QSTR_ussl), MP_ROM_PTR(&mp_module_ussl) },
#endif
-#if MICROPY_PY_LWIP
+#ifdef MICROPY_PY_LWIP
{ MP_ROM_QSTR(MP_QSTR_lwip), MP_ROM_PTR(&mp_module_lwip) },
#endif
#if MICROPY_PY_WEBSOCKET
{ MP_ROM_QSTR(MP_QSTR_websocket), MP_ROM_PTR(&mp_module_websocket) },
#endif
-#if MICROPY_PY_WEBREPL
+#ifdef MICROPY_PY_WEBREPL
{ MP_ROM_QSTR(MP_QSTR__webrepl), MP_ROM_PTR(&mp_module_webrepl) },
#endif
#if MICROPY_PY_FRAMEBUF