From affe5574ecb29071620d101d5995a7eab68a45da Mon Sep 17 00:00:00 2001 From: KY-zhang-X Date: Thu, 29 Sep 2022 11:55:58 +0800 Subject: [PATCH] hal_uart: add some details --- platform/hal/st/stm32l4xx/src/tos_hal_uart.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/platform/hal/st/stm32l4xx/src/tos_hal_uart.c b/platform/hal/st/stm32l4xx/src/tos_hal_uart.c index b1d34769..4b3c31ee 100644 --- a/platform/hal/st/stm32l4xx/src/tos_hal_uart.c +++ b/platform/hal/st/stm32l4xx/src/tos_hal_uart.c @@ -20,6 +20,8 @@ __API__ int tos_hal_uart_init(hal_uart_t *uart, hal_uart_port_t port) } else if (port == HAL_UART_PORT_3) { uart->private_uart = &huart3; MX_USART3_UART_Init(); + } else { + return -1; } return 0;