From 303c462f5eb82a04a01046e2277db674692e106b Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Thu, 12 Jul 2018 11:01:23 +0200 Subject: Include hw/sw i2c based on preprocessor macros --- src/driver/lm75.cc | 4 ++++ src/driver/mmsimple.cc | 4 ++++ 2 files changed, 8 insertions(+) (limited to 'src') diff --git a/src/driver/lm75.cc b/src/driver/lm75.cc index 0bad4a7..9f20e9b 100644 --- a/src/driver/lm75.cc +++ b/src/driver/lm75.cc @@ -1,5 +1,9 @@ #include "driver/lm75.h" +#if defined(MULTIPASS_ARCH_HAS_I2C) && !defined(DRIVER_SOFTI2C) #include "driver/i2c.h" +#else +#include "driver/soft_i2c.h" +#endif float LM75::getTemp() { diff --git a/src/driver/mmsimple.cc b/src/driver/mmsimple.cc index d47d10d..b2b2708 100644 --- a/src/driver/mmsimple.cc +++ b/src/driver/mmsimple.cc @@ -1,5 +1,9 @@ #include "driver/mmsimple.h" +#if defined(MULTIPASS_ARCH_HAS_I2C) && !defined(DRIVER_SOFTI2C) #include "driver/i2c.h" +#else +#include "driver/soft_i2c.h" +#endif void MicroMoodySimple::sendCmd(unsigned char byte) { -- cgit v1.2.3