通訊協定
PinImpl
定義於 fuchsia.hardware.pinimpl/pin-impl.fidl
此通訊協定結合了 fuchsia.hardware.gpio.Gpio 和 fuchsia.hardware.pin.Pin,接受數字指出要對其採取行動的圖釘。查看這些通訊協定 。
PinImpl 伺服器至少支援一個用戶端連線。伺服器應將
如果要求中斷的用戶端中斷連線,就會由 GetInterrupt() 傳回的中斷。
常見的錯誤代碼:
- ZX_ERR_NOT_FOUND:沒有號碼為- pin的 PIN 碼。
- ZX_ERR_NOT_SUPPORTED:這個控制器不支援要求的作業。
- ZX_ERR_WRONG_TYPE:如果接腳不支援 GPIO。
設定
要求
| 名稱 | 類型 | 
|---|---|
| pin | uint32 | 
| config | fuchsia.hardware.pin/Configuration | 
回應
| 名稱 | 類型 | 
|---|---|
| payload | PinImpl_Configure_Result | 
ConfigureInterrupt
要求
| 名稱 | 類型 | 
|---|---|
| pin | uint32 | 
| config | fuchsia.hardware.gpio/InterruptConfiguration | 
回應
| 名稱 | 類型 | 
|---|---|
| payload | PinImpl_ConfigureInterrupt_Result | 
GetInterrupt
PinImpl 伺服器應為每個對 GetInterrupt() 的呼叫建立新的中斷物件。
要求
| 名稱 | 類型 | 
|---|---|
| pin | uint32 | 
回應
| 名稱 | 類型 | 
|---|---|
| payload | PinImpl_GetInterrupt_Result | 
已讀
要求
| 名稱 | 類型 | 
|---|---|
| pin | uint32 | 
回應
| 名稱 | 類型 | 
|---|---|
| payload | PinImpl_Read_Result | 
ReleaseInterrupt
要求
| 名稱 | 類型 | 
|---|---|
| pin | uint32 | 
回應
| 名稱 | 類型 | 
|---|---|
| payload | PinImpl_ReleaseInterrupt_Result | 
SetBufferMode
要求
| 名稱 | 類型 | 
|---|---|
| pin | uint32 | 
| mode | fuchsia.hardware.gpio/BufferMode | 
回應
| 名稱 | 類型 | 
|---|---|
| payload | PinImpl_SetBufferMode_Result | 
結構
撥打電話
定義於 fuchsia.hardware.pinimpl/metadata.fidl
| 欄位 | 類型 | 說明 | 預設 | 
|---|---|---|---|
| pin | uint32 | 用於呼叫此呼叫的平台專屬 PIN 碼。 | 無預設 | 
| call | InitCall | 要對其進行的呼叫,以及要傳遞給它的引數。 | 無預設 | 
ControllerMetadata
定義於 fuchsia.hardware.pinimpl/metadata.fidl
| 欄位 | 類型 | 說明 | 預設 | 
|---|---|---|---|
| id | uint32 | 所有 GPIO 控制器中不重複的控制器 ID。 | 無預設 | 
PinImpl_ConfigureInterrupt_Response
定義於 fuchsia.hardware.pinimpl/pin-impl.fidl
<空白>
PinImpl_Configure_Response
定義於 fuchsia.hardware.pinimpl/pin-impl.fidl
| 欄位 | 類型 | 說明 | 預設 | 
|---|---|---|---|
| new_config | fuchsia.hardware.pin/Configuration | 無預設 | 
PinImpl_GetInterrupt_Response 資源
定義於 fuchsia.hardware.pinimpl/pin-impl.fidl
| 欄位 | 類型 | 說明 | 預設 | 
|---|---|---|---|
| interrupt | handle<interrupt> | 無預設 | 
PinImpl_Read_Response
定義於 fuchsia.hardware.pinimpl/pin-impl.fidl
| 欄位 | 類型 | 說明 | 預設 | 
|---|---|---|---|
| value | bool | 無預設 | 
PinImpl_ReleaseInterrupt_Response
定義於 fuchsia.hardware.pinimpl/pin-impl.fidl
<空白>
PinImpl_SetBufferMode_Response
定義於 fuchsia.hardware.pinimpl/pin-impl.fidl
<空白>
資料表
中繼資料
定義於 fuchsia.hardware.pinimpl/metadata.fidl
以 DEVICE_METADATA_GPIO_INIT 格式傳遞至中繼資料中的 GPIO 核心驅動程式。步驟處理中 排列順序。在 GPIO 執行期間會有一次處理 核心驅動程式的繫結掛鉤
| 序數 | 欄位 | 類型 | 說明 | 
|---|---|---|---|
| 1 | init_steps | vector<InitStep> | 
聯合國
InitCall 彈性
定義於 fuchsia.hardware.pinimpl/metadata.fidl
fuchsia.hardware.pinimpl.PinImpl 呼叫的引數,以做為 InitStep 的一部分。
| 序數 | Variant | 類型 | 說明 | 
|---|---|---|---|
| 1 | pin_config | fuchsia.hardware.pin/Configuration | 如果已設定,GPIO 核心驅動程式將呼叫「Configure」與指定的設定建立連結 | 
| 2 | buffer_mode | fuchsia.hardware.gpio/BufferMode | 如果設定這項政策,GPIO 核心驅動程式將以指定模式呼叫  | 
InitStep 彈性
定義於 fuchsia.hardware.pinimpl/metadata.fidl
GPIO 核心驅動程式執行的單一 init 步驟。
| 序數 | Variant | 類型 | 說明 | 
|---|---|---|---|
| 1 | call | Call | 設定後,GPIO 核心驅動程式將呼叫具有指定針腳的 PinImpl 驅動程式庫 引數。 | 
| 2 | delay | zx/Duration | 如果已設定,GPIO 核心驅動程式將延遲超過這個時間,然後才處理下一個步驟。 | 
PinImpl_ConfigureInterrupt_Result 嚴格
定義於 fuchsia.hardware.pinimpl/pin-impl.fidl
| 序數 | Variant | 類型 | 說明 | 
|---|---|---|---|
| 1 | response | PinImpl_ConfigureInterrupt_Response | |
| 2 | err | zx/Status | 
PinImpl_Configure_Result 嚴格
定義於 fuchsia.hardware.pinimpl/pin-impl.fidl
| 序數 | Variant | 類型 | 說明 | 
|---|---|---|---|
| 1 | response | PinImpl_Configure_Response | |
| 2 | err | zx/Status | 
PinImpl_GetInterrupt_Result 嚴格 資源
定義於 fuchsia.hardware.pinimpl/pin-impl.fidl
| 序數 | Variant | 類型 | 說明 | 
|---|---|---|---|
| 1 | response | PinImpl_GetInterrupt_Response | |
| 2 | err | zx/Status | 
PinImpl_Read_Result 嚴格
定義於 fuchsia.hardware.pinimpl/pin-impl.fidl
| 序數 | Variant | 類型 | 說明 | 
|---|---|---|---|
| 1 | response | PinImpl_Read_Response | |
| 2 | err | zx/Status | 
PinImpl_ReleaseInterrupt_Result 嚴格
定義於 fuchsia.hardware.pinimpl/pin-impl.fidl
| 序數 | Variant | 類型 | 說明 | 
|---|---|---|---|
| 1 | response | PinImpl_ReleaseInterrupt_Response | |
| 2 | err | zx/Status | 
PinImpl_SetBufferMode_Result 嚴格
定義於 fuchsia.hardware.pinimpl/pin-impl.fidl
| 序數 | Variant | 類型 | 說明 | 
|---|---|---|---|
| 1 | response | PinImpl_SetBufferMode_Response | |
| 2 | err | zx/Status | 
服務
服務
定義於 fuchsia.hardware.pinimpl/pin-impl.fidl
| 名稱 | 類型 | 傳輸 | 
|---|---|---|
| 裝置 | fuchsia.hardware.pinimpl/PinImpl | 駕駛座 |