File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -63,7 +63,7 @@ STATIC mp_obj_t mod_termios_tcgetattr(mp_obj_t fd_in) {
6363 cc -> items [i ] = MP_OBJ_NEW_SMALL_INT (term .c_cc [i ]);
6464 } else {
6565 // https://docs.python.org/3/library/termios.html says value is *string*,
66- // but now way unicode chars could be there.
66+ // but no way unicode chars could be there.
6767 cc -> items [i ] = mp_obj_new_bytes (& term .c_cc [i ], 1 );
6868 }
6969 }
Original file line number Diff line number Diff line change @@ -84,13 +84,18 @@ extern const struct _mp_obj_module_t mp_module_ffi;
8484#else
8585#define MICROPY_PY_TIME_DEF
8686#endif
87+ #if MICROPY_PY_TERMIOS
88+ #define MICROPY_PY_TERMIOS_DEF { MP_OBJ_NEW_QSTR(MP_QSTR_termios), (mp_obj_t)&mp_module_termios },
89+ #else
90+ #define MICROPY_PY_TERMIOS_DEF
91+ #endif
8792
8893#define MICROPY_PORT_BUILTIN_MODULES \
8994 MICROPY_PY_FFI_DEF \
9095 MICROPY_PY_TIME_DEF \
9196 { MP_OBJ_NEW_QSTR(MP_QSTR_microsocket), (mp_obj_t)&mp_module_socket }, \
9297 { MP_OBJ_NEW_QSTR(MP_QSTR__os), (mp_obj_t)&mp_module_os }, \
93- { MP_OBJ_NEW_QSTR(MP_QSTR_termios), (mp_obj_t)&mp_module_termios }, \
98+ MICROPY_PY_TERMIOS_DEF \
9499
95100// type definitions for the specific machine
96101
You can’t perform that action at this time.
0 commit comments