Skip to content

Commit

Permalink
Fix esp-idf v5.3 compilation error with ESP32C6 (#595)
Browse files Browse the repository at this point in the history
* Fix esp-idf 5.3 compilation error with ESP32C6
  • Loading branch information
tobozo authored Jul 26, 2024
1 parent 48e87f6 commit aaa94e2
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/lgfx/v1/platforms/esp32/common.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,10 @@ Original Source:
#include <soc/i2c_reg.h>
#include <soc/i2c_struct.h>
#if (ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 3, 0))
#include <soc/syscon_reg.h>
//#include <soc/syscon_reg.h>
#if __has_include(<soc/syscon_reg.h>)
#include <soc/syscon_reg.h>
#endif
#else
#if __has_include (<soc/apb_ctrl_reg.h>)
#include <soc/apb_ctrl_reg.h>
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit aaa94e2

Please sign in to comment.