From c1b3d0c629a1ebd37662914969be92319fe909e2 Mon Sep 17 00:00:00 2001 From: Ryan Date: Wed, 10 Apr 2019 17:38:16 -0700 Subject: [PATCH] samd: bug fix on uart newlines --- src/platforms/jeff/Makefile.inc | 4 ++++ src/platforms/samd/usbuart.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/platforms/jeff/Makefile.inc b/src/platforms/jeff/Makefile.inc index bdbad4de..94efa963 100644 --- a/src/platforms/jeff/Makefile.inc +++ b/src/platforms/jeff/Makefile.inc @@ -11,6 +11,10 @@ ifeq ($(CUSTOM_SER), 1) CFLAGS += -DCUSTOM_SER endif +ifeq ($(CONSOLE_NO_AUTO_CRLF), 1) +CFLAGS += -DCONSOLE_NO_AUTO_CRLF +endif + CFLAGS += -mthumb -mcpu=cortex-m0plus \ -DSAMD -DSAMD21E17 -DBLACKMAGIC -I../libopencm3/include \ -Iplatforms/samd -msoft-float -ffunction-sections -fdata-sections -MD diff --git a/src/platforms/samd/usbuart.c b/src/platforms/samd/usbuart.c index 0d9c992e..3bb48a69 100644 --- a/src/platforms/samd/usbuart.c +++ b/src/platforms/samd/usbuart.c @@ -58,7 +58,7 @@ struct { /* non blocking putc function */ static void usart_putc(char c) { -#ifndef CONSOLE_NO_AUTO_CRLF +#ifdef CONSOLE_NO_AUTO_CRLF if (c == '\n') usart_putc('\r'); #endif