diff --git a/src/lgfx/v1/platforms/esp32/common.cpp b/src/lgfx/v1/platforms/esp32/common.cpp index 81b384a1..ffd53fe7 100644 --- a/src/lgfx/v1/platforms/esp32/common.cpp +++ b/src/lgfx/v1/platforms/esp32/common.cpp @@ -36,7 +36,10 @@ Original Source: #include #include #if (ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 3, 0)) - #include + //#include + #if __has_include() + #include + #endif #else #if __has_include () #include @@ -669,7 +672,7 @@ namespace lgfx static i2c_dev_t* getDev(int num) { -#if SOC_I2C_NUM == 1 +#if SOC_I2C_NUM == 1 || defined CONFIG_IDF_TARGET_ESP32C6 return &I2C0; #else return num == 0 ? &I2C0 : &I2C1;