diff options
author | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2016-04-29 00:52:52 +0300 |
---|---|---|
committer | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2016-04-29 00:52:52 +0300 |
commit | 25d0f7d59d5d2c5cce206c9777aec0987810add4 (patch) | |
tree | 44ccbbcd3854b2cadbbe51567fbe41fa1e48b64a /py | |
parent | 22050a3ed0d65956a94469d79a9dc853f384fe1e (diff) | |
download | micropython-25d0f7d59d5d2c5cce206c9777aec0987810add4.tar.gz micropython-25d0f7d59d5d2c5cce206c9777aec0987810add4.zip |
extmod/modwebrepl: Module to handle WebREPL protocol.
While just a websocket is enough for handling terminal part of WebREPL,
handling file transfer operations requires demultiplexing and acting
upon, which is encapsulated in _webrepl class provided by this module,
which wraps a websocket object.
Diffstat (limited to 'py')
-rw-r--r-- | py/builtin.h | 1 | ||||
-rw-r--r-- | py/objmodule.c | 3 | ||||
-rw-r--r-- | py/py.mk | 1 |
3 files changed, 5 insertions, 0 deletions
diff --git a/py/builtin.h b/py/builtin.h index f63eac73ef..9d6e424091 100644 --- a/py/builtin.h +++ b/py/builtin.h @@ -110,6 +110,7 @@ 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; extern const mp_obj_module_t mp_module_websocket; +extern const mp_obj_module_t mp_module_webrepl; extern const mp_obj_module_t mp_module_framebuf; // extmod functions diff --git a/py/objmodule.c b/py/objmodule.c index d2a4d893c9..e334935e4e 100644 --- a/py/objmodule.c +++ b/py/objmodule.c @@ -196,6 +196,9 @@ STATIC const mp_rom_map_elem_t mp_builtin_module_table[] = { #if MICROPY_PY_WEBSOCKET { MP_ROM_QSTR(MP_QSTR_websocket), MP_ROM_PTR(&mp_module_websocket) }, #endif +#if MICROPY_PY_WEBREPL + { MP_ROM_QSTR(MP_QSTR__webrepl), MP_ROM_PTR(&mp_module_webrepl) }, +#endif #if MICROPY_PY_FRAMEBUF { MP_ROM_QSTR(MP_QSTR_framebuf), MP_ROM_PTR(&mp_module_framebuf) }, #endif @@ -178,6 +178,7 @@ PY_O_BASENAME = \ ../extmod/modussl.o \ ../extmod/modurandom.o \ ../extmod/modwebsocket.o \ + ../extmod/modwebrepl.o \ ../extmod/modframebuf.o \ ../extmod/fsusermount.o \ ../extmod/vfs_fat.o \ |