Skip to content
Snippets Groups Projects
Commit 25fc41dd authored by Damien George's avatar Damien George
Browse files

unix, modtermios: Make it properly configurable; fix spelling mistake.

parent 4f9ebade
No related branches found
No related tags found
No related merge requests found
......@@ -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);
}
}
......
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment