Add LCDwiki E32R40T (4.0" ST7796S 320x480) board support (#175) - #178
Draft
Keralots wants to merge 2 commits into
Draft
Add LCDwiki E32R40T (4.0" ST7796S 320x480) board support (#175)#178Keralots wants to merge 2 commits into
Keralots wants to merge 2 commits into
Conversation
New community env `e32r40t` for the LCDwiki 4.0" ESP32-32E display (issue #175): classic ESP32-WROOM-32E, ST7796S 320x480 over 4-wire SPI, XPT2046 resistive touch that shares the LCD SPI bus, onboard common-anode RGB LED (22/16/17). 4 MB flash / no PSRAM -> 1 printer (BOARD_LOW_RAM), DISPLAY_320x480 layout. - LGFX_E32R40T: Panel_ST7796 on VSPI + shared-bus Touch_XPT2046 (bus_shared, real MISO(12) on the bus so the touch can read; panel stays write-only). - Touch runs through the LovyanGFX getTouch() fallback (first env to use it), with a boot release-gate ported from the HSPI backend as a phantom guard. - New TOUCH_WAKE_LONGPRESS capability so the resistive wake-suppression covers both the HSPI and the shared-bus touch paths; main.cpp tests the capability. - displayDevice() exposes the concrete LGFX_Device for touch, since tft_ptr stays typed as the drawing base (LovyanGFX) for the JC3248 sprite retarget. - Board defaults + pin deny-lists in config.h / led.cpp / button.cpp / buzzer.cpp. - Drop HAS_ERROR_TEXT_TABLE (~36 KB) so the image fits the min_spiffs slot; sentences still come from the portal mirror, same trade as the C3s. Hardware unverified (no owner board); the #175 reporter will test builds.
Lets `python merge_bins.py --board e32r40t` (alias `e32`) produce the Full + OTA images for the LCDwiki E32R40T. Classic ESP32, so bootloader at 0x1000. Not added to release.py WEB_FLASHER_BOARDS - the board is still hardware- unverified and out of the published flasher set.
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.
Closes #175 once verified.
What
Adds a community env
e32r40tfor the LCDwiki "4.0inch ESP32-32E Display" (SKU E32R40T): classic ESP32-WROOM-32E, ST7796S 320x480 over 4-wire SPI, XPT2046 resistive touch that shares the LCD SPI bus, onboard common-anode RGB LED. 4 MB flash / no PSRAM → 1 printer (BOARD_LOW_RAM),DISPLAY_320x480layout.Same lcdwiki ESP32-32E family as the 2.8" CYD clone, but a bigger panel.
Notable bits
Bus_SPIas the LCD (bus_shared=true); the bus muxes the real MISO(12) so the touch can read, the panel stays write-only. This is the first env to drive touch through LovyanGFX'sgetTouch()fallback.displayDevice()accessor.getTouch()/setTouchCalibrate()live onlgfx::LGFX_Device, buttft_ptris intentionally typed as the drawing baseLovyanGFX(so JC3248 can retarget it to a sprite). AddeddisplayDevice()to reach the concrete device for touch — this is why the getTouch path had never compiled before.TOUCH_WAKE_LONGPRESScapability. The resistive wake-suppression inhandleWakeButton()now keys off a capability that covers both the HSPIUSE_XPT2046backend and this shared-bus path, instead of the driver macro.DISPLAY_320x480(links the ~107 KB inter_22 font). The image overran the min_spiffs slot by 672 B, soHAS_ERROR_TEXT_TABLEis dropped here (~36 KB) — error sentences come from the portal mirror, same trade as the C3s. firmware.bin now 1,931,024 / 1,966,080 B.config.h/led.cpp/button.cpp/buzzer.cpp;merge_bins.py --board e32r40tbuilds the images. Not added to the web flasher / release set yet.Validation
pio run -e e32r40tclean; firmware.bin fits the slot (35 KB free).TOUCH_WAKE_LONGPRESS=1) and ws_lcd_200 (capacitive,=0) both boot healthy.