fixed bug #635354
[fw/sdcc] / device / lib / ser_ir_cts_rts.c
index 9be6d7204764311ced5ba5d705e09039b9c74f94..5b127c586d1b895493eb82ff1784cf92c22e631c 100755 (executable)
@@ -169,7 +169,7 @@ void ser_puts(unsigned char *s)
 {
   unsigned char c;
   while (c= *s++) {
-    if (c == LF) ser_putc(CR);
+    if (c == '\n') ser_putc('\r');
     ser_putc (c);
   }
 }
@@ -182,9 +182,9 @@ void ser_gets(unsigned char *s, unsigned char len)
   pos = 0;
   while (pos <= len) {
     c = ser_getc();
-    if (c == CR) continue;        // discard CR's
+    if (c == '\r') continue;        // discard CR's
     s[pos++] = c;
-    if (c == LF) break;           // NL terminates
+    if (c == '\n') break;           // NL terminates
   }
   s[pos] = '\0';                  // terminate string
 }
@@ -197,4 +197,4 @@ unsigned char ser_can_xmt(void)
 unsigned char ser_can_rcv(void)
 {
   return rxcnt;
-}
\ No newline at end of file
+}