From 360d152ca9955915520949db8b325ef36641cc0f Mon Sep 17 00:00:00 2001 From: Pablo Martikian Date: Thu, 5 Jan 2023 12:01:35 -0300 Subject: [PATCH 1/2] fix for warning - GPIO output gpio_num error --- User_Setups/Setup25_TTGO_T_Display.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/User_Setups/Setup25_TTGO_T_Display.h b/User_Setups/Setup25_TTGO_T_Display.h index e0367c5..b4a0268 100644 --- a/User_Setups/Setup25_TTGO_T_Display.h +++ b/User_Setups/Setup25_TTGO_T_Display.h @@ -19,7 +19,7 @@ #define TFT_DC 16 #define TFT_RST 23 -#define TOUCH_CS -1 +//#define TOUCH_CS -1 #define TFT_BL 4 // Display backlight control pin From a4c9ac9ae8afe30d8a483dc93369d7a8e5a0d743 Mon Sep 17 00:00:00 2001 From: Pablo Martikian Date: Thu, 5 Jan 2023 12:08:05 -0300 Subject: [PATCH 2/2] fix for warning - GPIO output gpio_num error - robustness other hardware --- TFT_eSPI.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/TFT_eSPI.cpp b/TFT_eSPI.cpp index 282ed1b..256cde5 100644 --- a/TFT_eSPI.cpp +++ b/TFT_eSPI.cpp @@ -541,8 +541,10 @@ void TFT_eSPI::initBus(void) { // Configure chip select for touchscreen controller if present #ifdef TOUCH_CS - pinMode(TOUCH_CS, OUTPUT); - digitalWrite(TOUCH_CS, HIGH); // Chip select high (inactive) + if (TOUCH_CS >= 0) { + pinMode(TOUCH_CS, OUTPUT); + digitalWrite(TOUCH_CS, HIGH); // Chip select high (inactive) + } #endif // In parallel mode and with the RP2040 processor, the TFT_WR line is handled in the PIO