Skip to content

Commit 3e9fce8

Browse files
authored
Fix wrong I2C number detection for ESP32C6 target (#16)
1 parent e16cee1 commit 3e9fce8

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed

src/AutoOLEDWire.h

+2
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,8 @@ class AutoOLEDWire : public OLEDDisplay {
9494
this->_scl = _scl;
9595
#if !defined(ARDUINO_ARCH_ESP32) && !defined(ARCH_RP2040)
9696
this->_wire = &Wire;
97+
#elif defined(CONFIG_IDF_TARGET_ESP32C6)
98+
this->_wire = &Wire;
9799
#else
98100
this->_wire = (_i2cBus==I2C_ONE) ? &Wire : &Wire1;
99101
#endif

src/SH1106Wire.h

+2
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,8 @@ class SH1106Wire : public OLEDDisplay {
8080
this->_scl = _scl;
8181
#if !defined(ARDUINO_ARCH_ESP32) && !defined(ARCH_RP2040)
8282
this->_wire = &Wire;
83+
#elif defined(CONFIG_IDF_TARGET_ESP32C6)
84+
this->_wire = &Wire;
8385
#else
8486
this->_wire = (_i2cBus==I2C_ONE) ? &Wire : &Wire1;
8587
#endif

src/SSD1306Wire.h

+2
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,8 @@ class SSD1306Wire : public OLEDDisplay {
8080
this->_scl = _scl;
8181
#if !defined(ARDUINO_ARCH_ESP32)
8282
this->_wire = &Wire;
83+
#elif defined(CONFIG_IDF_TARGET_ESP32C6)
84+
this->_wire = &Wire;
8385
#else
8486
this->_wire = (_i2cBus==I2C_ONE) ? &Wire : &Wire1;
8587
#endif

0 commit comments

Comments
 (0)