From 0d58f6ba5e12bb7c00c04d752baf64a8c6c38726 Mon Sep 17 00:00:00 2001 From: "Peter D. Gray" Date: Tue, 17 Jul 2018 14:22:35 -0400 Subject: [PATCH] stm32/mphalport: Make mp_hal_stdin_rx_chr/stdout_tx_strn weakly linked. To allow for customizations. --- ports/stm32/mphalport.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/stm32/mphalport.c b/ports/stm32/mphalport.c index a2f8e412ee..206221721b 100644 --- a/ports/stm32/mphalport.c +++ b/ports/stm32/mphalport.c @@ -19,7 +19,7 @@ NORETURN void mp_hal_raise(HAL_StatusTypeDef status) { mp_raise_OSError(mp_hal_status_to_errno_table[status]); } -int mp_hal_stdin_rx_chr(void) { +MP_WEAK int mp_hal_stdin_rx_chr(void) { for (;;) { #if 0 #ifdef USE_HOST_MODE @@ -52,7 +52,7 @@ void mp_hal_stdout_tx_str(const char *str) { mp_hal_stdout_tx_strn(str, strlen(str)); } -void mp_hal_stdout_tx_strn(const char *str, size_t len) { +MP_WEAK void mp_hal_stdout_tx_strn(const char *str, size_t len) { if (MP_STATE_PORT(pyb_stdio_uart) != NULL) { uart_tx_strn(MP_STATE_PORT(pyb_stdio_uart), str, len); }