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 | |
parent | 68eb5f7bf403f4a8cfc42b54b6a7fea087d34960 (diff) |
Only include hw i2c drivers if sw i2c is not active
Diffstat (limited to 'src')
-rw-r--r-- | src/app/i2cdetect/Makefile.inc | 2 | ||||
-rw-r--r-- | src/arch/arduino-nano/Makefile.inc | 8 | ||||
-rw-r--r-- | src/arch/esp8266/Makefile.inc | 2 | ||||
-rw-r--r-- | src/arch/msp430fr5969lp/Makefile.inc | 6 |
4 files changed, 14 insertions, 4 deletions
diff --git a/src/app/i2cdetect/Makefile.inc b/src/app/i2cdetect/Makefile.inc new file mode 100644 index 0000000..43a8bae --- /dev/null +++ b/src/app/i2cdetect/Makefile.inc @@ -0,0 +1,2 @@ +arch_drivers += ,i2c +drivers += ,lm75 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 diff --git a/src/arch/esp8266/Makefile.inc b/src/arch/esp8266/Makefile.inc index 82755ce..33df2b2 100644 --- a/src/arch/esp8266/Makefile.inc +++ b/src/arch/esp8266/Makefile.inc @@ -16,7 +16,7 @@ ifeq (${aspectc}, 1) endif INCLUDES += -Iinclude/esp8266 -I${SDK_BASE}/include -COMMON_FLAGS += -nostdlib -mlongcalls -D__ets__ -DICACHE_FLASH +COMMON_FLAGS += -nostdlib -mlongcalls -D__ets__ -DICACHE_FLASH -DMULTIPASS_ARCH_esp8266 CXXFLAGS = -std=c++11 LDFLAGS += -nostdlib -Wl,--no-check-sections -u call_user_start -Wl,-static diff --git a/src/arch/msp430fr5969lp/Makefile.inc b/src/arch/msp430fr5969lp/Makefile.inc index bb91973..066a152 100644 --- a/src/arch/msp430fr5969lp/Makefile.inc +++ b/src/arch/msp430fr5969lp/Makefile.inc @@ -4,7 +4,8 @@ CPU = 430x MCU = msp430fr5969 INCLUDES += -Iinclude/msp430fr5969lp -I/opt/msp430/ti/gcc/include -COMMON_FLAGS += -mcpu=${CPU} -mmcu=${MCU} +COMMON_FLAGS += -mcpu=${CPU} -mmcu=${MCU} -DMULTIPASS_ARCH_msp430fr5969lp +COMMON_FLAGS += -DMULTIPASS_ARCH_HAS_I2C CC = /opt/msp430/ti/gcc/bin/msp430-elf-gcc CXX = /opt/msp430/ti/gcc/bin/msp430-elf-g++ @@ -28,7 +29,8 @@ ifneq ($(findstring stdin,${arch_drivers}), ) TARGETS += src/arch/msp430fr5969lp/driver/stdin.cc endif -ifneq ($(findstring i2c,${arch_drivers}), ) +ifneq ($(findstring softi2c,${drivers}), ) +else ($(findstring i2c,${arch_drivers}), ) TARGETS += src/arch/msp430fr5969lp/driver/i2c.cc endif |