mirror of https://github.com/arendst/Tasmota.git
Fix compile error when wire1 is unavailable
This commit is contained in:
parent
8ea4c7887f
commit
f9ee4198e1
|
@ -63,7 +63,12 @@ bool I2cBegin(int sda, int scl, uint32_t bus, uint32_t frequency) {
|
|||
#endif // USE_I2C_BUS2_ESP8266
|
||||
#endif // ESP8266
|
||||
#ifdef ESP32
|
||||
#ifdef USE_I2C_BUS2
|
||||
TwoWire& myWire = (0 == bus) ? Wire : Wire1;
|
||||
#else
|
||||
if (bus > 0) { return false; }
|
||||
TwoWire& myWire = Wire;
|
||||
#endif
|
||||
static bool reinit = false;
|
||||
if (reinit) { myWire.end(); }
|
||||
result = myWire.begin(sda, scl, frequency);
|
||||
|
|
Loading…
Reference in New Issue