PROTOCOLS
SpiImpl
定義於 fuchsia.hardware.spiimpl/spi-impl.fidl
Sspire 驅動程式適用的低階通訊協定。
ExchangeVector
全雙工 SPI 交易。收到的資料會與傳輸作業的長度完全相同 緩衝區。
要求
| 名稱 | 類型 | 
|---|---|
| chip_select | uint32 | 
| txdata | vector<uint8> | 
回應
| 名稱 | 類型 | 
|---|---|
| payload | SpiImpl_ExchangeVector_Result | 
ExchangeVmo
要求
| 名稱 | 類型 | 
|---|---|
| chip_select | uint32 | 
| tx_buffer | fuchsia.hardware.sharedmemory/SharedVmoBuffer | 
| rx_buffer | fuchsia.hardware.sharedmemory/SharedVmoBuffer | 
回應
| 名稱 | 類型 | 
|---|---|
| payload | SpiImpl_ExchangeVmo_Result | 
GetChipSelectCount
傳回可用或驅動程式庫程式執行個體提供的方塊選取行數。 用來當做「chip_select」可接受的值上限欄位 和 ExchangeVmo() 方法
要求
<空白>
回應
| 名稱 | 類型 | 
|---|---|
| count | uint32 | 
LockBus
鎖定公車。
要求
| 名稱 | 類型 | 
|---|---|
| chip_select | uint32 | 
回應
| 名稱 | 類型 | 
|---|---|
| payload | SpiImpl_LockBus_Result | 
ReceiveVector
半雙工會從 SPI 裝置接收資料。一律讀取要求的完整大小
要求
| 名稱 | 類型 | 
|---|---|
| chip_select | uint32 | 
| size | uint32 | 
回應
| 名稱 | 類型 | 
|---|---|
| payload | SpiImpl_ReceiveVector_Result | 
ReceiveVmo
要求
| 名稱 | 類型 | 
|---|---|
| chip_select | uint32 | 
| buffer | fuchsia.hardware.sharedmemory/SharedVmoBuffer | 
回應
| 名稱 | 類型 | 
|---|---|
| payload | SpiImpl_ReceiveVmo_Result | 
RegisterVmo
權利是包含 SpiVmoRight 值的位元欄位,可決定讀取/寫入 實作項目使用的權限。
要求
| 名稱 | 類型 | 
|---|---|
| chip_select | uint32 | 
| vmo_id | uint32 | 
| vmo | fuchsia.mem/Range | 
| rights | fuchsia.hardware.sharedmemory/SharedVmoRight | 
回應
| 名稱 | 類型 | 
|---|---|
| payload | SpiImpl_RegisterVmo_Result | 
ReleaseRegisteredVmos
釋出所有註冊至這個 Chip_select 的 VMO。核心驅動程式在用戶端之後呼叫 連線中斷,也不再需要 VMO。
要求
| 名稱 | 類型 | 
|---|---|
| chip_select | uint32 | 
TransmitVector
半雙工會將資料傳輸至 SPI 裝置;一律在成功時傳輸整個緩衝區。
要求
| 名稱 | 類型 | 
|---|---|
| chip_select | uint32 | 
| data | vector<uint8> | 
回應
| 名稱 | 類型 | 
|---|---|
| payload | SpiImpl_TransmitVector_Result | 
TransmitVmo
要求
| 名稱 | 類型 | 
|---|---|
| chip_select | uint32 | 
| buffer | fuchsia.hardware.sharedmemory/SharedVmoBuffer | 
回應
| 名稱 | 類型 | 
|---|---|
| payload | SpiImpl_TransmitVmo_Result | 
UnlockBus
解鎖公車。
要求
| 名稱 | 類型 | 
|---|---|
| chip_select | uint32 | 
回應
| 名稱 | 類型 | 
|---|---|
| payload | SpiImpl_UnlockBus_Result | 
UnregisterVmo
要求
| 名稱 | 類型 | 
|---|---|
| chip_select | uint32 | 
| vmo_id | uint32 | 
回應
| 名稱 | 類型 | 
|---|---|
| payload | SpiImpl_UnregisterVmo_Result | 
結構
SpiImpl_ExchangeVector_Response
定義於 fuchsia.hardware.spiimpl/spi-impl.fidl
| 欄位 | 類型 | 說明 | 預設 | 
|---|---|---|---|
| rxdata | vector<uint8> | 無預設 | 
SpiImpl_ExchangeVmo_Response
定義於 fuchsia.hardware.spiimpl/spi-impl.fidl
<空白>
SpiImpl_LockBus_Response
定義於 fuchsia.hardware.spiimpl/spi-impl.fidl
<空白>
SpiImpl_ReceiveVector_Response
定義於 fuchsia.hardware.spiimpl/spi-impl.fidl
| 欄位 | 類型 | 說明 | 預設 | 
|---|---|---|---|
| data | vector<uint8> | 無預設 | 
SpiImpl_ReceiveVmo_Response
定義於 fuchsia.hardware.spiimpl/spi-impl.fidl
<空白>
SpiImpl_RegisterVmo_Response
定義於 fuchsia.hardware.spiimpl/spi-impl.fidl
<空白>
SpiImpl_TransmitVector_Response
定義於 fuchsia.hardware.spiimpl/spi-impl.fidl
<空白>
SpiImpl_TransmitVmo_Response
定義於 fuchsia.hardware.spiimpl/spi-impl.fidl
<空白>
SpiImpl_UnlockBus_Response
定義於 fuchsia.hardware.spiimpl/spi-impl.fidl
<空白>
SpiImpl_UnregisterVmo_Response 資源
定義於 fuchsia.hardware.spiimpl/spi-impl.fidl
| 欄位 | 類型 | 說明 | 預設 | 
|---|---|---|---|
| vmo | handle<vmo> | 無預設 | 
聯合國
SpiImpl_ExchangeVector_Result 嚴格
定義於 fuchsia.hardware.spiimpl/spi-impl.fidl
| Ordinal | Variant | 類型 | 說明 | 
|---|---|---|---|
| 1 | response | SpiImpl_ExchangeVector_Response | |
| 2 | err | zx/Status | 
SpiImpl_ExchangeVmo_Result 嚴格
定義於 fuchsia.hardware.spiimpl/spi-impl.fidl
| Ordinal | Variant | 類型 | 說明 | 
|---|---|---|---|
| 1 | response | SpiImpl_ExchangeVmo_Response | |
| 2 | err | zx/Status | 
SpiImpl_LockBus_Result 嚴格
定義於 fuchsia.hardware.spiimpl/spi-impl.fidl
| Ordinal | Variant | 類型 | 說明 | 
|---|---|---|---|
| 1 | response | SpiImpl_LockBus_Response | |
| 2 | err | zx/Status | 
SpiImpl_ReceiveVector_Result 嚴格
定義於 fuchsia.hardware.spiimpl/spi-impl.fidl
| Ordinal | Variant | 類型 | 說明 | 
|---|---|---|---|
| 1 | response | SpiImpl_ReceiveVector_Response | |
| 2 | err | zx/Status | 
SpiImpl_ReceiveVmo_Result 嚴格
定義於 fuchsia.hardware.spiimpl/spi-impl.fidl
| Ordinal | Variant | 類型 | 說明 | 
|---|---|---|---|
| 1 | response | SpiImpl_ReceiveVmo_Response | |
| 2 | err | zx/Status | 
SpiImpl_RegisterVmo_Result 嚴格
定義於 fuchsia.hardware.spiimpl/spi-impl.fidl
| Ordinal | Variant | 類型 | 說明 | 
|---|---|---|---|
| 1 | response | SpiImpl_RegisterVmo_Response | |
| 2 | err | zx/Status | 
SpiImpl_TransmitVector_Result 嚴格
定義於 fuchsia.hardware.spiimpl/spi-impl.fidl
| Ordinal | Variant | 類型 | 說明 | 
|---|---|---|---|
| 1 | response | SpiImpl_TransmitVector_Response | |
| 2 | err | zx/Status | 
SpiImpl_TransmitVmo_Result 嚴格
定義於 fuchsia.hardware.spiimpl/spi-impl.fidl
| Ordinal | Variant | 類型 | 說明 | 
|---|---|---|---|
| 1 | response | SpiImpl_TransmitVmo_Response | |
| 2 | err | zx/Status | 
SpiImpl_UnlockBus_Result 嚴格
定義於 fuchsia.hardware.spiimpl/spi-impl.fidl
| Ordinal | Variant | 類型 | 說明 | 
|---|---|---|---|
| 1 | response | SpiImpl_UnlockBus_Response | |
| 2 | err | zx/Status | 
SpiImpl_UnregisterVmo_Result 嚴格 資源
定義於 fuchsia.hardware.spiimpl/spi-impl.fidl
| Ordinal | Variant | 類型 | 說明 | 
|---|---|---|---|
| 1 | response | SpiImpl_UnregisterVmo_Response | |
| 2 | err | zx/Status | 
服務
服務
定義於 fuchsia.hardware.spiimpl/spi-impl.fidl
| 名稱 | 類型 | 傳輸 | 
|---|---|---|
| 裝置 | fuchsia.hardware.spiimpl/SpiImpl | 駕駛座 |