diff options
author | Damien George <damien.p.george@gmail.com> | 2014-07-20 13:57:43 +0100 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2014-07-20 13:57:43 +0100 |
commit | 951ed9d02ffc826c68ee3af26c3530477e7e6156 (patch) | |
tree | eb70f46b030031c8601d71d575e36771cf6c5564 /stmhal/main.c | |
parent | 1163cb9cb5e48153d1a6d723e8577d8ec3821692 (diff) |
stmhal: Fix REPL printing by cooking output sent to stdout_obj.
Recent changes to builtin print meant that print was printing to the
mp_sys_stdout_obj, which was sending data raw to the USB CDC device.
The data should be cooked so that \n turns into \r\n.
Diffstat (limited to 'stmhal/main.c')
-rw-r--r-- | stmhal/main.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/stmhal/main.c b/stmhal/main.c index ae4ff5141..9e1798b3b 100644 --- a/stmhal/main.c +++ b/stmhal/main.c @@ -43,7 +43,6 @@ #include "stackctrl.h" #include "gc.h" #include "gccollect.h" -#include "pybstdio.h" #include "readline.h" #include "pyexec.h" #include "i2c.h" @@ -64,6 +63,7 @@ #include "servo.h" #include "dac.h" #include "pybwlan.h" +#include "pybstdio.h" void SystemClock_Config(void); @@ -311,12 +311,10 @@ soft_reset: MP_OBJ_NEW_SMALL_INT(PYB_UART_6), MP_OBJ_NEW_SMALL_INT(115200), }; - pyb_uart_global_debug = pyb_uart_type.make_new((mp_obj_t)&pyb_uart_type, - MP_ARRAY_SIZE(args), - 0, args); + pyb_stdio_uart = pyb_uart_type.make_new((mp_obj_t)&pyb_uart_type, MP_ARRAY_SIZE(args), 0, args); } #else - pyb_uart_global_debug = NULL; + pyb_stdio_uart = NULL; #endif // Micro Python init |