From ae66e67dee1140420c6191715cb5437cb173e781 Mon Sep 17 00:00:00 2001 From: winfenggao Date: Fri, 19 Aug 2022 10:24:43 +0800 Subject: [PATCH] =?UTF-8?q?bug=EF=BC=9A=20UART=5FFLAG=5FTC=20=E4=B8=8D?= =?UTF-8?q?=E8=83=BD=E5=9C=A8=E4=B8=AD=E6=96=AD=E9=87=8CCLEAR;=20=E5=9B=A0?= =?UTF-8?q?=E4=B8=BA=E5=87=BD=E6=95=B0=20static=20int=20stm32=5Fputc(struc?= =?UTF-8?q?t=20rt=5Fserial=5Fdevice=20*serial,=20char=20c)=E9=87=8C?= =?UTF-8?q?=E5=8F=91=E9=80=81=E5=AE=8C=E6=88=90=E5=90=8E=20while=20?= =?UTF-8?q?=E5=BE=AA=E7=8E=AF=E7=AD=89=E8=BF=99=E4=B8=AA=E6=A0=87=E5=BF=97?= =?UTF-8?q?=E9=80=80=E5=87=BA=EF=BC=8C=E4=B8=AD=E6=96=AD=E6=9C=8D=E5=8A=A1?= =?UTF-8?q?=E5=87=BD=E6=95=B0CLEAR=E5=90=8E=EF=BC=8C=E6=AD=A4=E5=A4=84?= =?UTF-8?q?=E8=BF=9B=E5=85=A5=E6=AD=BB=E5=BE=AA=E7=8E=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bsp/stm32/libraries/HAL_Drivers/drv_usart.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/bsp/stm32/libraries/HAL_Drivers/drv_usart.c b/bsp/stm32/libraries/HAL_Drivers/drv_usart.c index 97de96b22d..2f60d7edfc 100644 --- a/bsp/stm32/libraries/HAL_Drivers/drv_usart.c +++ b/bsp/stm32/libraries/HAL_Drivers/drv_usart.c @@ -457,10 +457,6 @@ static void uart_isr(struct rt_serial_device *serial) { UART_INSTANCE_CLEAR_FUNCTION(&(uart->handle), UART_FLAG_TXE); } - if (__HAL_UART_GET_FLAG(&(uart->handle), UART_FLAG_TC) != RESET) - { - UART_INSTANCE_CLEAR_FUNCTION(&(uart->handle), UART_FLAG_TC); - } if (__HAL_UART_GET_FLAG(&(uart->handle), UART_FLAG_RXNE) != RESET) { UART_INSTANCE_CLEAR_FUNCTION(&(uart->handle), UART_FLAG_RXNE); -- GitLab