From cfa3b33849182b6330f9eb71e741a5e83b6a598b Mon Sep 17 00:00:00 2001 From: Huaqi Fang <578567190@qq.com> Date: Wed, 16 Dec 2020 16:41:43 +0800 Subject: [PATCH] SoC: Fix implementation of uart_read of hbirdv2 SoC Signed-off-by: Huaqi Fang <578567190@qq.com> --- SoC/hbirdv2/Common/Source/Drivers/hbirdv2_uart.c | 1 + 1 file changed, 1 insertion(+) diff --git a/SoC/hbirdv2/Common/Source/Drivers/hbirdv2_uart.c b/SoC/hbirdv2/Common/Source/Drivers/hbirdv2_uart.c index 2f5011b..4f2b820 100644 --- a/SoC/hbirdv2/Common/Source/Drivers/hbirdv2_uart.c +++ b/SoC/hbirdv2/Common/Source/Drivers/hbirdv2_uart.c @@ -87,6 +87,7 @@ uint8_t uart_read(UART_TypeDef *uart) return -1; } + while ((uart->LSR & 0x1) == 0); reg = uart->RBR; return (uint8_t)(reg & 0xFF);