diff --git a/firmware/src/Makefile b/firmware/src/Makefile index f792d8e..6c80b72 100644 --- a/firmware/src/Makefile +++ b/firmware/src/Makefile @@ -2,6 +2,7 @@ MCU := atmega328p PROGRAMMER := usbasp +SPEED := 8000000UL TARGET := main.hex BIN := main.elf @@ -13,7 +14,7 @@ OBJCOPY := avr-objcopy SIZE := avr-size AVRDUDE := avrdude -CFLAGS := -mmcu=$(MCU) -Os -Wall -Werror -Wextra +CFLAGS := -mmcu=$(MCU) -D F_CPU=$(SPEED) -Os -Wall -Werror -Wextra all: $(TARGET) diff --git a/firmware/src/main.c b/firmware/src/main.c index 97b51f2..f70b58d 100644 --- a/firmware/src/main.c +++ b/firmware/src/main.c @@ -1,5 +1,3 @@ -#define F_CPU 8000000UL - #include #include #include