未验证 提交 70cb6724 编写于 作者: B Bernard Xiong 提交者: GitHub

Merge pull request #2048 from greedyhao/master

[bsp/stm32f7-disco] 修复串口驱动编译报错
......@@ -106,8 +106,9 @@ static int drv_putc(struct rt_serial_device *serial, char c)
struct drv_uart *uart;
RT_ASSERT(serial != RT_NULL);
uart = (struct drv_uart *)serial->parent.user_data;
__HAL_UART_CLEAR_FLAG(&(uart->UartHandle), UART_FLAG_TC);
__HAL_UART_CLEAR_IT(&(uart->UartHandle), UART_CLEAR_TCF);
uart->UartHandle.Instance->TDR = c;
while (__HAL_UART_GET_FLAG(&(uart->UartHandle), UART_FLAG_TC) == RESET);
return 1;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册