File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
targets/TARGET_STM/TARGET_STM32H7 Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -53,12 +53,12 @@ static void uart_irq(UARTName uart_name)
53
53
UART_HandleTypeDef * huart = & uart_handlers [id ];
54
54
if (serial_irq_ids [id ] != 0 ) {
55
55
if (__HAL_UART_GET_FLAG (huart , UART_FLAG_TXE ) != RESET ) {
56
- if (__HAL_UART_GET_IT (huart , UART_IT_TXE ) != RESET ) {
56
+ if (__HAL_UART_GET_IT (huart , UART_IT_TXE ) != RESET && __HAL_UART_GET_IT_SOURCE ( huart , UART_IT_TXE ) ) {
57
57
irq_handler (serial_irq_ids [id ], TxIrq );
58
58
}
59
59
}
60
60
if (__HAL_UART_GET_FLAG (huart , UART_FLAG_RXNE ) != RESET ) {
61
- if (__HAL_UART_GET_IT (huart , UART_IT_RXNE ) != RESET ) {
61
+ if (__HAL_UART_GET_IT (huart , UART_IT_RXNE ) != RESET && __HAL_UART_GET_IT_SOURCE ( huart , UART_IT_RXNE ) ) {
62
62
irq_handler (serial_irq_ids [id ], RxIrq );
63
63
/* Flag has been cleared when reading the content */
64
64
}
You can’t perform that action at this time.
0 commit comments