Bodmer / TFT_eSPI

Arduino and PlatformIO IDE compatible TFT library optimised for the Raspberry Pi Pico (RP2040), STM32, ESP8266 and ESP32 that supports different driver chips
Other
3.81k stars 1.1k forks source link

Support for ESP32C6? #3255

Open HonestQiao opened 7 months ago

HonestQiao commented 7 months ago

datasheet of ESP32C6: https://www.espressif.com.cn/sites/default/files/documentation/esp32-c6_datasheet_en.pdf

Love4yzp commented 5 months ago

Have you faced any problem?

OscarTofa commented 5 months ago

Hello

I am trying to compile for c6 but I get the several errors.

" oc/esp32c6/include/soc/soc.h:112:54: error: invalid operands of types 'void' and 'long unsigned int' to binary 'operator|' 112 | WRITE_PERI_REG((reg), (READ_PERI_REG(reg)|(mask))); \

esp32c6/include/soc/soc.h:112:54: error: invalid operands of types 'void' and 'long unsigned int' to binary 'operator|' 112 | WRITE_PERI_REG((reg), (READ_PERI_REG(reg)|(mask))); \

TFT_eSPI_ESP32.h:75:22: error: 'VSPI' was not declared in this scope; did you mean 'SPI'? 75 | #define SPI_PORT VSPI TFT_eSPI_ESP32.c:409:48: error: invalid operands of types 'void' and 'long unsigned int' to binary 'operator&' 409 | while (READ_PERI_REG(SPI_CMD_REG(SPI_PORT))&SPI_USR);

TFT_eSPI_ESP32.h:189:50: error: no match for 'operator=' (operand types are 'volatile gpio_out_w1tc_reg_t' and 'int') 189 | #define DC_C GPIO.out_w1tc = (1 << TFT_DC)//;GPIO.out_w1tc = (1 << TFT_DC)

TFT_eSPI_ESP32.h:235:50: error: no match for 'operator=' (operand types are 'volatile gpio_out_w1ts_reg_t' and 'int') 235 | #define CS_H GPIO.out_w1ts = (1 << TFT_CS)//;GPIO.out_w1ts = (1 << TFT_CS)

If I compile for c2 or s3 I have no error

OscarTofa commented 4 months ago

Has anyone else experienced the same problem?

limengdu commented 4 months ago

I'm having the same problem, it looks like the TFT library is no longer supported since esp-arduino updated to 3.0.x.

Cincinnatu commented 4 months ago

ESP32C6 is not supported. Can someone submit a PR (pull request) for it

Cincinnatu commented 4 months ago

I finished the PR about ESP32C6 and TFT_eSPI :https://github.com/Bodmer/TFT_eSPI/pull/3399

yuangezhizao commented 3 months ago

Has anyone else experienced the same problem?

Same issue, waiting for the Cincinnatu's PR https://github.com/Bodmer/TFT_eSPI/pull/3399.

/Users/yuangezhizao/Documents/Arduino/libraries/TFT_eSPI/Processors/TFT_eSPI_ESP32.h:190:50: error: no match for 'operator=' (operand types are 'volatile gpio_out_w1ts_reg_t' and 'int')
  190 |         #define DC_D GPIO.out_w1ts = (1 << TFT_DC)//;GPIO.out_w1ts = (1 << TFT_DC)
      |                                                  ^
/Users/yuangezhizao/Documents/Arduino/libraries/TFT_eSPI/TFT_eSPI.cpp:3779:5: note: in expansion of macro 'DC_D'
 3779 |     DC_D; tft_Write_16N(color);
      |     ^~~~
/Users/yuangezhizao/Library/Arduino15/packages/esp32/tools/esp32-arduino-libs/idf-release_v5.1-bd2b9390ef/esp32c6/include/soc/esp32c6/include/soc/gpio_struct.h:51:3: note: candidate: 'constexpr gpio_out_w1ts_reg_t& gpio_out_w1ts_reg_t::operator=(gpio_out_w1ts_reg_t&&)'
   51 | } gpio_out_w1ts_reg_t;
      |   ^~~~~~~~~~~~~~~~~~~
/Users/yuangezhizao/Library/Arduino15/packages/esp32/tools/esp32-arduino-libs/idf-release_v5.1-bd2b9390ef/esp32c6/include/soc/esp32c6/include/soc/gpio_struct.h:51:3: note:   no known conversion for argument 1 from 'int' to 'gpio_out_w1ts_reg_t&&'
/Users/yuangezhizao/Library/Arduino15/packages/esp32/tools/esp32-arduino-libs/idf-release_v5.1-bd2b9390ef/esp32c6/include/soc/esp32c6/include/soc/gpio_struct.h:51:3: note: candidate: 'constexpr gpio_out_w1ts_reg_t& gpio_out_w1ts_reg_t::operator=(const gpio_out_w1ts_reg_t&)'
/Users/yuangezhizao/Library/Arduino15/packages/esp32/tools/esp32-arduino-libs/idf-release_v5.1-bd2b9390ef/esp32c6/include/soc/esp32c6/include/soc/gpio_struct.h:51:3: note:   no known conversion for argument 1 from 'int' to 'const gpio_out_w1ts_reg_t&'