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