From e632d5c4a0541385c37af6ef9af3373fcc100adf Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Thu, 12 Jul 2018 10:58:56 +0200 Subject: Only include hw i2c drivers if sw i2c is not active --- src/arch/arduino-nano/Makefile.inc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/arch/arduino-nano') 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 -- cgit v1.2.3