Skip to content

feat(lcd-154): add Waveshare ESP32-S3-Touch-LCD-1.54 board port#102

Open
Keralots wants to merge 1 commit into
HermannBjorgvin:mainfrom
Keralots:feature/lcd-154-port
Open

feat(lcd-154): add Waveshare ESP32-S3-Touch-LCD-1.54 board port#102
Keralots wants to merge 1 commit into
HermannBjorgvin:mainfrom
Keralots:feature/lcd-154-port

Conversation

@Keralots

Copy link
Copy Markdown

New board folder firmware/src/boards/waveshare_lcd_154/ + [env:waveshare_lcd_154].

First non-AMOLED port: 240x240 ST7789 over plain 4-wire SPI (Arduino_GFX), LEDC-PWM
backlight brightness (no display brightness command), CST816T touch via a minimal
vendored reader (same approach as the AMOLED-1.8 port), QMI8658 present but unused.

Hardware notes

  • Module is ESP32-S3R8: 16 MB quad flash + 8 MB octal PSRAM, hence qio_opi and
    the 16 MB partition layout (esptool-verified — the R8 combo is easy to get wrong).
  • No PMU. The ETA6098 charger is standalone, so battery % comes from the VBAT
    divider on GPIO1; charging/VBUS state is not readable and reports false.
  • Power off is synthesized in software: holding the "+/KEY" button for 8 s drops
    the BAT_EN latch and deep-sleeps — a hard power cut on battery, pseudo-off on USB
    (BOOT press wakes). Mirrors the AXP boards' 8 s PKEY shutdown; the hold-to-pair
    gesture disarms at 6 s, so the timings compose with zero shared-code changes.
  • ES8311 speaker wired to the shared session-reset chime engine.

Shared-code changes (no main.cpp changes)

  • ui.cpp: new "small" breakpoint in compute_layout() for panels under 300 px
    tall — fonts two steps down, half-height panels, the 80x80 logo dropped (it would
    cover a third of a 240-wide screen). Fonts/paddings/bar/pill sizes moved into the
    existing Layout struct; the two existing breakpoints keep their exact values.
  • The battery indicator is now created only when caps.has_battery is set —
    previously boards without battery telemetry drew a static empty-battery glyph.

Verified on hardware

Display, touch, BLE pairing + daemon on Windows (real usage data on screen),
BOOT/secondary HID keys, PWR short/long/8-s power-off, battery ADC, chime.

Usage screen Splash Board
usage splash back

First non-AMOLED port: 240x240 ST7789 over plain 4-wire SPI, CST816T
touch, battery ADC only (no PMU - 8s power-off synthesized in software
via the BAT_EN latch), ES8311 speaker driving the session-reset chime.

- new "small" breakpoint in compute_layout() for <300px-tall panels:
  fonts two steps down, half-height panels, 80x80 logo dropped
- battery indicator now deleted (not just empty) on boards without
  battery telemetry, per the HAL contract
- module is S3R8: quad flash + octal PSRAM, hence qio_opi and the
  16MB partition layout
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant