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