[BSP]Add serial receive overflow interrupt to stm32f10x ISR.

This commit is contained in:
armink 2014-09-13 11:53:21 +08:00
parent 04c4e5d9a4
commit 77b214f1bc
1 changed files with 21 additions and 10 deletions

View File

@ -163,7 +163,10 @@ void USART1_IRQHandler(void)
/* clear interrupt */ /* clear interrupt */
USART_ClearITPendingBit(uart->uart_device, USART_IT_TC); USART_ClearITPendingBit(uart->uart_device, USART_IT_TC);
} }
if (USART_GetFlagStatus(uart->uart_device, USART_FLAG_ORE) == SET)
{
stm32_getc(&serial1);
}
/* leave interrupt */ /* leave interrupt */
rt_interrupt_leave(); rt_interrupt_leave();
} }
@ -197,6 +200,10 @@ void USART2_IRQHandler(void)
/* clear interrupt */ /* clear interrupt */
USART_ClearITPendingBit(uart->uart_device, USART_IT_TC); USART_ClearITPendingBit(uart->uart_device, USART_IT_TC);
} }
if (USART_GetFlagStatus(uart->uart_device, USART_FLAG_ORE) == SET)
{
stm32_getc(&serial2);
}
/* leave interrupt */ /* leave interrupt */
rt_interrupt_leave(); rt_interrupt_leave();
@ -231,6 +238,10 @@ void USART3_IRQHandler(void)
/* clear interrupt */ /* clear interrupt */
USART_ClearITPendingBit(uart->uart_device, USART_IT_TC); USART_ClearITPendingBit(uart->uart_device, USART_IT_TC);
} }
if (USART_GetFlagStatus(uart->uart_device, USART_FLAG_ORE) == SET)
{
stm32_getc(&serial3);
}
/* leave interrupt */ /* leave interrupt */
rt_interrupt_leave(); rt_interrupt_leave();