summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drivers/serial/serial_stm32.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/serial/serial_stm32.c b/drivers/serial/serial_stm32.c
index 1b22c69..8b2830b 100644
--- a/drivers/serial/serial_stm32.c
+++ b/drivers/serial/serial_stm32.c
@@ -128,6 +128,9 @@ static void stm32_serial_putc(const char c)
struct stm32_serial *usart =
(struct stm32_serial *)usart_base[USART_PORT];
+ if (c == '\n')
+ stm32_serial_putc('\r');
+
while ((readl(&usart->sr) & USART_SR_FLAG_TXE) == 0)
;
writel(c, &usart->dr);