DEKI/ENGINE 文档
deki-sdcard 0.19.0
Deki 包参考
deki-sdcard

SD 卡支持。挂载 SD 卡,让资源管理器在运行时从中流式读取。

仓库:github.com/dekiengine/deki-sdcard · 最新版本:0.19.0 · 需要引擎 0.19.0 或更高版本

使用 DekiEditor --packages-add deki-sdcard <project> 或通过包管理器安装。引擎自身的组件和 C++ API 见 Deki 文档。

在编辑器中显示为 **SD Card**。

组件

组件 类别 说明
SDCardComponent 系统 启动时挂载 SD 卡,以便从中加载资源。

组件参考

SDCardComponent

启动时挂载 SD 卡,以便从中加载资源。

检视器中的名称:SD 卡组件 · 类别:系统 · 类型:DekiSdCard::SDCardComponent

属性 类型 默认值 约束 说明
mode enum "SPI" SPI, SDMMC1Bit, SDMMC4Bit 卡的接线方式。SPI 需要 4 个引脚,适用于任何开发板;SDMMC 更快,但需要专用引脚,且 4 位模式比 1 位模式更快。
mosiPin int32 23 0 到 48;mode 允许时显示 SPI 模式:开发板用于发送的 GPIO,连接到卡的 DI 或 CMD 焊盘。
misoPin int32 19 0 到 48;mode 允许时显示 SPI 模式:开发板用于接收的 GPIO,连接到卡的 DO 或 DAT0 焊盘。
csPin int32 5 0 到 48;mode 允许时显示 SPI 模式:片选。与此卡通信时保持低电平,因此其他设备可以共用总线。
spiHz int32 20000000 1 到 40;mode 允许时显示 SPI 时钟速度。20 MHz 适合大多数卡和较短的接线;如果卡能挂载但读取出错,通常需要降低此值。
sdmmcHz int32 20000000 1 到 40;mode 允许时显示 SDMMC 时钟速度。从 20 MHz 开始比较稳妥;走线短且长度匹配良好的开发板可用 40 MHz。
cmdPin int32 15 0 到 48;mode 允许时显示 SDMMC 模式:开发板与卡通信所用的命令线。
d0Pin int32 2 0 到 48;mode 允许时显示 SDMMC 模式:数据线 0。1 位模式只使用这一条数据线。
d1Pin int32 4 0 到 48;mode 允许时显示 SDMMC 4 位模式:数据线 1。1 位模式下不使用。
d2Pin int32 12 0 到 48;mode 允许时显示 SDMMC 4 位模式:数据线 2。1 位模式下不使用。
d3Pin int32 13 0 到 48;mode 允许时显示 SDMMC 4 位模式:数据线 3。1 位模式下不使用。
clkPin int32 18 0 到 48 SDMMC 模式:驱动卡的时钟线。
cdPin int32 -1 -1 到 48 卡检测引脚(卡座带检测开关时使用)。没有时设为 -1,此时视为卡始终插入。
required bool true 无法挂载卡时停止启动。关闭时,没有卡也会继续启动:屏幕和操控可以使用,但存放在卡上的游戏资源不会加载。适用于侧面带卡槽的掌机。

更新日志

更新日志为英文。

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.

更早的版本:CHANGELOG.md


由包的反射数据生成(引擎 0.19.0)。属性名就是场景文件中使用的键。重命名后会保留别名(兼容性)。