Files
wadamesh/src
Confituurke c2d50b5430 feat(sensecap-indicator): ST7701S RGB panel on LovyanGFX
IndicatorDisplay drives the 480x480 ST7701S through LovyanGFX's Bus_RGB
and Panel_ST7701 on the stock core; the CrowPanel 5.0 drives its RGB
panel through the same Bus_RGB. The panel's CS and RESET sit on the TCA9535, so LovyanGFX
gets pin_cs/pin_rst = -1 and begin() drives them through IndicatorIo:
reset pulse, CS low, lcd.init(), CS high. The bus lock is held from CS
low to CS high because the panel's 3-wire init shares GPIO41/48 with
the radio SPI, and no other task may move the radio's NSS meanwhile.

The second init list is Meshtastic device-ui's Indicator list (GPL-3.0,
credited in NOTICE): MADCTL 0x10 and SDIR 0x04 in BK0 flip both axes,
and the closing 0xFF,0xFF terminator keeps the colours from coming up
inverted.

The pixel clock is INDICATOR_PCLK_HZ, 12 MHz by default. The RGB bus
reads its frame buffer out of PSRAM continuously and this core has no
bounce buffers, so PSRAM bandwidth under Wi-Fi and flash traffic sets
the limit, not the panel; 12 MHz leaves margin for that, and the value
is a build flag.

The backlight is Light_PWM on GPIO45, LEDC channel 7; brightness 0
writes duty 0, so it goes dark. begin() returns false with the
backlight off when lcd.init() or any expander write in the sequence
fails, since the panel may then have missed its reset or init. UITask
keeps driving the backlight through the global display even when
begin() failed, so setBrightness() and turnOn() do nothing until the
panel has come up; otherwise the first brightness or wake request
would light a blank panel.

UITask: a 480 px draw band in internal DMA RAM (with LVGL told its full
size), because the RGB panel scans its frame buffer out of PSRAM all
the time and an internal band makes the flush a single PSRAM write. The
resolution is 480x480 with no UI rotation, and the board shares the
Wio L2's brightness, screen-sleep and no-keyboard-rotate branches.

Signed-off-by: Confituurke <9595028+Confituurke@users.noreply.github.com>
2026-10-17 22:39:25 +02:00
..