diff --git a/bsp/stm32f107/drivers/usart.c b/bsp/stm32f107/drivers/usart.c index 6380f03bdf..89528d54bc 100644 --- a/bsp/stm32f107/drivers/usart.c +++ b/bsp/stm32f107/drivers/usart.c @@ -184,7 +184,7 @@ void USART1_IRQHandler(void) } if (USART_GetFlagStatus(uart->uart_device, USART_FLAG_ORE) == SET) { - stm32_getc(&serial1); + USART_ReceiveData(uart->uart_device); } /* leave interrupt */ rt_interrupt_leave(); @@ -221,7 +221,7 @@ void USART2_IRQHandler(void) } if (USART_GetFlagStatus(uart->uart_device, USART_FLAG_ORE) == SET) { - stm32_getc(&serial2); + USART_ReceiveData(uart->uart_device); } /* leave interrupt */ diff --git a/bsp/stm32f40x/drivers/usart.c b/bsp/stm32f40x/drivers/usart.c index 0838d214e2..03d8c23235 100644 --- a/bsp/stm32f40x/drivers/usart.c +++ b/bsp/stm32f40x/drivers/usart.c @@ -310,7 +310,7 @@ static void uart_isr(struct rt_serial_device *serial) } if (USART_GetFlagStatus(uart->uart_device, USART_FLAG_ORE) == SET) { - stm32_getc(serial); + USART_ReceiveData(uart->uart_device); } }