Unverified Commit d02fe55c authored by Bodmer's avatar Bodmer Committed by GitHub

Fix #503

The s60sc Adafruit_Touch library fork for the ESP32 parallel mode uses the TFT_WR pin as an analogue input to read the screen resistance.  The TFT_eSPI library kept TFT_CS low permanently for performance reasons, but when used with the touch library a low analogue value on the TFT_WR pin will write spurious data to the display. 

This change toggle TFT_CS so it is only low during TFT parallel bus writes. The performance reduction is small.
parent 308b46e1
......@@ -190,8 +190,16 @@
#define CS_H digitalWrite(TFT_CS, HIGH)
#elif defined (ESP32)
#if defined (ESP32_PARALLEL)
#define CS_L // The TFT CS is set permanently low during init()
#if TFT_CS >= 32
#define CS_L GPIO.out1_w1tc.val = (1 << (TFT_CS - 32))
#define CS_H GPIO.out1_w1ts.val = (1 << (TFT_CS - 32))
#elif TFT_CS >= 0
#define CS_L GPIO.out_w1tc = (1 << TFT_CS)
#define CS_H GPIO.out_w1ts = (1 << TFT_CS)
#else
#define CS_L
#define CS_H
#endif
#else
#if TFT_CS >= 32
#ifdef RPI_ILI9486_DRIVER // RPi display needs a slower CS change
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment