summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2018-07-12 11:01:23 +0200
committerDaniel Friesel <derf@finalrewind.org>2018-07-12 11:01:23 +0200
commit303c462f5eb82a04a01046e2277db674692e106b (patch)
treebfd4f7cbe28fe5c8413f8ccb166fa8d48acd0ce2 /src
parentc85f1aaf1356bd85dd19dbb97b8f1b87c3ed742a (diff)
Include hw/sw i2c based on preprocessor macros
Diffstat (limited to 'src')
-rw-r--r--src/driver/lm75.cc4
-rw-r--r--src/driver/mmsimple.cc4
2 files changed, 8 insertions, 0 deletions
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)
{