diff --git a/Processors/TFT_eSPI_ESP32.h b/Processors/TFT_eSPI_ESP32.h index 5526d79..bf44714 100644 --- a/Processors/TFT_eSPI_ESP32.h +++ b/Processors/TFT_eSPI_ESP32.h @@ -158,6 +158,9 @@ SPI3_HOST = 2 #if (TFT_DC >= 0) && (TFT_DC < 32) #define DC_C GPIO.out_w1tc = (1 << TFT_DC) #define DC_D GPIO.out_w1ts = (1 << TFT_DC) + #elif (TFT_DC >= 32) + #define DC_C GPIO.out1_w1tc.val = (1 << (TFT_DC- 32)) + #define DC_D GPIO.out1_w1ts.val = (1 << (TFT_DC- 32)) #else #define DC_C #define DC_D diff --git a/Processors/TFT_eSPI_ESP32_C3.h b/Processors/TFT_eSPI_ESP32_C3.h index 90338d5..ff535a6 100644 --- a/Processors/TFT_eSPI_ESP32_C3.h +++ b/Processors/TFT_eSPI_ESP32_C3.h @@ -143,6 +143,9 @@ SPI3_HOST = 2 #if (TFT_DC >= 0) && (TFT_DC < 32) #define DC_C GPIO.out_w1tc.val = (1 << TFT_DC) #define DC_D GPIO.out_w1ts.val = (1 << TFT_DC) + #elif (TFT_DC >= 32) + #define DC_C GPIO.out_w1tc.val = (1 << (TFT_DC- 32)) + #define DC_D GPIO.out_w1ts.val = (1 << (TFT_DC- 32)) #else #define DC_C #define DC_D diff --git a/Processors/TFT_eSPI_ESP32_S3.h b/Processors/TFT_eSPI_ESP32_S3.h index d46ecca..ec5ad8d 100644 --- a/Processors/TFT_eSPI_ESP32_S3.h +++ b/Processors/TFT_eSPI_ESP32_S3.h @@ -166,6 +166,9 @@ SPI3_HOST = 2 #if (TFT_DC >= 0) && (TFT_DC < 32) #define DC_C GPIO.out_w1tc = (1 << TFT_DC) #define DC_D GPIO.out_w1ts = (1 << TFT_DC) + #elif (TFT_DC >= 32) + #define DC_C GPIO.out1_w1tc.val = (1 << (TFT_DC- 32)) + #define DC_D GPIO.out1_w1ts.val = (1 << (TFT_DC- 32)) #else #define DC_C #define DC_D diff --git a/TFT_eSPI.cpp b/TFT_eSPI.cpp index 7dd4b5c..50eafa2 100644 --- a/TFT_eSPI.cpp +++ b/TFT_eSPI.cpp @@ -1070,7 +1070,7 @@ uint16_t TFT_eSPI::readPixel(int32_t x0, int32_t y0) #if defined(TFT_PARALLEL_8_BIT) || defined(RP2040_PIO_INTERFACE) - if (!inTransaction) CS_L; + if (!inTransaction) { CS_L; } // CS_L can be multi-statement readAddrWindow(x0, y0, 1, 1); @@ -1090,7 +1090,7 @@ uint16_t TFT_eSPI::readPixel(int32_t x0, int32_t y0) // Read window pixel 24 bit RGB values and fill in LS bits uint16_t rgb = ((readByte() & 0xF8) << 8) | ((readByte() & 0xFC) << 3) | (readByte() >> 3); - if (!inTransaction) CS_H; + if (!inTransaction) { CS_H; } // CS_H can be multi-statement // Set masked pins D0- D7 to output busDir(GPIO_DIR_MASK, OUTPUT); @@ -1102,7 +1102,7 @@ uint16_t TFT_eSPI::readPixel(int32_t x0, int32_t y0) // Fetch the 16 bit BRG pixel uint16_t bgr = (readByte() << 8) | readByte(); - if (!inTransaction) CS_H; + if (!inTransaction) { CS_H; } // CS_H can be multi-statement // Set masked pins D0- D7 to output busDir(GPIO_DIR_MASK, OUTPUT);