通訊協定
裝置
定義於 fuchsia.hardware.i2cimpl/i2cimpl.fidl
i2c 驅動程式的低階通訊協定。
GetMaxTransferSize
要求
<EMPTY>
回應
| 名稱 | 類型 | 
|---|---|
| payload | Device_GetMaxTransferSize_Result | 
SetBitrate
設定 i2c 匯流排的位元率 (以 KHz 單位為單位)。
要求
| 名稱 | 類型 | 
|---|---|
| bitrate | uint32 | 
回應
| 名稱 | 類型 | 
|---|---|
| payload | Device_SetBitrate_Result | 
交易
|Transact| 假設寫入作業寫入資料的長度不是零。|Transact| 會假設至少最後一個運算的停靠站已設為 true。
每個讀取交易都會傳回對應的 ReadData。寫入交易不會產生任何資料結果。
要求
| 名稱 | 類型 | 
|---|---|
| op | vector<I2cImplOp>[256] | 
回應
| 名稱 | 類型 | 
|---|---|
| payload | Device_Transact_Result | 
結構
Device_GetMaxTransferSize_Response
定義於 fuchsia.hardware.i2cimpl/i2cimpl.fidl
| 廣闊 | 類型 | 說明 | 預設 | 
|---|---|---|---|
| size | uint64 | 無預設 | 
Device_SetBitrate_Response
定義於 fuchsia.hardware.i2cimpl/i2cimpl.fidl
<EMPTY>
Device_Transact_Response
定義於 fuchsia.hardware.i2cimpl/i2cimpl.fidl
| 廣闊 | 類型 | 說明 | 預設 | 
|---|---|---|---|
| read | vector<ReadData>[256] | 無預設 | 
I2cImplOp
定義於 fuchsia.hardware.i2cimpl/i2cimpl.fidl
請參閱下方的 Transact 瞭解使用方式。
| 廣闊 | 類型 | 說明 | 預設 | 
|---|---|---|---|
| address | uint16 | 無預設 | |
| type | I2cImplOpType | 無預設 | |
| stop | bool | 無預設 | 
ReadData
定義於 fuchsia.hardware.i2cimpl/i2cimpl.fidl
一項讀取交易的結果。
| 廣闊 | 類型 | 說明 | 預設 | 
|---|---|---|---|
| data | vector<uint8>[32768] | 無預設 | 
聯合國
Device_GetMaxTransferSize_Result 嚴格
定義於 fuchsia.hardware.i2cimpl/i2cimpl.fidl
| 序數 | Variant | 類型 | 說明 | 
|---|---|---|---|
| 1 | response | Device_GetMaxTransferSize_Response | |
| 2 | err | zx/Status | |
| 3 | framework_err | internal | 
Device_SetBitrate_Result 嚴格
定義於 fuchsia.hardware.i2cimpl/i2cimpl.fidl
| 序數 | Variant | 類型 | 說明 | 
|---|---|---|---|
| 1 | response | Device_SetBitrate_Response | |
| 2 | err | zx/Status | |
| 3 | framework_err | internal | 
Device_Transact_Result 嚴格
定義於 fuchsia.hardware.i2cimpl/i2cimpl.fidl
| 序數 | Variant | 類型 | 說明 | 
|---|---|---|---|
| 1 | response | Device_Transact_Response | |
| 2 | err | zx/Status | |
| 3 | framework_err | internal | 
I2cImplOpType 嚴格
定義於 fuchsia.hardware.i2cimpl/i2cimpl.fidl
如果設定 read_size:這是讀取作業,系統會讀取 read_size 個位元組。
如果設定 write_data:此為寫入作業,系統會寫入 write_data。
| 序數 | Variant | 類型 | 說明 | 
|---|---|---|---|
| 1 | read_size | uint32 | |
| 2 | write_data | vector<uint8>[32768] | 
服務
服務
定義於 fuchsia.hardware.i2cimpl/i2cimpl.fidl
| 名稱 | 類型 | 傳輸 | 
|---|---|---|
| 裝置 | fuchsia.hardware.i2cimpl/Device | 駕駛座 |