Unverified Commit 11533e77 authored by Birte Kristina Friesel's avatar Birte Kristina Friesel
Browse files

softi2c: use "softi2c" global name if i2c is already active

parent 3ed97993
Loading
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -37,6 +37,8 @@ class SoftI2C {

#ifndef DRIVER_HARDWARE_I2C
extern SoftI2C i2c;
#else
extern SoftI2C softi2c;
#endif

#endif
+4 −0
Original line number Diff line number Diff line
@@ -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 */