提交 73d39e89 编写于 作者: B BalanceTWK

【bsp/stm32f10x】 修复串口驱动 | Fixed serial port drivers

上级 538923d3
......@@ -100,8 +100,6 @@ static rt_err_t stm32_configure(struct rt_serial_device *serial, struct serial_c
/* Enable USART */
USART_Cmd(uart->uart_device, ENABLE);
USART_ClearFlag(uart->uart_device,USART_FLAG_TC);
return RT_EOK;
}
......@@ -159,6 +157,7 @@ static int stm32_putc(struct rt_serial_device *serial, char c)
}
else
{
USART_ClearFlag(uart->uart_device,USART_FLAG_TC);
uart->uart_device->DR = c;
while (!(uart->uart_device->SR & USART_FLAG_TC));
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册