DEKI/ENGINE docs
deki-sdcard 0.19.0
Deki package reference
deki-sdcard

SD card interface: mount, card state, capacity, and filesystem access

Repository: github.com/dekiengine/deki-sdcard · Latest release: 0.19.0 · Needs engine 0.19.0+

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

Shown in the editor as SD Card.

Components

Component Category Description
SDCardComponent System Mounts an SD card at boot so assets can load from it.

Component reference

SDCardComponent

Mounts an SD card at boot so assets can load from it.

Inspector name: SD Card Component · Category: System · Type: DekiSdCard::SDCardComponent

Property Type Default Constraints Description
mode enum "SPI" SPI, SDMMC1Bit, SDMMC4Bit How the card is wired. SPI needs four pins and works on any board; SDMMC is faster but needs dedicated pins, and 4-bit is faster than 1-bit.
mosiPin int32 23 0 to 48; shown when mode allows SPI mode: GPIO the board sends on, wired to the card's DI or CMD pad.
misoPin int32 19 0 to 48; shown when mode allows SPI mode: GPIO the board receives on, wired to the card's DO or DAT0 pad.
csPin int32 5 0 to 48; shown when mode allows SPI mode: chip select. Held low while this card is being talked to, which is what lets other devices share the bus.
spiHz int32 20000000 1 to 40; shown when mode allows SPI clock speed. 20 MHz suits most cards and short wiring; a card that mounts but then reads badly usually wants a lower figure.
sdmmcHz int32 20000000 1 to 40; shown when mode allows SDMMC clock speed. 20 MHz is a safe start; 40 MHz works on boards with short, well-matched traces.
cmdPin int32 15 0 to 48; shown when mode allows SDMMC mode: the command line the board uses to talk to the card.
d0Pin int32 2 0 to 48; shown when mode allows SDMMC mode: data line 0. The only data line 1-bit mode uses.
d1Pin int32 4 0 to 48; shown when mode allows SDMMC 4-bit mode: data line 1. Ignored in 1-bit mode.
d2Pin int32 12 0 to 48; shown when mode allows SDMMC 4-bit mode: data line 2. Ignored in 1-bit mode.
d3Pin int32 13 0 to 48; shown when mode allows SDMMC 4-bit mode: data line 3. Ignored in 1-bit mode.
clkPin int32 18 0 to 48 SDMMC mode: the clock line driving the card.
cdPin int32 -1 -1 to 48 Card-detect pin, if the socket has the switch for it. -1 when it does not, and the card is then assumed present.
required bool true Stop the boot when no card mounts. Off, the boot carries on without one: the screen and controls come up, and the game's assets, which live on the card, do not. For a handheld with a card slot on the side.

Changelog

0.19.0

Changed

  • minEngine 0.19.0: built against engine 0.19.0, whose component metadata records the package each class is in. A build of this package from before does not load and is rebuilt.

Added

  • Japanese, Simplified Chinese and Korean: editor/lang/ja.json, zh.json and ko.json translate the names, tooltips and enum values this package's components show in the Inspector.

0.18.0

Changed

  • minEngine 0.18.0. Reflection ABI 21: the package must be rebuilt.
  • Names follow the code style (deki-engine/docs/codestyle): types, functions and enum values are PascalCase, constants kPascalCase, members m_PascalCase, locals and parameters camelCase. The code is formatted with clang-format 22.
  • The functions the editor finds by name are PascalCase: DekiSDCardRegisterComponents, DekiSDCardGetAutoComponentCount, DekiSDCardEnsureRegistered and the rest. Built against engine ABI 21; a build of this package from before does not load and is rebuilt.
  • SDCardMode values are SDMMC1Bit and SDMMC4Bit. Scenes that saved the old names still load.

Removed

  • The former names from before 0.16.0 (bare class names, and deki-gpio's DekiEsp32::ESP32PinSetup). A scene that old is upgraded with 0.17 first.

Earlier releases: CHANGELOG.md.


Generated from the package's reflection data (engine 0.19.0). Property names are the keys used in scene files. Renames keep an alias (compatibility).