summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/driver/soft_i2c.h2
-rw-r--r--src/driver/soft_i2c.cc4
2 files changed, 6 insertions, 0 deletions
diff --git a/include/driver/soft_i2c.h b/include/driver/soft_i2c.h
index a5da1f6..15784d9 100644
--- a/include/driver/soft_i2c.h
+++ b/include/driver/soft_i2c.h
@@ -37,6 +37,8 @@ class SoftI2C {
#ifndef DRIVER_HARDWARE_I2C
extern SoftI2C i2c;
+#else
+extern SoftI2C softi2c;
#endif
#endif
diff --git a/src/driver/soft_i2c.cc b/src/driver/soft_i2c.cc
index 7369b2d..7bf030f 100644
--- a/src/driver/soft_i2c.cc
+++ b/src/driver/soft_i2c.cc
@@ -239,4 +239,8 @@ ON_TIMER_INTERRUPT_tail
SoftI2C i2c(GPIO::CONFIG_driver_softi2c_sda, GPIO::CONFIG_driver_softi2c_scl);
+#else
+
+SoftI2C softi2c(GPIO::CONFIG_driver_softi2c_sda, GPIO::CONFIG_driver_softi2c_scl);
+
#endif /* !DRIVER_HARDWARE_I2C */