mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-10 23:24:38 +00:00
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: kunhuahuang <huangkunhua@gmail.com>
This commit is contained in:
parent
ecb301394b
commit
85e5f5b7a7
1 changed files with 4 additions and 0 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue