DEKI/ENGINE ドキュメント
deki-spi 0.20.2
Deki パッケージリファレンス
deki-spi

SPI バスとその上のデバイス。起動ステップでバスを一度だけ開始し、ディスプレイ、SD カード、無線がそれを共有します。

リポジトリ: github.com/dekiengine/deki-spi · 最新リリース: 0.20.0 · エンジン 0.20.0 以降が必要

DekiEditor --packages-add deki-spi <project> か、パッケージマネージャーからインストールします。エンジン自身のコンポーネントと C++ API は Deki のドキュメントにあります。

エディターでは SPI と表示されます。

コンポーネント

コンポーネント カテゴリ 説明
SPIBusComponent システム 起動時に SPI バスを 1 つ開始します。そのバス上のデバイス (ディスプレイ、SD カード、無線機) はすべてこれを共有します。

コンポーネントリファレンス

SPIBusComponent

起動時に SPI バスを 1 つ開始します。そのバス上のデバイス (ディスプレイ、SD カード、無線機) はすべてこれを共有します。

インスペクターでの名前: SPI バスコンポーネント · カテゴリ: システム · 型: DekiSpi::SPIBusComponent

プロパティ 型 デフォルト 制約 説明
spiHost int32 1 0 から 3 チップのどの SPI コントローラーを使うかを、プラットフォームの番号で指定します。ESP32-S3 では 1 = SPI2、2 = SPI3 です。
sclkPin int32 -1 -1 から 48 クロック (SCK) の GPIO です。このバスのすべてのデバイスで共有します。
mosiPin int32 -1 -1 から 48 データ出力 (MOSI) の GPIO です。クアッドバスでは IO0 です。
misoPin int32 -1 -1 から 48 データ入力 (MISO) の GPIO です。クアッドバスでは IO1 です。バス上で何も読み取らないときは -1 です。
io2Pin int32 -1 -1 から 48 クアッドバス用の IO2 です (QSPI 接続の AMOLED パネルなど)。通常の SPI バスでは -1 です。
io3Pin int32 -1 -1 から 48 クアッドバス用の IO3 です。通常の SPI バスでは -1 です。
maxTransferBytes int32 32768 64 から 262144 バスが 1 回で扱える最長の転送です。ディスプレイはこの長さの転送でピクセルを送るので、ディスプレイのあるバスではチップの上限 (ESP32-S3 では 32768) にしておきます。

変更履歴

変更履歴は英語です。

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.

それ以前のリリース: CHANGELOG.md


パッケージのリフレクションデータから生成しています (エンジン 0.20.2)。プロパティ名はシーンファイルで使われるキーです。名前を変えても別名が残ります (互換性)。