stm32: Add missing UART4 IRQ handler

This commit is contained in:
Desuuuu 2022-05-22 12:07:17 +02:00
parent 90ebed1fe4
commit b84208828a
No known key found for this signature in database
GPG Key ID: 85943F4B2C2CE0DC
1 changed files with 21 additions and 0 deletions

View File

@ -169,6 +169,27 @@ USART3_IRQHandler(void)
}
DECL_ARMCM_IRQ(USART3_IRQHandler, USART3_IRQn);
#if CONFIG_MACH_STM32H7
void
UART4_IRQHandler(void)
{
uint32_t sr = USART_SR(UART4);
if (sr & (USART_SR_RXNE | USART_SR_ORE))
serial_rx_byte(4, USART_RDR(UART4));
if (sr & USART_SR_TXE && UART4->CR1 & USART_CR1_TXEIE) {
uint8_t data;
int ret = serial_get_tx_byte(3, &data);
if (ret)
UART4->CR1 = CR1_FLAGS;
else
USART_TDR(UART4) = data;
}
}
DECL_ARMCM_IRQ(UART4_IRQHandler, UART4_IRQn);
#endif // CONFIG_MACH_STM32H7
#endif // USART3
struct uart_config