提交 63a13906 编写于 作者: Gevin_Cod's avatar Gevin_Cod

fix uart ore-flag clear bug

上级 3de51fe2
...@@ -184,7 +184,7 @@ void USART1_IRQHandler(void) ...@@ -184,7 +184,7 @@ void USART1_IRQHandler(void)
} }
if (USART_GetFlagStatus(uart->uart_device, USART_FLAG_ORE) == SET) if (USART_GetFlagStatus(uart->uart_device, USART_FLAG_ORE) == SET)
{ {
stm32_getc(&serial1); USART_ReceiveData(uart->uart_device);
} }
/* leave interrupt */ /* leave interrupt */
rt_interrupt_leave(); rt_interrupt_leave();
...@@ -221,7 +221,7 @@ void USART2_IRQHandler(void) ...@@ -221,7 +221,7 @@ void USART2_IRQHandler(void)
} }
if (USART_GetFlagStatus(uart->uart_device, USART_FLAG_ORE) == SET) if (USART_GetFlagStatus(uart->uart_device, USART_FLAG_ORE) == SET)
{ {
stm32_getc(&serial2); USART_ReceiveData(uart->uart_device);
} }
/* leave interrupt */ /* leave interrupt */
......
...@@ -310,7 +310,7 @@ static void uart_isr(struct rt_serial_device *serial) ...@@ -310,7 +310,7 @@ static void uart_isr(struct rt_serial_device *serial)
} }
if (USART_GetFlagStatus(uart->uart_device, USART_FLAG_ORE) == SET) if (USART_GetFlagStatus(uart->uart_device, USART_FLAG_ORE) == SET)
{ {
stm32_getc(serial); USART_ReceiveData(uart->uart_device);
} }
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册