From bf6c7e6f711df2141b2bb00f081c89655fec0b97 Mon Sep 17 00:00:00 2001 From: Juniel Cruz Date: Thu, 1 Aug 2024 14:38:08 +0800 Subject: [PATCH] Fix I2C touch pins and SDMMC - Fix incorrect I2C pins for touch in SPI variants - Ignore INT pin in touch detection for SPI variants - Fix SDMMC path construction --- library.properties | 2 +- src/gfx4desp32.cpp | 4 ++-- src/gfx4desp32_spi_panel.h | 4 ++-- src/gfx4desp32_spi_panel_t.cpp | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/library.properties b/library.properties index e87c641..c4b834f 100644 --- a/library.properties +++ b/library.properties @@ -1,5 +1,5 @@ name=GFX4dESP32 -version=1.1.0 +version=1.1.1 author=4D Systems Pty Ltd maintainer=4D Systems Pty Ltd sentence=Graphics Library for the gen4-ESP32 displays by 4D Systems diff --git a/src/gfx4desp32.cpp b/src/gfx4desp32.cpp index ed3f7c9..f1c2109 100644 --- a/src/gfx4desp32.cpp +++ b/src/gfx4desp32.cpp @@ -1531,7 +1531,7 @@ void gfx4desp32::Open4dGFXtoPSRAM(String file4d) { userDat = LittleFS.open((char*)dat4d.c_str(), "r"); #else #ifdef USE_SDMMC_FILE_SYSTEM - userDat = SD_MMC.open(dat4d); + userDat = SD_MMC.open("/" + dat4d); #else userDat = uSD.open(dat4d); #endif @@ -1551,7 +1551,7 @@ void gfx4desp32::Open4dGFXtoPSRAM(String file4d) { userImag = LittleFS.open((char*)gci4d.c_str(), "r"); #else #ifdef USE_SDMMC_FILE_SYSTEM - userImag = SD_MMC.open(gci4d); + userImag = SD_MMC.open("/" + gci4d); #else userImag = uSD.open(gci4d); #endif diff --git a/src/gfx4desp32_spi_panel.h b/src/gfx4desp32_spi_panel.h index 859ad38..8ffba40 100644 --- a/src/gfx4desp32_spi_panel.h +++ b/src/gfx4desp32_spi_panel.h @@ -72,8 +72,8 @@ #define GEN4_35CT_INVERT_COLOR true #define GEN4_35CT_SWAP_XY true -#define GFX4d_TOUCH_RESET 0x0b -#define GFX4d_TOUCH_INT 0x06 +#define GFX4d_TOUCH_RESET 8 +#define GFX4d_TOUCH_INT 11 #define GFX4d_QSPI_TOUCH_RESET 41 #define GFX4d_QSPI_TOUCH_INT 42 diff --git a/src/gfx4desp32_spi_panel_t.cpp b/src/gfx4desp32_spi_panel_t.cpp index 6ac5257..c831e8a 100644 --- a/src/gfx4desp32_spi_panel_t.cpp +++ b/src/gfx4desp32_spi_panel_t.cpp @@ -50,7 +50,7 @@ void gfx4desp32_spi_panel_t::touch_Set(uint8_t mode) { */ /****************************************************************************/ bool gfx4desp32_spi_panel_t::touch_Update() { - if (!_TouchEnable || digitalRead(GFX4d_TOUCH_INT)) + if (!_TouchEnable /*|| digitalRead(GFX4d_TOUCH_INT)*/ ) return false; bool update = false; //int n = -1;