diff options
author | Daniel Friesel <derf@finalrewind.org> | 2018-07-12 10:58:56 +0200 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2018-07-12 10:58:56 +0200 |
commit | e632d5c4a0541385c37af6ef9af3373fcc100adf (patch) | |
tree | e9b59b1039fac74662d493e67891499dc7c2fafe /src/arch/arduino-nano | |
parent | 68eb5f7bf403f4a8cfc42b54b6a7fea087d34960 (diff) |
Only include hw i2c drivers if sw i2c is not active
Diffstat (limited to 'src/arch/arduino-nano')
-rw-r--r-- | src/arch/arduino-nano/Makefile.inc | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/arch/arduino-nano/Makefile.inc b/src/arch/arduino-nano/Makefile.inc index 958eda2..42b743f 100644 --- a/src/arch/arduino-nano/Makefile.inc +++ b/src/arch/arduino-nano/Makefile.inc @@ -6,7 +6,8 @@ PORT = /dev/ttyUSB0 BAUD = 57600 INCLUDES += -Iinclude/arduino-nano -COMMON_FLAGS += -mmcu=${MCU} -DF_CPU=16000000UL +COMMON_FLAGS += -mmcu=${MCU} -DF_CPU=16000000UL -DMULTIPASS_ARCH_arduino_nano +COMMON_FLAGS += -DMULTIPASS_ARCH_HAS_I2C CC = avr-gcc CXX = avr-g++ @@ -23,6 +24,11 @@ TARGETS += src/arch/arduino-nano/driver/gpio.cc TARGETS += src/arch/arduino-nano/driver/stdout.cc TARGETS += src/arch/arduino-nano/driver/uptime.cc +ifneq ($(findstring softi2c,${drivers}), ) +else ($(findstring i2c,${arch_drivers}), ) + TARGETS += src/arch/arduino-nano/driver/i2c.cc +endif + ifneq ($(findstring stdin,${arch_drivers}), ) TARGETS += src/arch/arduino-nano/driver/stdin.cc endif |