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.
diff --git a/stmhal/printf.c b/stmhal/printf.c
index f7a4f10..7af4f65 100644
--- a/stmhal/printf.c
+++ b/stmhal/printf.c
@@ -30,14 +30,14 @@
#include "py/obj.h"
#include "py/pfenv.h"
-#include "pybstdio.h"
+#include MICROPY_HAL_H
#if MICROPY_PY_BUILTINS_FLOAT
#include "py/formatfloat.h"
#endif
STATIC void stdout_print_strn(void *dummy_env, const char *str, mp_uint_t len) {
- stdout_tx_strn_cooked(str, len);
+ mp_hal_stdout_tx_strn_cooked(str, len);
}
STATIC const pfenv_t pfenv_stdout = {0, stdout_print_strn};