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;