aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--firmware/Makefile4
-rw-r--r--firmware/firmware.c4
2 files changed, 5 insertions, 3 deletions
diff --git a/firmware/Makefile b/firmware/Makefile
index 935980b..f80d362 100644
--- a/firmware/Makefile
+++ b/firmware/Makefile
@@ -5,7 +5,6 @@ NOMAN=
MCU_TARGET= atmega328p
F_CPU= 20000000
-BAUD= 9600
ORG= 0x7e00 # Table 27-13, 4 Pages 265 words * 2
# You should not have to change anything below here.
@@ -15,8 +14,7 @@ OBJCOPY= avr-objcopy
OBJDUMP= avr-objdump
SIZE= avr-size
-CFLAGS= -mmcu=${MCU_TARGET} -Wall -Os \
- -DF_CPU=${F_CPU} -DPRESCALE=${PRESCALE} -DBAUD=${BAUD}
+CFLAGS= -mmcu=${MCU_TARGET} -Wall -Os -DF_CPU=${F_CPU}
LDFLAGS= -mmcu=${MCU_TARGET} \
-Wl,-Map,${PROG}.map,--section-start=.text=${ORG}
diff --git a/firmware/firmware.c b/firmware/firmware.c
index f423d70..610c2d5 100644
--- a/firmware/firmware.c
+++ b/firmware/firmware.c
@@ -15,6 +15,10 @@
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
+#ifndef BAUD
+#define BAUD 9600
+#endif
+
#include <avr/io.h>
#include <avr/boot.h>
#include <avr/wdt.h>