fuchsia.hardware.gpio

新增時間:HEAD

PROTOCOLS

裝置

定義於 fuchsia.hardware.gpio/gpio.fidl

OpenSession

在裝置上開啟新的工作階段。

一次最多只允許一個工作階段。 如果已有工作階段,則會透過 ZX_ERR_ALREADY_BOUND 關閉。

要求

名稱類型
session server_end<Gpio>

Gpio

定義於 fuchsia.hardware.gpio/gpio.fidl

ConfigIn

設定輸入的 GPIO。

要求

名稱類型
flags GpioFlags

回應

名稱類型
payload Gpio_ConfigIn_Result

ConfigOut

設定用於輸出的 GPIO。

要求

名稱類型
initial_value uint8

回應

名稱類型
payload Gpio_ConfigOut_Result

ConfigureInterrupt

設定乾擾的極度,以及乾擾事件還是在邊緣觸發。只有 呼叫中斷的用戶端可呼叫 ConfigureInterrupt(),除非用戶端沒有 幹擾。

未設定任何欄位的 ZX_ERR_INVALID_ARGS;如果設定其他欄位,則傳回 ZX_ERR_ACCESS_DENIED 用戶端所發生的中斷

要求

名稱類型
config InterruptConfiguration

回應

名稱類型
payload Gpio_ConfigureInterrupt_Result

GetDriveStrength

取得 GPIO 設定的驅動強度 (以微安培 (ua)) 為單位。

要求

<空白>

回應

名稱類型
payload Gpio_GetDriveStrength_Result

GetInterrupt

取得與特定 GPIO 接腳相關的中斷物件。flags 會在何時以 options 參數的形式傳遞 創造中斷情形

要求

名稱類型
flags uint32

回應

名稱類型
payload Gpio_GetInterrupt_Result

GetName

取得 GPIO 名稱。

要求

<空白>

回應

名稱類型
payload Gpio_GetName_Result

GetPin

取得 GPIO 的針腳

要求

<空白>

回應

名稱類型
payload Gpio_GetPin_Result

已讀

讀取 GPIO 目前的值,true以高壓電傳回 false,表示 低電壓。

要求

<空白>

回應

名稱類型
payload Gpio_Read_Result

ReleaseInterrupt

停止幹擾

要求

<空白>

回應

名稱類型
payload Gpio_ReleaseInterrupt_Result

SetAltFunction

設定替代函式 (I2C、SPI 等) 的 GPIO 接腳 函式的解譯都取決於平台

要求

名稱類型
function uint64

回應

名稱類型
payload Gpio_SetAltFunction_Result

SetDriveStrength

設定 GPIO 的驅動強度。 實際_ds_ua 一律為 >= ds_ua。如果 ds_ua 大於最大值,硬碟強度將設為最大值。 如果無法設定磁碟機強度,則傳回錯誤。在此情況下,並未設定實際_ds_ua。

要求

名稱類型
ds_ua uint64

回應

名稱類型
payload Gpio_SetDriveStrength_Result

寫入

設定 GPIO 目前的值 (任何非零值對應至 1)。

要求

名稱類型
value uint8

回應

名稱類型
payload Gpio_Write_Result

結構

Gpio_ConfigIn_Response

定義於 fuchsia.hardware.gpio/gpio.fidl

<空白>

Gpio_ConfigOut_Response

定義於 fuchsia.hardware.gpio/gpio.fidl

<空白>

Gpio_ConfigureInterrupt_Response

定義於 fuchsia.hardware.gpio/gpio.fidl

<空白>

Gpio_GetDriveStrength_Response

定義於 fuchsia.hardware.gpio/gpio.fidl

欄位類型說明預設
result_ua uint64 無預設

Gpio_GetInterrupt_Response 資源

定義於 fuchsia.hardware.gpio/gpio.fidl

欄位類型說明預設
irq handle<interrupt> 無預設

Gpio_GetName_Response

定義於 fuchsia.hardware.gpio/gpio.fidl

欄位類型說明預設
name string[256] 無預設

Gpio_GetPin_Response

定義於 fuchsia.hardware.gpio/gpio.fidl

欄位類型說明預設
pin uint32 無預設

Gpio_Read_Response

