achillhasler / TFT_eTouch

generic touch support for resistive chips
32 stars 10 forks source link

Error compiling for board ESP32S3 Dev Module. #9

Open summerfind opened 5 months ago

summerfind commented 5 months ago

Hi, got this error when added this line to TFT_eSPI.h 's setup file : #define TOUCH_CS 3 // was 1 got error // why so? Thanks.

`Arduino: 1.8.19 (Windows 7), Board: "ESP32S3 Dev Module, Disabled, Disabled, QIO 80MHz, 4MB (32Mb), Core 1, Core 1, Hardware CDC and JTAG, Disabled, Disabled, Disabled, UART0 / Hardware CDC, Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS), 240MHz (WiFi), 921600, None, Disabled, Disabled"

In file included from C:\Users\HUA.DELLV-PC\Documents\Arduino\libraries\TFT_eTouch-master\examples\TFT_eSPI\Conways_Life\Conways_Life.ino:17:

C:\Users\HUA.DELLV-PC\Documents\Arduino\libraries\TFT_eSPI-master_S3/TFT_eSPI.h:966:8: error: #error >>>>------>> Touch functions not supported in 8/16-bit parallel mode or with RP2040 PIO.

966 | #error >>>>------>> Touch functions not supported in 8/16-bit parallel mode or with RP2040 PIO.

  |        ^~~~~

exit status 1

Error compiling for board ESP32S3 Dev Module.

This report would have more information with "Show verbose output during compilation" option enabled in File -> Preferences. `

achillhasler commented 5 months ago

If TOUCH_CS is defined in TFT_eSPI, then the touch function is provided by the TFT_eSPI lib. However, if the touch function of TFT_eTouch is to be used, TOUCH_CS must not be defined. TFT_ETOUCH_CS must be defined in TFT_eTouchUser.h. Since I don't have an ESP32S3 Dev Module, I can't try this. Also, the error message comes from TFT_eSPI and not from TFT_eTouch. It looks like you are using a TFT with 8 bit bus, not SPI. Does your TFT have a touch chip at all (e.g. XPT2046) or just a touch resistor network?