mbed
Fork of mbed-dev by
Diff: targets/TARGET_STM/TARGET_STM32L4/serial_device.c
- Revision:
- 169:e3b6fe271b81
- Parent:
- 167:e84263d55307
- Child:
- 171:19eb464bc2be
--- a/targets/TARGET_STM/TARGET_STM32L4/serial_device.c Thu Jul 06 15:42:05 2017 +0100 +++ b/targets/TARGET_STM/TARGET_STM32L4/serial_device.c Wed Jul 19 17:31:21 2017 +0100 @@ -218,19 +218,19 @@ 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_FLAG_TC); } } 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); __HAL_UART_CLEAR_FLAG(huart, UART_FLAG_RXNE); } } if (__HAL_UART_GET_FLAG(huart, UART_FLAG_ORE) != RESET) { - if (__HAL_UART_GET_IT_SOURCE(huart, UART_IT_ERR) != RESET) { + if (__HAL_UART_GET_IT(huart, UART_IT_ORE) != RESET) { volatile uint32_t tmpval = huart->Instance->RDR; // Clear ORE flag } } @@ -697,19 +697,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); } }