定義於 fuchsia.hardware.gpio/gpio.fidl

欄位類型說明預設
value bool 無預設

Gpio_ReleaseInterrupt_Response

定義於 fuchsia.hardware.gpio/gpio.fidl

<空白>

Gpio_SetAltFunction_Response

定義於 fuchsia.hardware.gpio/gpio.fidl

<空白>

Gpio_SetDriveStrength_Response

定義於 fuchsia.hardware.gpio/gpio.fidl

欄位類型說明預設
actual_ds_ua uint64 無預設

Gpio_Write_Response

定義於 fuchsia.hardware.gpio/gpio.fidl

<空白>

ENUMS

BufferMode 嚴格

類型:uint32

定義於 fuchsia.hardware.gpio/gpio.fidl

名稱說明
0
1
2

GpioFlags strict

類型:uint32

定義於 fuchsia.hardware.gpio/gpio.fidl

ConfigIn的旗標。

名稱說明
0
1
2

GpioPolarity 嚴格

類型:uint32

定義於 fuchsia.hardware.gpio/gpio.fidl

SetPolarity 的值。

名稱說明
0
1

InterruptMode 嚴格

類型:uint32

定義於 fuchsia.hardware.gpio/gpio.fidl

名稱說明
0
1
2
3
4

資料表

InterruptConfiguration

定義於 fuchsia.hardware.gpio/gpio.fidl

Ordinal欄位類型說明
mode InterruptMode

聯合國

Gpio_ConfigIn_Result 嚴格

定義於 fuchsia.hardware.gpio/gpio.fidl

OrdinalVariant類型說明
response Gpio_ConfigIn_Response
err zx/Status

Gpio_ConfigOut_Result 嚴格

定義於 fuchsia.hardware.gpio/gpio.fidl

OrdinalVariant類型說明
response Gpio_ConfigOut_Response
err zx/Status

Gpio_ConfigureInterrupt_Result 嚴格

定義於 fuchsia.hardware.gpio/gpio.fidl

OrdinalVariant類型說明
response Gpio_ConfigureInterrupt_Response
err zx/Status

Gpio_GetDriveStrength_Result 嚴格

定義於 fuchsia.hardware.gpio/gpio.fidl

OrdinalVariant類型說明
response Gpio_GetDriveStrength_Response
err zx/Status

Gpio_GetInterrupt_Result 嚴格 資源

定義於 fuchsia.hardware.gpio/gpio.fidl

OrdinalVariant類型說明
response Gpio_GetInterrupt_Response
err zx/Status

Gpio_GetName_Result 嚴格

定義於 fuchsia.hardware.gpio/gpio.fidl

OrdinalVariant類型說明
response Gpio_GetName_Response
err zx/Status

Gpio_GetPin_Result 嚴格

定義於 fuchsia.hardware.gpio/gpio.fidl

OrdinalVariant類型說明
response Gpio_GetPin_Response
err zx/Status

Gpio_Read_Result 嚴格

定義於 fuchsia.hardware.gpio/gpio.fidl

OrdinalVariant類型說明
response Gpio_Read_Response
err zx/Status

Gpio_ReleaseInterrupt_Result 嚴格

定義於 fuchsia.hardware.gpio/gpio.fidl

OrdinalVariant類型說明
response Gpio_ReleaseInterrupt_Response
err zx/Status

Gpio_SetAltFunction_Result 嚴格

定義於 fuchsia.hardware.gpio/gpio.fidl

OrdinalVariant類型說明
response Gpio_SetAltFunction_Response
err zx/Status

Gpio_SetDriveStrength_Result 嚴格

定義於 fuchsia.hardware.gpio/gpio.fidl

OrdinalVariant類型說明
response Gpio_SetDriveStrength_Response
err zx/Status

Gpio_Write_Result 嚴格

定義於 fuchsia.hardware.gpio/gpio.fidl

OrdinalVariant類型說明
response Gpio_Write_Response
err zx/Status

觀測站

名稱類型說明
MAX_GPIO_NAME_LEN 256 uint32

GPIO 名稱的長度上限。

服務

服務

定義於 fuchsia.hardware.gpio/gpio.fidl

名稱類型傳輸
裝置 fuchsia.hardware.gpio/Gpio 頻道