fix uart ore-flag clear bug

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

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 */

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);
}
}