summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Hellstrom <daniel@gaisler.com>2014-06-18 13:52:07 +0200
committerDaniel Cederman <cederman@gaisler.com>2014-06-27 11:03:25 +0200
commit99b34694906f0f92495f7328e8b287e6bbc0c0e8 (patch)
treeff1eede16a63715d06d9bb11353b2ef53acffd91
parent696c25b37655c06430f5bc60d1f228ef1fdac856 (diff)
LEON3: console print \r\n instead of \n\r
-rw-r--r--c/src/lib/libbsp/sparc/leon3/console/printk_support.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/c/src/lib/libbsp/sparc/leon3/console/printk_support.c b/c/src/lib/libbsp/sparc/leon3/console/printk_support.c
index 35fb4b52e5..082e9a530e 100644
--- a/c/src/lib/libbsp/sparc/leon3/console/printk_support.c
+++ b/c/src/lib/libbsp/sparc/leon3/console/printk_support.c
@@ -94,12 +94,12 @@ send:
__asm__ volatile ("nop"::); __asm__ volatile ("nop"::);
__asm__ volatile ("nop"::); __asm__ volatile ("nop"::);
}
- regs->data = (unsigned int) ch;
-
if ((ch == '\n') && do_cr_on_newline) {
- ch = '\r';
+ regs->data = (unsigned int) '\r';
+ do_cr_on_newline = 0;
goto send;
}
+ regs->data = (unsigned int) ch;
/* Wait until the character has been sent? */
if (wait_sent) {