Skip to main content

Module display

Module display 

Source
Expand description

The 1.14“ 240×135 ST7789V2 LCD, in landscape with the keyboard below.

Drawing goes into a Frame in RAM; Display::flush sends only the rows that changed, by DMA straight from the framebuffer (no copy). A full frame is 64 800 bytes, about 13 ms at the 40 MHz SPI clock.

Structs§

Display
The LCD driver.
DisplayResources
SPI3, DMA channel 0, and the LCD’s control pins.

Constants§

HEIGHT
Landscape height in pixels.
PANEL
How the panel sits in the ST7789’s 240×320 memory, per M5GFX.
ROTATION
Keyboard-below landscape orientation.
SPI_FREQUENCY
SPI clock. GPIO35/36 are routed through the GPIO matrix, not IOMUX, which caps reliable output at 40 MHz (M5GFX uses the same).
WIDTH
Landscape width in pixels.

Functions§

framebuffer
try_framebuffer, panicking if it was already taken.
try_framebuffer
The board’s framebuffer, placed in .bss (64.8 KB RAM, zero flash). Returns None after the first call: take it once at start-up and share the &'static mut between apps.

Type Aliases§

Error
Display errors.
Frame
A full-screen framebuffer.