summaryrefslogtreecommitdiff
path: root/nuttx/arch/pjrc-8051/src/up_putc.c
diff options
context:
space:
mode:
Diffstat (limited to 'nuttx/arch/pjrc-8051/src/up_putc.c')
-rw-r--r--nuttx/arch/pjrc-8051/src/up_putc.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/nuttx/arch/pjrc-8051/src/up_putc.c b/nuttx/arch/pjrc-8051/src/up_putc.c
index d2e486829..95f25aa3b 100644
--- a/nuttx/arch/pjrc-8051/src/up_putc.c
+++ b/nuttx/arch/pjrc-8051/src/up_putc.c
@@ -48,7 +48,7 @@
static void _up_putc(int ch) __naked
{
-#if 0
+#if 1
ch; /* To avoid unreferenced argument warning */
_asm
mov a, dpl
@@ -73,6 +73,10 @@ cout: jnb ti, cout
int up_putc(int ch)
{
_up_putc(ch);
+ if (ch == '\n')
+ {
+ _up_putc('\r');
+ }
return ch;
}