Forked.
Fork of mbed-dev by
Diff: targets/TARGET_STM/TARGET_STM32F3/serial_device.c
- Revision:
- 169:e3b6fe271b81
- Parent:
- 167:e84263d55307
- Child:
- 170:19eb464bc2be
diff -r 9672193075cf -r e3b6fe271b81 targets/TARGET_STM/TARGET_STM32F3/serial_device.c --- a/targets/TARGET_STM/TARGET_STM32F3/serial_device.c Thu Jul 06 15:42:05 2017 +0100 +++ b/targets/TARGET_STM/TARGET_STM32F3/serial_device.c Wed Jul 19 17:31:21 2017 +0100 @@ -211,20 +211,20 @@ if (serial_irq_ids[id] != 0) { if (__HAL_UART_GET_FLAG(huart, UART_FLAG_TC) != RESET) { - if (__HAL_UART_GET_IT_SOURCE(huart, UART_IT_TC) != RESET) { + if (__HAL_UART_GET_IT(huart, UART_IT_TC) != RESET) { irq_handler(serial_irq_ids[id], TxIrq); __HAL_UART_CLEAR_FLAG(huart, UART_CLEAR_TCF); } } if (__HAL_UART_GET_FLAG(huart, UART_FLAG_RXNE) != RESET) { - if (__HAL_UART_GET_IT_SOURCE(huart, UART_IT_RXNE) != RESET) { + if (__HAL_UART_GET_IT(huart, UART_IT_RXNE) != RESET) { irq_handler(serial_irq_ids[id], RxIrq); volatile uint32_t tmpval = huart->Instance->RDR; // Clear RXNE flag UNUSED(tmpval); } } if (__HAL_UART_GET_FLAG(huart, UART_FLAG_ORE) != RESET) { - if (__HAL_UART_GET_IT_SOURCE(huart, UART_IT_ORE) != RESET) { + if (__HAL_UART_GET_IT(huart, UART_IT_ORE) != RESET) { __HAL_UART_CLEAR_FLAG(huart, UART_CLEAR_OREF); } } @@ -679,19 +679,19 @@ // Handle error events if (__HAL_UART_GET_FLAG(huart, UART_FLAG_PE) != RESET) { - if (__HAL_UART_GET_IT_SOURCE(huart, USART_IT_ERR) != RESET) { + if (__HAL_UART_GET_IT(huart, UART_IT_PE) != RESET) { return_event |= (SERIAL_EVENT_RX_PARITY_ERROR & obj_s->events); } } if (__HAL_UART_GET_FLAG(huart, UART_FLAG_FE) != RESET) { - if (__HAL_UART_GET_IT_SOURCE(huart, USART_IT_ERR) != RESET) { + if (__HAL_UART_GET_IT(huart, UART_IT_FE) != RESET) { return_event |= (SERIAL_EVENT_RX_FRAMING_ERROR & obj_s->events); } } if (__HAL_UART_GET_FLAG(huart, UART_FLAG_ORE) != RESET) { - if (__HAL_UART_GET_IT_SOURCE(huart, USART_IT_ERR) != RESET) { + if (__HAL_UART_GET_IT(huart, UART_IT_ORE) != RESET) { return_event |= (SERIAL_EVENT_RX_OVERRUN_ERROR & obj_s->events); } }