File tree Expand file tree Collapse file tree 2 files changed +11
-4
lines changed
Expand file tree Collapse file tree 2 files changed +11
-4
lines changed Original file line number Diff line number Diff line change 3333#include "ets_alt_task.h"
3434#include "py/obj.h"
3535#include "py/mpstate.h"
36+ #include "extmod/misc.h"
3637
3738extern void ets_wdt_disable (void );
3839extern void wdt_feed (void );
@@ -68,24 +69,29 @@ int mp_hal_stdin_rx_chr(void) {
6869 }
6970}
7071
72+ void mp_hal_stdout_tx_char (char c ) {
73+ uart_tx_one_char (UART0 , c );
74+ mp_uos_dupterm_tx_strn (& c , 1 );
75+ }
76+
7177void mp_hal_stdout_tx_str (const char * str ) {
7278 while (* str ) {
73- uart_tx_one_char ( UART0 , * str ++ );
79+ mp_hal_stdout_tx_char ( * str ++ );
7480 }
7581}
7682
7783void mp_hal_stdout_tx_strn (const char * str , uint32_t len ) {
7884 while (len -- ) {
79- uart_tx_one_char ( UART0 , * str ++ );
85+ mp_hal_stdout_tx_char ( * str ++ );
8086 }
8187}
8288
8389void mp_hal_stdout_tx_strn_cooked (const char * str , uint32_t len ) {
8490 while (len -- ) {
8591 if (* str == '\n' ) {
86- uart_tx_one_char ( UART0 , '\r' );
92+ mp_hal_stdout_tx_char ( '\r' );
8793 }
88- uart_tx_one_char ( UART0 , * str ++ );
94+ mp_hal_stdout_tx_char ( * str ++ );
8995 }
9096}
9197
Original file line number Diff line number Diff line change 5151#define MICROPY_PY_LWIP (1)
5252#define MICROPY_PY_MACHINE (1)
5353#define MICROPY_PY_MICROPYTHON_MEM_INFO (1)
54+ #define MICROPY_PY_OS_DUPTERM (1)
5455#define MICROPY_CPYTHON_COMPAT (1)
5556#define MICROPY_LONGINT_IMPL (MICROPY_LONGINT_IMPL_MPZ)
5657#define MICROPY_FLOAT_IMPL (MICROPY_FLOAT_IMPL_FLOAT)
You can’t perform that action at this time.
0 commit comments