From 3008445817f0ca83f4e115714aa44363fd3e231b Mon Sep 17 00:00:00 2001 From: Pirata Date: Wed, 15 Jan 2025 08:10:51 -0300 Subject: [PATCH] missed macro --- boards/CYD-2432S028/interface.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/boards/CYD-2432S028/interface.cpp b/boards/CYD-2432S028/interface.cpp index 964840dc7..79f98049a 100644 --- a/boards/CYD-2432S028/interface.cpp +++ b/boards/CYD-2432S028/interface.cpp @@ -12,6 +12,11 @@ #define CYD28_DISPLAY_HOR_RES_MAX 320 #define CYD28_DISPLAY_VER_RES_MAX 240 CYD28_TouchR touch(CYD28_DISPLAY_HOR_RES_MAX, CYD28_DISPLAY_VER_RES_MAX); + #if defined(TOUCH_XPT2046_SPI) + #define XPT2046_CS DXPT2046_SPI_CONFIG_CS_GPIO_NUM + #else + #define XPT2046_CS 33 + #endif #endif /*************************************************************************************** @@ -20,7 +25,9 @@ ** Description: initial setup for the device ***************************************************************************************/ void _setup_gpio() { - pinMode(XPT2046_CS, OUTPUT); + #ifndef HAS_CAPACITIVE_TOUCH // Capacitive Touchscreen uses I2C to communicate + pinMode(XPT2046_CS, OUTPUT); + #endif //touchSPI.begin(XPT2046_CLK, XPT2046_MISO, XPT2046_MOSI, XPT2046_CS); if(!touch.begin()) { Serial.println("Touch IC not Started");