|
deki-display 0.20.2
Deki package reference
|
Deki's own display library: panel controllers on SPI, quad SPI or 8- and 16-bit parallel buses, touch controllers, and frames that never tear
Repository: github.com/dekiengine/deki-display · Latest release: 0.20.0 · Needs engine 0.20.0+ · Requires: deki-spi, deki-gpio, deki-i2c, deki-input, deki-rendering
Install with DekiEditor --packages-add deki-display <project>, or from the Package Manager. The engine's own components and C++ API are in the Deki docs.
Shown in the editor as Display.
| Component | Category | Description |
|---|---|---|
| DisplayPanelComponent | Display | Drives a display panel (ST7789, ILI9341, GC9A01, ...) over SPI, quad SPI or an 8- or 16-bit parallel bus with Deki's own display library, and gives it to the engine. |
| TouchPanelComponent | Display | Reads a panel's touch controller (GT911, CST816, FT5x06 on I2C; XPT2046 on SPI) with Deki's own display library, as pointer input. |
Parts you can leave out of a build. A feature with a define is switched there; the rest are stripped with their components.
| Feature | Define | Default |
|---|---|---|
| Display Panel | DEKI_FEATURE_DISPLAY_PANEL | on |
| Touch Panel | DEKI_FEATURE_DISPLAY_TOUCH | on |
Drives a display panel (ST7789, ILI9341, GC9A01, ...) over SPI, quad SPI or an 8- or 16-bit parallel bus with Deki's own display library, and gives it to the engine.
Inspector name: Display Panel Component · Category: Display · Type: DekiDisplay::DisplayPanelComponent
| Property | Type | Default | Constraints | Description |
|---|---|---|---|---|
| controller | enum | "ST7789" | ST7789, RM67162, ILI9341, ST7735, ST7735S, GC9A01, ST7789P3, ST7796, ILI9488, SSD1351, CO5300 | The panel's controller IC |
| initSequence | string | "" | The commands that start this panel module, replacing the controller's default. A panel's voltages, VCOM and gamma belong to the module, not the controller, so a board sets them here. One command per line or ';': its hex byte, then its parameter bytes, then optionally 'delay <ms>'. '#' starts a comment. Empty: the controller's default | |
| panelWidth | int32 | 240 | 1 to 1024 | Visible width in pixels, before rotation |
| panelHeight | int32 | 320 | 1 to 1024 | Visible height in pixels, before rotation |
| rotation | enum | "Landscape" | Portrait, Landscape, Portrait180, Landscape270, PortraitMirror, LandscapeMirror, Portrait180Mirror, Landscape270Mirror | How the panel is turned |
| offsetX | int32 | 0 | Where the visible panel starts in the controller's memory, across (for panels with a non-zero origin) | |
| offsetY | int32 | 0 | Where the visible panel starts in the controller's memory, down | |
| invertColor | bool | false | Invert the panel's colours (most IPS panels need it on) | |
| rgbOrder | bool | false | The panel takes red first. Off sets the controller's BGR order | |
| busType | enum | "SPI" | SPI, QSPI, Parallel8, Parallel16 | How the panel is wired: SPI with a data/command pin (most LCDs), quad SPI (AMOLED panels such as the RM67162), which needs an SPI Bus with IO2 and IO3, or an 8- or 16-bit parallel bus (8080), which this component starts itself |
| spiHost | int32 | 1 | 0 to 3; shown when busType allows | The SPI host the panel is on, as the SPI Bus component that starts it numbers it (on an ESP32-S3: 1 = SPI2, 2 = SPI3) |
| spiWriteHz | int32 | 40000000 | shown when busType allows | SPI clock for the panel. 80 MHz is the ESP32-S3's fastest, and most ST7789 modules take it |
| parallelWriteHz | int32 | 20000000 | shown when busType allows | Write strobe frequency on the parallel bus. Most panels take 20 MHz; some, with short wires, more |
| dcPin | int32 | -1 | -1 to 48; shown when busType allows | Data/command pin (DC, also called RS) |
| wrPin | int32 | -1 | -1 to 48; shown when busType allows | Write strobe pin (WR) |
| rdPin | int32 | -1 | -1 to 48; shown when busType allows | Read strobe pin (RD), held high: the panel is only written (-1 = tied high on the board) |
| d0Pin | int32 | -1 | -1 to 48; shown when busType allows | Data line D0 |
| d1Pin | int32 | -1 | -1 to 48; shown when busType allows | Data line D1 |
| d2Pin | int32 | -1 | -1 to 48; shown when busType allows | Data line D2 |
| d3Pin | int32 | -1 | -1 to 48; shown when busType allows | Data line D3 |
| d4Pin | int32 | -1 | -1 to 48; shown when busType allows | Data line D4 |
| d5Pin | int32 | -1 | -1 to 48; shown when busType allows | Data line D5 |
| d6Pin | int32 | -1 | -1 to 48; shown when busType allows | Data line D6 |
| d7Pin | int32 | -1 | -1 to 48; shown when busType allows | Data line D7 |
| d8Pin | int32 | -1 | -1 to 48; shown when busType allows | Data line D8 |
| d9Pin | int32 | -1 | -1 to 48; shown when busType allows | Data line D9 |
| d10Pin | int32 | -1 | -1 to 48; shown when busType allows | Data line D10 |
| d11Pin | int32 | -1 | -1 to 48; shown when busType allows | Data line D11 |
| d12Pin | int32 | -1 | -1 to 48; shown when busType allows | Data line D12 |
| d13Pin | int32 | -1 | -1 to 48; shown when busType allows | Data line D13 |
| d14Pin | int32 | -1 | -1 to 48; shown when busType allows | Data line D14 |
| d15Pin | int32 | -1 | -1 to 48; shown when busType allows | Data line D15 |
| csPin | int32 | -1 | -1 to 48 | Chip select pin (-1 = tied low) |
| rstPin | int32 | -1 | -1 to 48 | Reset pin (-1 = not connected) |
| tePin | int32 | -1 | -1 to 48 | The panel's tearing-effect (TE) output (-1 = not connected). With it, frames never tear: each starts as the panel starts a refresh, and goes in the panel's own row order, a turned screen turned as it is sent and drawn in strips of columns |
| scanlineSync | bool | true | shown when busType allows | With no TE line wired, read the panel's scanline instead, so frames still never tear. A panel that cannot be read back is sent as frames are drawn, and the boot log says so |
| spiReadHz | int32 | 10000000 | shown when scanlineSync allows | SPI clock for reading the panel back, slower than writing it (the ST7789 reads reliably at 10 MHz) |
| readsOnMosi | bool | false | shown when scanlineSync allows | The panel answers on its data-in line (SDA both ways, as the LilyGO T-Deck's does), not on MISO |
| blPin | int32 | -1 | -1 to 48 | Backlight pin (-1 = none). Held high for on: a backlight driver dimmed by counting pulses (the LilyGO T-Deck's) wants exactly that |
| blInvert | bool | false | The backlight is on when its pin is low | |
| memoryWidth | int32 | 0 | 0 to 1024 | The controller's memory width, which may be more than the visible width (0 = the controller's) |
| memoryHeight | int32 | 0 | 0 to 1024 | The controller's memory height (0 = the controller's) |
| usePsram | bool | false | Keep the framebuffer in PSRAM instead of internal RAM: frees a screen's worth of internal RAM, drawing is slower | |
| doubleBuffer | bool | false | Two framebuffers, swapped after each frame | |
| asyncPresent | bool | true | Send each frame from the chip's other core while the next is drawn: a frame costs the longer of drawing and sending instead of both. Needs a dual-core chip and two frames of external memory (PSRAM); without them, frames are sent as they are drawn, and the boot log says so |
Reads a panel's touch controller (GT911, CST816, FT5x06 on I2C; XPT2046 on SPI) with Deki's own display library, as pointer input.
Inspector name: Touch Panel Component · Category: Display · Type: DekiDisplay::TouchPanelComponent
| Property | Type | Default | Constraints | Description |
|---|---|---|---|---|
| controller | enum | "GT911" | GT911, CST816, FT5x06, XPT2046 | The touch controller IC |
| i2cPort | int32 | 0 | 0 to 3; shown when controller allows | The I2C port it is on (an I2C Bus component must start that port before this one) |
| i2cAddress | int32 | 0 | 0 to 127; shown when controller allows | Its I2C address; 0 takes the controller's usual one (GT911: 0x5D, falling back to 0x14; CST816: 0x15; FT5x06: 0x38) |
| spiHost | int32 | 1 | 0 to 3; shown when controller allows | The SPI host it is on, as the SPI Bus component that starts it numbers it (often the display's) |
| csPin | int32 | -1 | -1 to 48; shown when controller allows | Its chip select pin |
| spiHz | int32 | 1000000 | shown when controller allows | SPI clock for the touch controller. The XPT2046 reads well at 1 MHz and takes up to 2.5 MHz |
| intPin | int32 | -1 | -1 to 48 | Interrupt pin: the controller pulls it low when a touch report is waiting, or while pressed (the XPT2046's PENIRQ) (-1 = not wired, read every frame) |
| rstPin | int32 | -1 | -1 to 48; shown when controller allows | Reset pin (-1 = not connected) |
| xMin | int32 | 0 | Minimum raw X from the touch controller, along the panel's width before the display is rotated (capacitive: 0; an XPT2046 reads from about 300 and needs calibrating) | |
| xMax | int32 | 239 | Maximum raw X from the touch controller, along the panel's width before the display is rotated (a 240x320 panel shown in landscape: 239) | |
| yMin | int32 | 0 | Minimum raw Y from the touch controller, along the panel's height before the display is rotated | |
| yMax | int32 | 319 | Maximum raw Y from the touch controller, along the panel's height before the display is rotated (a 240x320 panel shown in landscape: 319) | |
| offsetRotation | enum | "None" | None, CW_90, CW_180, CW_270, Mirror, Mirror_CW_90, Mirror_CW_180, Mirror_CW_270 | How the touch controller is turned against the panel, added to the display rotation. None when the controller reports in the panel's own orientation |
Earlier releases: CHANGELOG.md.
Generated from the package's reflection data (engine 0.20.2). Property names are the keys used in scene files. Renames keep an alias (compatibility).