fix uart ore-flag clear bug

This commit is contained in:
guochuangjian committed 2018-08-05 15:25:31 +08:00
1 parent 3de51fe256
commit 63a13906cc
2 files changed
+3 -3

No files matched your search

+2 -2
View File
@@ -184,7 +184,7 @@ void USART1_IRQHandler(void)
}
if (USART_GetFlagStatus(uart->uart_device, USART_FLAG_ORE) == SET)
{
stm32_getc(&serial1);
USART_ReceiveData(uart->uart_device);
}
/* leave interrupt */
rt_interrupt_leave();
@@ -221,7 +221,7 @@ void USART2_IRQHandler(void)
}
if (USART_GetFlagStatus(uart->uart_device, USART_FLAG_ORE) == SET)
{
stm32_getc(&serial2);
USART_ReceiveData(uart->uart_device);
}
/* leave interrupt */
+1 -1
View File
@@ -310,7 +310,7 @@ static void uart_isr(struct rt_serial_device *serial)
}
if (USART_GetFlagStatus(uart->uart_device, USART_FLAG_ORE) == SET)
{
stm32_getc(serial);
USART_ReceiveData(uart->uart_device);
}
}