diff --git a/tasmota/include/tasmota_globals.h b/tasmota/include/tasmota_globals.h index 2f51f860c..db8d24f0c 100644 --- a/tasmota/include/tasmota_globals.h +++ b/tasmota/include/tasmota_globals.h @@ -194,6 +194,13 @@ const char WIFI_HOSTNAME[] = WIFI_DEFAULT_HOSTNAME; // Override by user_confi #define ARDUINO_CORE_RELEASE ARDUINO_ESP32_RELEASE #endif // ARDUINO_ESP32_RELEASE +#ifdef USE_I2C_BUS2 // If defined for ESP8266 undefine first +#undef USE_I2C_BUS2 +#endif // USE_I2C_BUS2 +#if SOC_HP_I2C_NUM > 1 +#define USE_I2C_BUS2 // Redefine based on hardware support +#endif // SOC_HP_I2C_NUM + // Hardware has no ESP32 #undef USE_EXS_DIMMER #undef USE_ARMTRONIX_DIMMERS diff --git a/tasmota/tasmota_support/support_a_i2c.ino b/tasmota/tasmota_support/support_a_i2c.ino index d5a602207..0af7450d6 100644 --- a/tasmota/tasmota_support/support_a_i2c.ino +++ b/tasmota/tasmota_support/support_a_i2c.ino @@ -17,12 +17,6 @@ #endif // USE_I2C_BUS2_ESP8266 #endif // ESP8266 -#ifdef ESP32 -#if SOC_HP_I2C_NUM > 1 -#define USE_I2C_BUS2 -#endif // SOC_HP_I2C_NUM -#endif // ESP32 - const uint8_t I2C_RETRY_COUNTER = 3; struct I2Ct {