summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/debug_uart.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/debug_uart.h b/include/debug_uart.h
index 5d5349bbd2..0d640b96e7 100644
--- a/include/debug_uart.h
+++ b/include/debug_uart.h
@@ -117,13 +117,15 @@ void printhex8(uint value);
#define DEBUG_UART_FUNCS \
void printch(int ch) \
{ \
+ if (ch == '\n') \
+ _debug_uart_putc('\r'); \
_debug_uart_putc(ch); \
} \
\
void printascii(const char *str) \
{ \
while (*str) \
- _debug_uart_putc(*str++); \
+ printch(*str++); \
} \
\
static inline void printhex1(uint digit) \
OpenPOWER on IntegriCloud