DEKI/ENGINE docs
deki-spi 0.20.2
Deki package reference
deki-spi

SPI buses and their devices: a boot step that starts a bus, shared by displays, SD cards and radios. The platform package supplies the backend

Repository: github.com/dekiengine/deki-spi · Latest release: 0.20.0 · Needs engine 0.20.0+

Install with DekiEditor --packages-add deki-spi <project>, or from the Package Manager. The engine's own components and C++ API are in the Deki docs.

Shown in the editor as SPI.

Components

Component Category Description
SPIBusComponent System Starts one SPI bus at boot. Every device on that bus (display, SD card, radio) shares it.

Component reference

SPIBusComponent

Starts one SPI bus at boot. Every device on that bus (display, SD card, radio) shares it.

Inspector name: SPI Bus Component · Category: System · Type: DekiSpi::SPIBusComponent

Property Type Default Constraints Description
spiHost int32 1 0 to 3 Which of the chip's SPI controllers to use, as the platform numbers them. On an ESP32-S3: 1 = SPI2, 2 = SPI3.
sclkPin int32 -1 -1 to 48 GPIO carrying the clock (SCK). Shared by every device on this bus.
mosiPin int32 -1 -1 to 48 GPIO carrying data out (MOSI); IO0 on a quad bus.
misoPin int32 -1 -1 to 48 GPIO carrying data in (MISO); IO1 on a quad bus. -1 when nothing on the bus is read.
io2Pin int32 -1 -1 to 48 IO2, for a quad bus (an AMOLED panel over QSPI). -1 on an ordinary SPI bus.
io3Pin int32 -1 -1 to 48 IO3, for a quad bus. -1 on an ordinary SPI bus.
maxTransferBytes int32 32768 64 to 262144 The longest transfer the bus takes in one go. A display sends pixels in transfers this long, so keep it at the chip's limit (32768 on an ESP32-S3) on a bus with a display.

Changelog

0.20.0

Changed

  • minEngine 0.20.0: built against engine 0.20.0. A build of this package from before does not load and is rebuilt.

Added

  • The package: IDekiSPIBus and IDekiSPIDevice, the DekiSPI registry the platform's factory and the buses are found in, and SPIBusComponent, which starts a bus from the boot scene. A transfer has optional command and address phases, one, two or four data lines, a data/command pin level and a chip select that can stay asserted into the next transfer; long writes are queued for DMA and waited for. A queued transfer of four bytes or less is copied, so a command can be queued from the stack.
  • DeviceConfig::readClockHz: a device read at a slower clock than it is written (a display written at 80 MHz and read back at 10), and DeviceConfig::threeWire, for a device that answers on MOSI.

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).