Repository navigation
Conversation
First hardware bring-up. The ST77922 only draws correctly with draw windows aligned to 4 pixels in x, so Panel_ST77922 renders into a PSRAM framebuffer and flushes 4-aligned dirty rectangles (software rotation). Adds a QSPI bus branch to the LovyanGFX HAL and a custom-panel-header hook. Touch protocol follows the vendor driver but is not yet verified on hardware. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The valid flag is bit 7 and x_h is bits 5:0 of the first report byte (C bitfield layout), not bit 0 / bits 7:2, so every touch was discarded. Scan all five report slots and use the vendor 100 ms reset pulse. Verified on hardware. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
… ES8311 audio - Define HAS_RGB_LED and LED type/order/count (WS2812B GRB, 1 pixel). - Battery: calibrated ADC with averaging and a Li-ion voltage curve. - Audio: use Bruce's HAS_NS4168_SPKR/ES8311_CODEC macros, drive the active-low amp enable on GPIO1, and add the ES8311 speaker setup hook. Verified audible with tone/say; microphone path not implemented. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Verified against a direct LiPo cell: the pin tracks terminal voltage (~4.1 V charging, ~3.65 V loaded, ~3.75 V with LED off). Add an EMA to tame load-induced sag and floor valid readings at 1% so the status bar indicator is always drawn. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…IO45/IO46 No SPI bus is exposed on this board, so leave the generic SPI and every radio/SD-SPI pin unassigned instead of aliasing the QSPI display pins. Map IR TX/RX to the two spare GPIOs. Add RF_TX/RX_DEFAULT_PIN overrides in configPins.h (default unchanged) so RF no longer defaults to the I2C pair that carries touch and the audio codec. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Member
|
Porting method has changed. these Json files and pins_arduino.h are not required (and should not be changed) display is using DisplayDrivers lib. use |
This branch has not been deployed
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.
Proposed Changes
Adds a new board, env
hosyond-35-s3, for the LCDWiki "3.5inch ESP32-S3 Display" (models ES3C35P with speaker / ES3C35P-NS without): ESP32-S3 (16 MB flash, 8 MB OPI PSRAM), 320x480 IPS panel on an ST77922 QSPI controller with its own I2C touch, microSD (4-bit SDMMC), ES8311 codec + amplifier, WS2812B RGB LED, LiPo charger.Hardware: https://www.lcdwiki.com/3.5inch_ESP32-S3_Display (docs, schematic, datasheets, vendor demos). Example listing: https://www.amazon.com/dp/B0H28X8SQ4
The panel needed a custom LovyanGFX panel class (
boards/hosyond-35-s3/lgfx_st77922.h); there is no ST77922 driver in LovyanGFX. See the quirks below, they are the interesting part.Shared-code changes (all small, off by default):
lib/HAL/display/lovyan.{h,cpp}: aLOVYAN_QSPI_BUSbranch (LovyanGFXBus_SPIwithpin_io0..io3) and aLOVYAN_CUSTOM_PANEL_HEADERinclude hook for board-supplied panel classes. Only active when those macros are defined; no other board in the tree uses LovyanGFX.src/core/configPins.h:RF_TX_DEFAULT_PIN/RF_RX_DEFAULT_PIN, overridable defaults. The default is unchanged (GROVE_SDA/GROVE_SCL), so existing boards behave exactly as before.platformio.ini: a commented;hosyond-35-s3entry in the env list.Types of Changes
New feature (new board). No breaking changes.
Verification
Hand-tested on real hardware (one unit, 1000 mAh LiPo attached):
toneandsayaudible on a connected speakerNot tested: microphone (not implemented), actual IR/RF hardware on IO45/IO46, display clocks above 40 MHz, other boards beyond a compile check of
m5stack-cardputer(see Testing).Build:
pio run -e hosyond-35-s3, then flash with esptool.Testing
No automated tests; this is hardware-bound. I tried compiling
m5stack-cardputerto check the sharedconfigPins.hchange against another board. It fails here, but every error is inside FastLED's own sources (animartrix_detail/*,fft_impl), none in Bruce or this PR. Cause: that board's ini passes-DFP=1 -DFM=2 -DFG=3(18 board inis do), while FastLED 3.10.5, whichfastled/FastLED @^3.10.3now resolves to, usesFPas a type alias (using FP = fl::s16x16). Not caused by this PR; flagging it in case CI hits it. This board avoids it by definingFP/FM/FGasstatic const uint8_tin its variant header instead of macros.Linked Issues
None.
User-Facing Change
Further Comments
Board quirks worth knowing (also in
boards/hosyond-35-s3/README.md):Panel_ST77922therefore renders into a PSRAM framebuffer (Panel_FrameBufferBase) and flushes the dirty rectangle widened to x%4. Rotation is done in software, so the panel always stays at its native portrait MADCTL.COLMOD0x01 and 0x55 behave the same. MADCTL bit 3 swaps R/B, soTFT_RGB_ORDER=1. INVON is the panel's natural state, so the panel class flipssetInvertand the ini usesTFT_INVERTION=0.validis bit 7 andx_his bits 5:0 (easy to get backwards, it made every touch look invalid). Coordinates are portrait-native panel pixels. The bus is shared with the ES8311 codec (0x18) and the external I2C header; an unidentified device also answers at 0x28.AUDIO_EN, GPIO1) is active low and defaults to disabled. Bruce's sound features are gated onHAS_NS4168_SPKR(plusBCLK/WCLK/DOUT/MCLK), and the board provides_setup_codec_speaker()to drive the amp enable and program the codec (adapted from the ES3C28P port). The microphone path is not implemented.pio run -t uploadcan crash on cp1252 consoles, so flash with esptool directly. PlatformIO's build cache returned a stalefirmware.binonce; build with a freshPLATFORMIO_BUILD_CACHE_DIRif results look wrong.patch.pyneeds PlatformIO'sScriptsdirectory on PATH for its nestedpio pkg exec. Bruce stores rotation, inversion and pins in flash (/brucePins.conf), so erase flash or delete that file when testing defaults. A tiny serial-output I2C bench was far faster for bringing up touch than debugging inside Bruce.HOSYOND_TEST_PATTERN(off by default) draws a geometry test card at boot, useful after display changes.🤖 Generated with Claude Code