From aaa94e28e20f8dd148a7d51640c9c669bd1b072d Mon Sep 17 00:00:00 2001 From: tobozo Date: Fri, 26 Jul 2024 08:09:57 +0200 Subject: [PATCH] Fix esp-idf v5.3 compilation error with ESP32C6 (#595) * Fix esp-idf 5.3 compilation error with ESP32C6 --- src/lgfx/v1/platforms/esp32/common.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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;