samd: bug fix on uart newlines

This commit is contained in:
Ryan 2019-04-10 17:38:16 -07:00
parent 94238fd95b
commit c1b3d0c629
2 changed files with 5 additions and 1 deletions

View File

@ -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

View File

@ -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