From 3f284654ea4e847e4e9c684a732818d8226bd837 Mon Sep 17 00:00:00 2001 From: Ain <41307858+nero@users.noreply.github.com> Date: Mon, 29 Jan 2018 23:02:06 +0000 Subject: [PATCH] Define baudrate per default --- Makefile | 4 ++++ boards/nano.mk | 4 +++- boards/relaycard.mk | 2 -- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index fabc06f..914c106 100644 --- a/Makefile +++ b/Makefile @@ -11,6 +11,10 @@ ifdef BOARD include boards/$(BOARD).mk endif +ifdef BAUDRATE +CPPFLAGS += -DBAUDRATE=$(BAUDRATE) +endif + default: $(PROG).hex clean: diff --git a/boards/nano.mk b/boards/nano.mk index 6458dd4..bba1b2a 100644 --- a/boards/nano.mk +++ b/boards/nano.mk @@ -3,6 +3,8 @@ MCU_FREQ = 16000000UL CPPFLAGS += -DLED_DDR=DDRB -DLED_PORT=PORTB -DLED_PIN=5 +BAUDRATE = 56700 + AVRDUDE_TYPE = arduino AVRDUDE_TTY = /dev/ttyUSB0 -AVRDUDE_BAUD = 57600 +AVRDUDE_BAUD = 56700 diff --git a/boards/relaycard.mk b/boards/relaycard.mk index 05f03f2..53f5f57 100644 --- a/boards/relaycard.mk +++ b/boards/relaycard.mk @@ -1,7 +1,5 @@ include boards/nano.mk -CPPFLAGS += -DBAUDRATE=$(AVRDUDE_BAUD) - ifndef PROG PROG = relaycard endif