aboutsummaryrefslogtreecommitdiff
path: root/stmhal/mphal.h
diff options
context:
space:
mode:
authorDamien George2015-02-13 15:04:53 +0000
committerDamien George2015-02-13 15:04:53 +0000
commit0b32e50365b6e36474e183a7240ccfc8fa56830a (patch)
tree101cf35f6844c50672af4f15b5866e226bcb47d9 /stmhal/mphal.h
parentc385a639e6316cba4ff0e7a859325807857d8f00 (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 'stmhal/mphal.h')
-rw-r--r--stmhal/mphal.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/stmhal/mphal.h b/stmhal/mphal.h
index fb567d141..b705facc4 100644
--- a/stmhal/mphal.h
+++ b/stmhal/mphal.h
@@ -11,3 +11,8 @@ extern const byte mp_hal_status_to_errno_table[4];
NORETURN void mp_hal_raise(HAL_StatusTypeDef status);
void mp_hal_set_interrupt_char(int c); // -1 to disable
+
+int mp_hal_stdin_rx_chr(void);
+void mp_hal_stdout_tx_str(const char *str);
+void mp_hal_stdout_tx_strn(const char *str, mp_uint_t len);
+void mp_hal_stdout_tx_strn_cooked(const char *str, mp_uint_t len);