diff options
Diffstat (limited to 'src/arch/arduino-nano')
-rw-r--r-- | src/arch/arduino-nano/Makefile.inc | 9 | ||||
-rw-r--r-- | src/arch/arduino-nano/driver/timer.cc | 3 |
2 files changed, 12 insertions, 0 deletions
diff --git a/src/arch/arduino-nano/Makefile.inc b/src/arch/arduino-nano/Makefile.inc index 18a6563..d4d5be7 100644 --- a/src/arch/arduino-nano/Makefile.inc +++ b/src/arch/arduino-nano/Makefile.inc @@ -4,6 +4,7 @@ MCU = atmega328p PORT = /dev/ttyUSB0 BAUD = 57600 +COMMON_FLAGS += -Werror=overflow COMMON_FLAGS += -mmcu=${MCU} -DF_CPU=16000000UL -DMULTIPASS_ARCH_arduino_nano COMMON_FLAGS += -flto COMMON_FLAGS += -DMULTIPASS_ARCH_HAS_I2C @@ -32,10 +33,18 @@ ifneq ($(findstring stdin,${arch_drivers}), ) TARGETS += src/arch/arduino-nano/driver/stdin.cc endif +ifneq ($(findstring timer,${arch_drivers}), ) + TARGETS += src/arch/arduino-nano/driver/timer.cc +endif + ifneq (${i2c_freq}, ) COMMON_FLAGS += -DF_I2C=${i2c_freq} endif +ifneq (${timer_freq}, ) + COMMON_FLAGS += -DF_TIMER=${timer_freq} +endif + OBJECTS = ${TARGETS:.cc=.o} .cc.o: diff --git a/src/arch/arduino-nano/driver/timer.cc b/src/arch/arduino-nano/driver/timer.cc new file mode 100644 index 0000000..4f2d6d1 --- /dev/null +++ b/src/arch/arduino-nano/driver/timer.cc @@ -0,0 +1,3 @@ +#include "driver/timer.h" + +Timer timer; |