summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2021-12-31 15:30:52 +0100
committerDaniel Friesel <derf@finalrewind.org>2021-12-31 15:30:52 +0100
commit44c73e7330aaa7d1411a8fd48b85d1b95bdc2b6b (patch)
tree84d3efb8c107ac9410af3602e3035f8e4125b62d /src
parentd3e2b724b4f924b9839f2896db4455c2564cf29d (diff)
Use CONFIG_meta_driver_hardware_i2c instead of MULTIPASS_ARCH_HAS_I2C
Diffstat (limited to 'src')
-rw-r--r--src/app/bme680-max44009-logger/main.cc2
-rw-r--r--src/app/button-and-motion-logger/main.cc4
-rw-r--r--src/app/luxlog/main.cc4
-rw-r--r--src/app/mpu9250_motionlog/main.cc4
-rw-r--r--src/app/posix-argv-to-ssd1306/main.cc4
-rw-r--r--src/app/posix-stdin-to-ssd1306/main.cc4
-rw-r--r--src/app/ssd1306test/main.cc4
-rw-r--r--src/arch/arduino-nano/Makefile.inc1
-rw-r--r--src/arch/atmega2560/Makefile.inc1
-rw-r--r--src/arch/blinkenrocket/Makefile.inc1
-rw-r--r--src/arch/lora32u4ii/Makefile.inc1
-rw-r--r--src/arch/msp430fr5969lp/Makefile.inc1
-rw-r--r--src/arch/msp430fr5994lp/Makefile.inc1
-rw-r--r--src/arch/posix/Makefile.inc1
-rw-r--r--src/driver/am2320.cc4
-rw-r--r--src/driver/bme680_util.cc4
-rw-r--r--src/driver/ccs811.cc4
-rw-r--r--src/driver/ds2482.cc4
-rw-r--r--src/driver/eeprom24lc64.cc4
-rw-r--r--src/driver/hdc1080.cc4
-rw-r--r--src/driver/lm75.cc4
-rw-r--r--src/driver/max44009.cc4
-rw-r--r--src/driver/mmsimple.cc4
-rw-r--r--src/driver/mmsubstate.cc4
-rw-r--r--src/driver/s5851a.cc4
-rw-r--r--src/driver/scd4x.cc4
-rw-r--r--src/driver/ssd1306.cc4
-rw-r--r--src/driver/tsl2591.cc4
28 files changed, 41 insertions, 48 deletions
diff --git a/src/app/bme680-max44009-logger/main.cc b/src/app/bme680-max44009-logger/main.cc
index ac742d8..3634d30 100644
--- a/src/app/bme680-max44009-logger/main.cc
+++ b/src/app/bme680-max44009-logger/main.cc
@@ -6,7 +6,7 @@
#include "arch.h"
#include "driver/gpio.h"
#include "driver/stdout.h"
-#if defined(MULTIPASS_ARCH_HAS_I2C) && !defined(CONFIG_driver_softi2c)
+#if defined(CONFIG_meta_driver_hardware_i2c)
#include "driver/i2c.h"
#else
#include "driver/soft_i2c.h"
diff --git a/src/app/button-and-motion-logger/main.cc b/src/app/button-and-motion-logger/main.cc
index ac60205..2f2405e 100644
--- a/src/app/button-and-motion-logger/main.cc
+++ b/src/app/button-and-motion-logger/main.cc
@@ -6,9 +6,9 @@
#include "arch.h"
#include "driver/gpio.h"
#include "driver/stdout.h"
-#if defined(MULTIPASS_ARCH_HAS_I2C) && !defined(CONFIG_driver_softi2c)
+#if defined(CONFIG_meta_driver_hardware_i2c)
#include "driver/i2c.h"
-#else
+#elif defined(CONFIG_driver_softi2c)
#include "driver/soft_i2c.h"
#endif
#include "driver/adc.h"
diff --git a/src/app/luxlog/main.cc b/src/app/luxlog/main.cc
index 7b17462..50aaa90 100644
--- a/src/app/luxlog/main.cc
+++ b/src/app/luxlog/main.cc
@@ -6,9 +6,9 @@
#include "arch.h"
#include "driver/gpio.h"
#include "driver/stdout.h"
-#if defined(MULTIPASS_ARCH_HAS_I2C) && !defined(CONFIG_driver_softi2c)
+#if defined(CONFIG_meta_driver_hardware_i2c)
#include "driver/i2c.h"
-#else
+#elif defined(CONFIG_driver_softi2c)
#include "driver/soft_i2c.h"
#endif
#include "driver/max44009.h"
diff --git a/src/app/mpu9250_motionlog/main.cc b/src/app/mpu9250_motionlog/main.cc
index 5000732..0bf6fee 100644
--- a/src/app/mpu9250_motionlog/main.cc
+++ b/src/app/mpu9250_motionlog/main.cc
@@ -6,9 +6,9 @@
#include "arch.h"
#include "driver/gpio.h"
#include "driver/stdout.h"
-#if defined(MULTIPASS_ARCH_HAS_I2C) && !defined(CONFIG_driver_softi2c)
+#if defined(CONFIG_meta_driver_hardware_i2c)
#include "driver/i2c.h"
-#else
+#elif defined(CONFIG_driver_softi2c)
#include "driver/soft_i2c.h"
#endif
#include "driver/mpu9250.h"
diff --git a/src/app/posix-argv-to-ssd1306/main.cc b/src/app/posix-argv-to-ssd1306/main.cc
index 267b3e1..e16d05e 100644
--- a/src/app/posix-argv-to-ssd1306/main.cc
+++ b/src/app/posix-argv-to-ssd1306/main.cc
@@ -5,9 +5,9 @@
*/
#include "arch.h"
#include "driver/stdout.h"
-#if defined(MULTIPASS_ARCH_HAS_I2C) && !defined(CONFIG_driver_softi2c)
+#if defined(CONFIG_meta_driver_hardware_i2c)
#include "driver/i2c.h"
-#else
+#elif defined(CONFIG_driver_softi2c)
#include "driver/soft_i2c.h"
#endif
#include "driver/ssd1306.h"
diff --git a/src/app/posix-stdin-to-ssd1306/main.cc b/src/app/posix-stdin-to-ssd1306/main.cc
index a3fd085..0077724 100644
--- a/src/app/posix-stdin-to-ssd1306/main.cc
+++ b/src/app/posix-stdin-to-ssd1306/main.cc
@@ -5,9 +5,9 @@
*/
#include "arch.h"
#include "driver/stdout.h"
-#if defined(MULTIPASS_ARCH_HAS_I2C) && !defined(CONFIG_driver_softi2c)
+#if defined(CONFIG_meta_driver_hardware_i2c)
#include "driver/i2c.h"
-#else
+#elif defined(CONFIG_driver_softi2c)
#include "driver/soft_i2c.h"
#endif
#include "driver/ssd1306.h"
diff --git a/src/app/ssd1306test/main.cc b/src/app/ssd1306test/main.cc
index 0fb807e..d82ce57 100644
--- a/src/app/ssd1306test/main.cc
+++ b/src/app/ssd1306test/main.cc
@@ -5,9 +5,9 @@
*/
#include "arch.h"
#include "driver/stdout.h"
-#if defined(MULTIPASS_ARCH_HAS_I2C) && !defined(CONFIG_driver_softi2c)
+#if defined(CONFIG_meta_driver_hardware_i2c)
#include "driver/i2c.h"
-#else
+#elif defined(CONFIG_driver_softi2c)
#include "driver/soft_i2c.h"
#endif
#include "driver/ssd1306.h"
diff --git a/src/arch/arduino-nano/Makefile.inc b/src/arch/arduino-nano/Makefile.inc
index 82c3a28..c8221e4 100644
--- a/src/arch/arduino-nano/Makefile.inc
+++ b/src/arch/arduino-nano/Makefile.inc
@@ -22,7 +22,6 @@ cpu_freq ?= 16000000
COMMON_FLAGS += -Werror=overflow
COMMON_FLAGS += -mmcu=${MCU} -DMULTIPASS_ARCH_arduino_nano
COMMON_FLAGS += -DF_CPU=${cpu_freq}UL
-COMMON_FLAGS += -DMULTIPASS_ARCH_HAS_I2C
ifeq (${stack_usage}, )
COMMON_FLAGS += -flto
diff --git a/src/arch/atmega2560/Makefile.inc b/src/arch/atmega2560/Makefile.inc
index 29e6453..e404331 100644
--- a/src/arch/atmega2560/Makefile.inc
+++ b/src/arch/atmega2560/Makefile.inc
@@ -17,7 +17,6 @@ cpu_freq ?= 16000000
COMMON_FLAGS += -Werror=overflow
COMMON_FLAGS += -mmcu=${MCU} -DMULTIPASS_ARCH_atmega2560
COMMON_FLAGS += -DF_CPU=${cpu_freq}UL
-COMMON_FLAGS += -DMULTIPASS_ARCH_HAS_I2C
ifeq (${stack_usage}, )
COMMON_FLAGS += -flto
diff --git a/src/arch/blinkenrocket/Makefile.inc b/src/arch/blinkenrocket/Makefile.inc
index af8795c..4fdc130 100644
--- a/src/arch/blinkenrocket/Makefile.inc
+++ b/src/arch/blinkenrocket/Makefile.inc
@@ -9,7 +9,6 @@ SERIAL_PORT ?= /dev/ttyUSB0
COMMON_FLAGS += -mmcu=${MCU} -DF_CPU=8000000UL -DMULTIPASS_ARCH_blinkenrocket
COMMON_FLAGS += -flto
-COMMON_FLAGS += -DMULTIPASS_ARCH_HAS_I2C
CC = avr-gcc
CXX = avr-g++
diff --git a/src/arch/lora32u4ii/Makefile.inc b/src/arch/lora32u4ii/Makefile.inc
index 2cb2411..3ac2d04 100644
--- a/src/arch/lora32u4ii/Makefile.inc
+++ b/src/arch/lora32u4ii/Makefile.inc
@@ -16,7 +16,6 @@ cpu_freq ?= 8000000
COMMON_FLAGS += -Werror=overflow
COMMON_FLAGS += -mmcu=${MCU} -DMULTIPASS_ARCH_lora32u4ii
COMMON_FLAGS += -DF_CPU=${cpu_freq}UL
-COMMON_FLAGS += -DMULTIPASS_ARCH_HAS_I2C
ifeq (${stack_usage}, )
COMMON_FLAGS += -flto
diff --git a/src/arch/msp430fr5969lp/Makefile.inc b/src/arch/msp430fr5969lp/Makefile.inc
index b050f04..98e7ad3 100644
--- a/src/arch/msp430fr5969lp/Makefile.inc
+++ b/src/arch/msp430fr5969lp/Makefile.inc
@@ -17,7 +17,6 @@ MSP430_FLASHER_DIR ?= /opt/msp430/MSP430Flasher_1.3.20
INCLUDES += -I/opt/msp430/ti/msp430-gcc-full-linux-5.1.2.0/include
COMMON_FLAGS += -mcpu=${CPU} -mmcu=${MCU} -DMULTIPASS_ARCH_msp430fr5969lp
-COMMON_FLAGS += -DMULTIPASS_ARCH_HAS_I2C
# LTO seems to be broken.
diff --git a/src/arch/msp430fr5994lp/Makefile.inc b/src/arch/msp430fr5994lp/Makefile.inc
index aecf6fa..cd160a0 100644
--- a/src/arch/msp430fr5994lp/Makefile.inc
+++ b/src/arch/msp430fr5994lp/Makefile.inc
@@ -17,7 +17,6 @@ MSP430_FLASHER_DIR ?= /opt/msp430/MSP430Flasher_1.3.20
INCLUDES += -I/opt/msp430/ti/msp430-gcc-full-linux-5.1.2.0/include
COMMON_FLAGS += -mcpu=${CPU} -mmcu=${MCU} -DMULTIPASS_ARCH_msp430fr5994lp
-COMMON_FLAGS += -DMULTIPASS_ARCH_HAS_I2C
ifdef CONFIG_arch_msp430fr5994lp_large_mode
override msp430_large = 1
diff --git a/src/arch/posix/Makefile.inc b/src/arch/posix/Makefile.inc
index b06a29d..d693405 100644
--- a/src/arch/posix/Makefile.inc
+++ b/src/arch/posix/Makefile.inc
@@ -5,7 +5,6 @@
# SPDX-License-Identifier: BSD-2-Clause
COMMON_FLAGS += -DMULTIPASS_ARCH_posix
-COMMON_FLAGS += -DMULTIPASS_ARCH_HAS_I2C
CC = gcc
CXX = g++
diff --git a/src/driver/am2320.cc b/src/driver/am2320.cc
index 7157add..f68b108 100644
--- a/src/driver/am2320.cc
+++ b/src/driver/am2320.cc
@@ -4,9 +4,9 @@
* SPDX-License-Identifier: BSD-2-Clause
*/
#include "driver/am2320.h"
-#if defined(MULTIPASS_ARCH_HAS_I2C) && !defined(CONFIG_driver_softi2c)
+#if defined(CONFIG_meta_driver_hardware_i2c)
#include "driver/i2c.h"
-#else
+#elif defined(CONFIG_driver_softi2c)
#include "driver/soft_i2c.h"
#endif
#include "arch.h"
diff --git a/src/driver/bme680_util.cc b/src/driver/bme680_util.cc
index f679a31..7993778 100644
--- a/src/driver/bme680_util.cc
+++ b/src/driver/bme680_util.cc
@@ -4,9 +4,9 @@
* SPDX-License-Identifier: BSD-2-Clause
*/
#include "arch.h"
-#if defined(MULTIPASS_ARCH_HAS_I2C) && !defined(CONFIG_driver_softi2c)
+#if defined(CONFIG_meta_driver_hardware_i2c)
#include "driver/i2c.h"
-#else
+#elif defined(CONFIG_driver_softi2c)
#include "driver/soft_i2c.h"
#endif
#include <stdint.h>
diff --git a/src/driver/ccs811.cc b/src/driver/ccs811.cc
index 0206a96..f71c149 100644
--- a/src/driver/ccs811.cc
+++ b/src/driver/ccs811.cc
@@ -5,9 +5,9 @@
*/
#include "driver/ccs811.h"
#include "driver/gpio.h"
-#if defined(MULTIPASS_ARCH_HAS_I2C) && !defined(CONFIG_driver_softi2c)
+#if defined(CONFIG_meta_driver_hardware_i2c)
#include "driver/i2c.h"
-#else
+#elif defined(CONFIG_driver_softi2c)
#include "driver/soft_i2c.h"
#endif
diff --git a/src/driver/ds2482.cc b/src/driver/ds2482.cc
index 92bd9dd..929b9be 100644
--- a/src/driver/ds2482.cc
+++ b/src/driver/ds2482.cc
@@ -6,9 +6,9 @@
* DS2482-100 Single-Channel 1-Wire Master
*/
#include "driver/ds2482.h"
-#if defined(MULTIPASS_ARCH_HAS_I2C) && !defined(CONFIG_driver_softi2c)
+#if defined(CONFIG_meta_driver_hardware_i2c)
#include "driver/i2c.h"
-#else
+#elif defined (CONFIG_driver_softi2c)
#include "driver/soft_i2c.h"
#endif
#include "arch.h"
diff --git a/src/driver/eeprom24lc64.cc b/src/driver/eeprom24lc64.cc
index 1c8158a..ceafa5b 100644
--- a/src/driver/eeprom24lc64.cc
+++ b/src/driver/eeprom24lc64.cc
@@ -5,9 +5,9 @@
*/
#include <stdlib.h>
#include "driver/eeprom24lc64.h"
-#if defined(MULTIPASS_ARCH_HAS_I2C) && !defined(CONFIG_driver_softi2c)
+#if defined(CONFIG_meta_driver_hardware_i2c)
#include "driver/i2c.h"
-#else
+#elif defined(CONFIG_driver_softi2c)
#include "driver/soft_i2c.h"
#endif
diff --git a/src/driver/hdc1080.cc b/src/driver/hdc1080.cc
index 2ac983d..8232200 100644
--- a/src/driver/hdc1080.cc
+++ b/src/driver/hdc1080.cc
@@ -5,9 +5,9 @@
*/
#include "driver/hdc1080.h"
#include "arch.h"
-#if defined(MULTIPASS_ARCH_HAS_I2C) && !defined(CONFIG_driver_softi2c)
+#if defined(CONFIG_meta_driver_hardware_i2c)
#include "driver/i2c.h"
-#else
+#elif defined(CONFIG_driver_softi2c)
#include "driver/soft_i2c.h"
#endif
diff --git a/src/driver/lm75.cc b/src/driver/lm75.cc
index 8aab05d..3224d7a 100644
--- a/src/driver/lm75.cc
+++ b/src/driver/lm75.cc
@@ -6,9 +6,9 @@
* Driver for LM75B Digital Temperature Sensor and Thermal Watchdog.
*/
#include "driver/lm75.h"
-#if defined(MULTIPASS_ARCH_HAS_I2C) && !defined(CONFIG_driver_softi2c)
+#if defined(CONFIG_meta_driver_hardware_i2c)
#include "driver/i2c.h"
-#else
+#elif defined(CONFIG_driver_softi2c)
#include "driver/soft_i2c.h"
#endif
diff --git a/src/driver/max44009.cc b/src/driver/max44009.cc
index 8a8ff3e..dabc7d4 100644
--- a/src/driver/max44009.cc
+++ b/src/driver/max44009.cc
@@ -7,9 +7,9 @@
* Does not support interrupts.
*/
#include "driver/max44009.h"
-#if defined(MULTIPASS_ARCH_HAS_I2C) && !defined(CONFIG_driver_softi2c)
+#if defined(CONFIG_meta_driver_hardware_i2c)
#include "driver/i2c.h"
-#else
+#elif defined(CONFIG_driver_softi2c)
#include "driver/soft_i2c.h"
#endif
diff --git a/src/driver/mmsimple.cc b/src/driver/mmsimple.cc
index fa7d9e3..791ed19 100644
--- a/src/driver/mmsimple.cc
+++ b/src/driver/mmsimple.cc
@@ -4,9 +4,9 @@
* SPDX-License-Identifier: BSD-2-Clause
*/
#include "driver/mmsimple.h"
-#if defined(MULTIPASS_ARCH_HAS_I2C) && !defined(CONFIG_driver_softi2c)
+#if defined(CONFIG_meta_driver_hardware_i2c)
#include "driver/i2c.h"
-#else
+#elif defined(CONFIG_driver_softi2c)
#include "driver/soft_i2c.h"
#endif
diff --git a/src/driver/mmsubstate.cc b/src/driver/mmsubstate.cc
index cce2526..8082b65 100644
--- a/src/driver/mmsubstate.cc
+++ b/src/driver/mmsubstate.cc
@@ -4,9 +4,9 @@
* SPDX-License-Identifier: BSD-2-Clause
*/
#include "driver/mmsubstate.h"
-#if defined(MULTIPASS_ARCH_HAS_I2C) && !defined(CONFIG_driver_softi2c)
+#if defined(CONFIG_meta_driver_hardware_i2c)
#include "driver/i2c.h"
-#else
+#elif defined(CONFIG_driver_softi2c)
#include "driver/soft_i2c.h"
#endif
diff --git a/src/driver/s5851a.cc b/src/driver/s5851a.cc
index 4cda5fe..28870e6 100644
--- a/src/driver/s5851a.cc
+++ b/src/driver/s5851a.cc
@@ -4,9 +4,9 @@
* SPDX-License-Identifier: BSD-2-Clause
*/
#include "driver/s5851a.h"
-#if defined(MULTIPASS_ARCH_HAS_I2C) && !defined(CONFIG_driver_softi2c)
+#if defined(CONFIG_meta_driver_hardware_i2c)
#include "driver/i2c.h"
-#else
+#elif defined(CONFIG_driver_softi2c)
#include "driver/soft_i2c.h"
#endif
diff --git a/src/driver/scd4x.cc b/src/driver/scd4x.cc
index d129bf7..dfb6ee0 100644
--- a/src/driver/scd4x.cc
+++ b/src/driver/scd4x.cc
@@ -5,9 +5,9 @@
*/
#include "driver/scd4x.h"
#include "driver/gpio.h"
-#if defined(MULTIPASS_ARCH_HAS_I2C) && !defined(CONFIG_driver_softi2c)
+#if defined(CONFIG_meta_driver_hardware_i2c)
#include "driver/i2c.h"
-#else
+#elif defined(CONFIG_driver_softi2c)
#include "driver/soft_i2c.h"
#endif
diff --git a/src/driver/ssd1306.cc b/src/driver/ssd1306.cc
index e1c299e..8f689ad 100644
--- a/src/driver/ssd1306.cc
+++ b/src/driver/ssd1306.cc
@@ -7,9 +7,9 @@
* 128x64 and 128x32 Displays.
*/
#include "driver/ssd1306.h"
-#if defined(MULTIPASS_ARCH_HAS_I2C) && !defined(CONFIG_driver_softi2c)
+#if defined(CONFIG_meta_driver_hardware_i2c)
#include "driver/i2c.h"
-#else
+#elif defined(CONFIG_driver_softi2c)
#include "driver/soft_i2c.h"
#endif
diff --git a/src/driver/tsl2591.cc b/src/driver/tsl2591.cc
index 1f6dd6c..67532ca 100644
--- a/src/driver/tsl2591.cc
+++ b/src/driver/tsl2591.cc
@@ -4,9 +4,9 @@
* SPDX-License-Identifier: BSD-2-Clause
*/
#include "driver/tsl2591.h"
-#if defined(MULTIPASS_ARCH_HAS_I2C) && !defined(CONFIG_driver_softi2c)
+#if defined(CONFIG_meta_driver_hardware_i2c)
#include "driver/i2c.h"
-#else
+#elif defined(CONFIG_driver_softi2c)
#include "driver/soft_i2c.h"
#endif