diff options
author | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2015-12-28 01:30:19 +0200 |
---|---|---|
committer | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2015-12-28 01:30:58 +0200 |
commit | 1e06e81b3d32b3f0bc775e0e4ed2d0251a95f53e (patch) | |
tree | ec9d5762a252b4dbc6c10cb5591ec3af96704f8c | |
parent | 2c1620ce1fe3bb2d011ccaca701191927f1d49d6 (diff) | |
download | micropython-1e06e81b3d32b3f0bc775e0e4ed2d0251a95f53e.tar.gz micropython-1e06e81b3d32b3f0bc775e0e4ed2d0251a95f53e.zip |
windows: Propagate MICROPY_PY_OS_DUPTERM handling from unix port.
-rw-r--r-- | windows/mpconfigport.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/windows/mpconfigport.h b/windows/mpconfigport.h index 3fbe82c993..5812976006 100644 --- a/windows/mpconfigport.h +++ b/windows/mpconfigport.h @@ -139,8 +139,14 @@ typedef long mp_off_t; typedef void *machine_ptr_t; // must be of pointer size typedef const void *machine_const_ptr_t; // must be of pointer size +#if MICROPY_PY_OS_DUPTERM +#define MP_PLAT_PRINT_STRN(str, len) mp_hal_stdout_tx_strn_cooked(str, len) +void mp_hal_dupterm_tx_strn(const char *str, size_t len); +#else #include <unistd.h> #define MP_PLAT_PRINT_STRN(str, len) do { int ret = write(1, str, len); (void)ret; } while (0) +#define mp_hal_dupterm_tx_strn(s, l) +#endif extern const struct _mp_obj_fun_builtin_t mp_builtin_input_obj; extern const struct _mp_obj_fun_builtin_t mp_builtin_open_obj; |