Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
uPython-mirror
Commits
25fc41dd
Commit
25fc41dd
authored
Aug 24, 2014
by
Damien George
Browse files
unix, modtermios: Make it properly configurable; fix spelling mistake.
parent
4f9ebade
Changes
2
Hide whitespace changes
Inline
Side-by-side
unix/modtermios.c
View file @
25fc41dd
...
...
@@ -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 no
w
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
);
}
}
...
...
unix/mpconfigport.h
View file @
25fc41dd
...
...
@@ -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
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment