提交 18bcd2b2 编写于 作者: B BalanceTWK

【修复】 复位后串口打印第一个字节丢失的问题 | The loss of the first byte of serial port printing after reset.

上级 27cd03d4
...@@ -100,6 +100,8 @@ static rt_err_t stm32_configure(struct rt_serial_device *serial, struct serial_c ...@@ -100,6 +100,8 @@ static rt_err_t stm32_configure(struct rt_serial_device *serial, struct serial_c
/* Enable USART */ /* Enable USART */
USART_Cmd(uart->uart_device, ENABLE); USART_Cmd(uart->uart_device, ENABLE);
USART_ClearFlag(uart->uart_device,USART_FLAG_TC);
return RT_EOK; return RT_EOK;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册