diff options
author | Damien George <damien.p.george@gmail.com> | 2014-08-24 13:19:22 +0100 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2014-08-24 13:19:22 +0100 |
commit | 25fc41dd316c38df3e2a6cfe4b53322d76dc92fc (patch) | |
tree | 8e7628041e096f888c3f9b41880c4b9907b5f039 /unix | |
parent | 4f9ebade608e805f0f35e81cd0372d3afdafb900 (diff) | |
download | micropython-25fc41dd316c38df3e2a6cfe4b53322d76dc92fc.tar.gz micropython-25fc41dd316c38df3e2a6cfe4b53322d76dc92fc.zip |
unix, modtermios: Make it properly configurable; fix spelling mistake.
Diffstat (limited to 'unix')
-rw-r--r-- | unix/modtermios.c | 2 | ||||
-rw-r--r-- | unix/mpconfigport.h | 7 |
2 files changed, 7 insertions, 2 deletions
diff --git a/unix/modtermios.c b/unix/modtermios.c index b705303556..56e1c5e83a 100644 --- a/unix/modtermios.c +++ b/unix/modtermios.c @@ -63,7 +63,7 @@ STATIC mp_obj_t mod_termios_tcgetattr(mp_obj_t fd_in) { cc->items[i] = MP_OBJ_NEW_SMALL_INT(term.c_cc[i]); } else { // https://docs.python.org/3/library/termios.html says value is *string*, - // but now way unicode chars could be there. + // but no way unicode chars could be there. cc->items[i] = mp_obj_new_bytes(&term.c_cc[i], 1); } } diff --git a/unix/mpconfigport.h b/unix/mpconfigport.h index 95fdb7bfbe..c67bdfba41 100644 --- a/unix/mpconfigport.h +++ b/unix/mpconfigport.h @@ -84,13 +84,18 @@ extern const struct _mp_obj_module_t mp_module_ffi; #else #define MICROPY_PY_TIME_DEF #endif +#if MICROPY_PY_TERMIOS +#define MICROPY_PY_TERMIOS_DEF { MP_OBJ_NEW_QSTR(MP_QSTR_termios), (mp_obj_t)&mp_module_termios }, +#else +#define MICROPY_PY_TERMIOS_DEF +#endif #define MICROPY_PORT_BUILTIN_MODULES \ MICROPY_PY_FFI_DEF \ MICROPY_PY_TIME_DEF \ { MP_OBJ_NEW_QSTR(MP_QSTR_microsocket), (mp_obj_t)&mp_module_socket }, \ { MP_OBJ_NEW_QSTR(MP_QSTR__os), (mp_obj_t)&mp_module_os }, \ - { MP_OBJ_NEW_QSTR(MP_QSTR_termios), (mp_obj_t)&mp_module_termios }, \ + MICROPY_PY_TERMIOS_DEF \ // type definitions for the specific machine |