提交 12ec87d6 编写于 作者: zyk6271's avatar zyk6271 提交者: guo

修改串口V2的putc顺序

1.顺序修改回V1,保证每次都是当前数据发送完才跳出
上级 575fe18e
...@@ -302,9 +302,9 @@ static int stm32_putc(struct rt_serial_device *serial, char c) ...@@ -302,9 +302,9 @@ static int stm32_putc(struct rt_serial_device *serial, char c)
RT_ASSERT(serial != RT_NULL); RT_ASSERT(serial != RT_NULL);
uart = rt_container_of(serial, struct stm32_uart, serial); uart = rt_container_of(serial, struct stm32_uart, serial);
while (__HAL_UART_GET_FLAG(&(uart->handle), UART_FLAG_TC) == RESET);
UART_INSTANCE_CLEAR_FUNCTION(&(uart->handle), UART_FLAG_TC); UART_INSTANCE_CLEAR_FUNCTION(&(uart->handle), UART_FLAG_TC);
UART_SET_TDR(&uart->handle, c); UART_SET_TDR(&uart->handle, c);
while (__HAL_UART_GET_FLAG(&(uart->handle), UART_FLAG_TC) == RESET);
return 1; return 1;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册