diff options
author | Daniel Friesel <derf@finalrewind.org> | 2021-04-10 11:09:57 +0200 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2021-04-10 11:09:57 +0200 |
commit | e585d5246b7391d35a5dc4b1ce2f79a310570f5e (patch) | |
tree | 198056eb5108053d18606fb3ffe0986d5babaa7c /src/driver/soft_i2c.cc | |
parent | ea1f28f59505579d90f0e51b1023c72f6fbb2ed8 (diff) |
Allow software and hardware i2c to be used together (e.g. on different pins)
Diffstat (limited to 'src/driver/soft_i2c.cc')
-rw-r--r-- | src/driver/soft_i2c.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/driver/soft_i2c.cc b/src/driver/soft_i2c.cc index 975fa2e..8b87e93 100644 --- a/src/driver/soft_i2c.cc +++ b/src/driver/soft_i2c.cc @@ -235,6 +235,8 @@ ON_TIMER_INTERRUPT_head ON_TIMER_INTERRUPT_tail #endif +#ifndef DRIVER_HARDWARE_I2C + #if SOFTI2C_PULLUP_EXTERNAL #ifdef MULTIPASS_ARCH_msp430fr5969lp SoftI2C i2c(GPIO::p1_6, GPIO::p1_7, GPIO::p1_4, GPIO::p1_5); @@ -258,3 +260,5 @@ SoftI2C i2c(GPIO::p5_0, GPIO::p5_1); SoftI2C i2c(GPIO::px00, GPIO::px01); #endif /* MULTIPASS_ARCH_* */ #endif /* !SOFTI2C_PULLUP_EXTERNAL */ + +#endif /* !DRIVER_HARDWARE_I2C */ |