Add GT911 capacitive touch support for ESP32-3248S035C - #1383
Draft
Ejuc wants to merge 1 commit into
Draft
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This draft PR adds GT911 capacitive-touch support for the ESP32-3248S035C 3.5-inch CYD board.
Tested hardware:
0x5Dor0x14Implemented changes
HAS_GT911_TOUCHconfiguration.0x5Dand0x14.Why the debounce is needed
TouchDrvGT911::getPoint()clears the controller's current data-ready frame after reading it.A rapid following poll may therefore temporarily report no touch even while the finger is still physically touching the screen. Marauder can interpret that temporary empty frame as a release, causing one physical tap to activate two menu actions.
The patch keeps the previous valid touch position active for 100 ms after the last GT911 frame. This fixed the duplicate-menu-action problem on the tested board.
Test results
The following were tested successfully on physical hardware:
0x10000;Tested build environment:
esp32:esp32:d32:PartitionScheme=min_spiffsCompatibility considerations
The existing
MARAUDER_CYD_3_5_INCHtarget does not currently have a GT911-specific flag and appears to represent the resistive-touch variant.Its TFT_eSPI setup defines GPIO33 as resistive
TOUCH_CS, while the capacitive ESP32-3248S035C uses GPIO33 as GT911 SDA.This draft adds GT911 support directly to
MARAUDER_CYD_3_5_INCH.For upstream integration, the maintainers may prefer to:
MARAUDER_CYD_3_5_INCHtarget;MARAUDER_CYD_3_5_INCH_CAP;A separate capacitive target would preserve the existing resistive 3.5-inch build unchanged.
Build-system dependency
This implementation uses:
from SensorLib.
The GitHub Actions workflow will therefore need to install a compatible SensorLib revision for the capacitive target. The current upstream build workflow does not appear to install SensorLib.
Scope of this contribution
This branch is provided as a working, hardware-tested implementation for the ESP32-3248S035C capacitive-touch variant.
It was developed and tested against ESP32 Marauder v1.13.0. I am sharing the code so the maintainers can review, adapt, split into a separate target, or cherry-pick the relevant changes as they prefer.
The branch is based on v1.13.0 rather than the latest
master, and the upstream build workflow does not currently install SensorLib.This PR is opened as a draft because it is primarily a tested code contribution and reference implementation, rather than a merge-ready upstream integration.