提交 85e5f5b7 编写于 作者: K kunhuahuang 提交者: Tom Rini

stm32f4: fix serial output

This patch fix the serial output.
The source is from Kamil Lulko's "stm32f429-discovery board support"

Thanks, Varcain. I learned a lot.
Signed-off-by: Nkunhuahuang <huangkunhua@gmail.com>
上级 ecb30139
......@@ -81,6 +81,10 @@ static int stm32_serial_getc(void)
static void stm32_serial_putc(const char c)
{
struct stm32_serial *usart = (struct stm32_serial *)USART_BASE;
if (c == '\n')
stm32_serial_putc('\r');
while ((readl(&usart->sr) & USART_SR_FLAG_TXE) == 0)
;
writel(c, &usart->dr);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册