summaryrefslogtreecommitdiff
path: root/include/driver/soft_i2c.h
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2021-04-10 11:09:57 +0200
committerDaniel Friesel <derf@finalrewind.org>2021-04-10 11:09:57 +0200
commite585d5246b7391d35a5dc4b1ce2f79a310570f5e (patch)
tree198056eb5108053d18606fb3ffe0986d5babaa7c /include/driver/soft_i2c.h
parentea1f28f59505579d90f0e51b1023c72f6fbb2ed8 (diff)
Allow software and hardware i2c to be used together (e.g. on different pins)
Diffstat (limited to 'include/driver/soft_i2c.h')
-rw-r--r--include/driver/soft_i2c.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/driver/soft_i2c.h b/include/driver/soft_i2c.h
index 05fbce6..b581a38 100644
--- a/include/driver/soft_i2c.h
+++ b/include/driver/soft_i2c.h
@@ -35,6 +35,8 @@ class SoftI2C {
unsigned char rx_len, unsigned char *rx_buf);
};
+#ifndef DRIVER_HARDWARE_I2C
extern SoftI2C i2c;
+#endif
#endif