diff options
| author | Damien George <damien.p.george@gmail.com> | 2015-02-13 15:04:53 +0000 |
|---|---|---|
| committer | Damien George <damien.p.george@gmail.com> | 2015-02-13 15:04:53 +0000 |
| commit | 0b32e50365b6e36474e183a7240ccfc8fa56830a (patch) | |
| tree | 101cf35f6844c50672af4f15b5866e226bcb47d9 /teensy/main.c | |
| parent | c385a639e6316cba4ff0e7a859325807857d8f00 (diff) | |
stmhal: Make pybstdio usable by other ports, and use it.
Now all ports can use pybstdio.c to provide sys.stdin/stdout/stderr, so
long as they implement mp_hal_stdin_* and mp_hal_stdout_* functions.
Diffstat (limited to 'teensy/main.c')
| -rw-r--r-- | teensy/main.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/teensy/main.c b/teensy/main.c index 66f3d935f..4fa7aaab3 100644 --- a/teensy/main.c +++ b/teensy/main.c @@ -18,11 +18,9 @@ #include MICROPY_HAL_H #include "servo.h" -#include "usb.h" #include "led.h" #include "uart.h" #include "pin.h" -#include "pybstdio.h" extern uint32_t _heap_start; @@ -43,8 +41,8 @@ void NORETURN __fatal_error(const char *msg) { led_state(2, 1); led_state(3, 1); led_state(4, 1); - stdout_tx_strn("\nFATAL ERROR:\n", 14); - stdout_tx_strn(msg, strlen(msg)); + mp_hal_stdout_tx_strn("\nFATAL ERROR:\n", 14); + mp_hal_stdout_tx_strn(msg, strlen(msg)); for (uint i = 0;;) { led_toggle(((i++) & 3) + 1); for (volatile uint delay = 0; delay < 10000000; delay++) { |
