STM32F0 uart irq: test IT flags for usart3/4

pull/5907/head
bcostm 2018-01-25 11:23:53 +01:00
parent 18659ab16b
commit 7ff1cf52c0
1 changed files with 6 additions and 2 deletions

View File

@ -122,10 +122,14 @@ static void uart3_8_irq(void)
#endif
#else // TARGET_STM32F070RB, TARGET_STM32F072RB
#if defined(USART3_BASE)
uart_irq(2);
if (USART3->ISR & (UART_FLAG_TXE | UART_FLAG_RXNE | UART_FLAG_ORE)) {
uart_irq(2);
}
#endif
#if defined(USART4_BASE)
uart_irq(3);
if (USART4->ISR & (UART_FLAG_TXE | UART_FLAG_RXNE | UART_FLAG_ORE)) {
uart_irq(3);
}
#endif
#endif
}