fuchsia.hardware.gpio

Added: HEAD

PROTOCOLS

Device

Defined in fuchsia.hardware.gpio/gpio.fidl

OpenSession

Opens a new session on the device.

At most one session is permitted at one time; the server end will be closed with ZX_ERR_ALREADY_BOUND if a session already exists.

Request

NameType
session server_end<Gpio>

Gpio

Defined in fuchsia.hardware.gpio/gpio.fidl

ConfigIn

Configures a GPIO for input.

Request

NameType
flags GpioFlags

Response

NameType
payload Gpio_ConfigIn_Result

ConfigOut

Configures a GPIO for output.

Request

NameType
initial_value uint8

Response

NameType
payload Gpio_ConfigOut_Result

GetDriveStrength

Gets the configured drive strength of the GPIO in microamps (ua).

Request

<EMPTY>

Response

NameType
payload Gpio_GetDriveStrength_Result

GetInterrupt

Gets an interrupt object pertaining to a particular GPIO pin. flags is passed as the options parameter when creating the interrupt.

Request

NameType
flags uint32

Response

NameType
payload Gpio_GetInterrupt_Result

GetName

Get the name of a GPIO.

Request

<EMPTY>

Response

NameType
payload Gpio_GetName_Result

GetPin

Get the pin of a GPIO

Request

<EMPTY>

Response

NameType
payload Gpio_GetPin_Result

Read

Reads the current value of a GPIO (0 or 1).

Request

<EMPTY>

Response

NameType
payload Gpio_Read_Result

ReleaseInterrupt

Release the interrupt.

Request

<EMPTY>

Response

NameType
payload Gpio_ReleaseInterrupt_Result

SetAltFunction

Configures the GPIO pin for an alternate function (I2C, SPI, etc) the interpretation of "function" is platform dependent.

Request

NameType
function uint64

Response

NameType
payload Gpio_SetAltFunction_Result

SetDriveStrength

Sets the drive strength of the GPIO. actual_ds_ua is always >= ds_ua. If ds_ua is larger than max value, the drive strength will be set to the max value. Return error if unable to set drive strength. actual_ds_ua is not set in this case.

Request

NameType
ds_ua uint64

Response

NameType
payload Gpio_SetDriveStrength_Result

SetPolarity

Set GPIO polarity.

Request

NameType
polarity GpioPolarity

Response

NameType
payload Gpio_SetPolarity_Result

Write

Sets the current value of the GPIO (any non-zero value maps to 1).

Request

NameType
value uint8

Response

NameType
payload Gpio_Write_Result

STRUCTS

Gpio_ConfigIn_Response

Defined in fuchsia.hardware.gpio/gpio.fidl

<EMPTY>

Gpio_ConfigOut_Response

Defined in fuchsia.hardware.gpio/gpio.fidl

<EMPTY>

Gpio_GetDriveStrength_Response

Defined in fuchsia.hardware.gpio/gpio.fidl

FieldTypeDescriptionDefault
result_ua uint64 No default

Gpio_GetInterrupt_Response resource

Defined in fuchsia.hardware.gpio/gpio.fidl

FieldTypeDescriptionDefault
irq handle<interrupt> No default

Gpio_GetName_Response

Defined in fuchsia.hardware.gpio/gpio.fidl

FieldTypeDescriptionDefault
name string[256] No default

Gpio_GetPin_Response

Defined in fuchsia.hardware.gpio/gpio.fidl

FieldTypeDescriptionDefault
pin uint32 No default

Gpio_Read_Response

Defined in fuchsia.hardware.gpio/gpio.fidl

FieldTypeDescriptionDefault
value uint8 No default

Gpio_ReleaseInterrupt_Response

Defined in fuchsia.hardware.gpio/gpio.fidl

<EMPTY>

Gpio_SetAltFunction_Response

Defined in fuchsia.hardware.gpio/gpio.fidl

<EMPTY>

Gpio_SetDriveStrength_Response

Defined in fuchsia.hardware.gpio/gpio.fidl

FieldTypeDescriptionDefault
actual_ds_ua uint64 No default

Gpio_SetPolarity_Response

Defined in fuchsia.hardware.gpio/gpio.fidl

<EMPTY>

Gpio_Write_Response

Defined in fuchsia.hardware.gpio/gpio.fidl

<EMPTY>

ENUMS

GpioFlags strict

Type: uint32

Defined in fuchsia.hardware.gpio/gpio.fidl

Flags for ConfigIn.

NameValueDescription
0
1
2

GpioPolarity strict

Type: uint32

Defined in fuchsia.hardware.gpio/gpio.fidl

Values for SetPolarity.

NameValueDescription
0
1

UNIONS

Gpio_ConfigIn_Result strict

Defined in fuchsia.hardware.gpio/gpio.fidl

OrdinalVariantTypeDescription
response Gpio_ConfigIn_Response
err zx/Status

Gpio_ConfigOut_Result strict

Defined in fuchsia.hardware.gpio/gpio.fidl

OrdinalVariantTypeDescription
response Gpio_ConfigOut_Response
err zx/Status

Gpio_GetDriveStrength_Result strict

Defined in fuchsia.hardware.gpio/gpio.fidl

OrdinalVariantTypeDescription
response Gpio_GetDriveStrength_Response
err zx/Status

Gpio_GetInterrupt_Result strict resource

Defined in fuchsia.hardware.gpio/gpio.fidl

OrdinalVariantTypeDescription
response Gpio_GetInterrupt_Response
err zx/Status

Gpio_GetName_Result strict

Defined in fuchsia.hardware.gpio/gpio.fidl

OrdinalVariantTypeDescription
response Gpio_GetName_Response
err zx/Status

Gpio_GetPin_Result strict

Defined in fuchsia.hardware.gpio/gpio.fidl

OrdinalVariantTypeDescription
response Gpio_GetPin_Response
err zx/Status

Gpio_Read_Result strict

Defined in fuchsia.hardware.gpio/gpio.fidl

OrdinalVariantTypeDescription
response Gpio_Read_Response
err zx/Status

Gpio_ReleaseInterrupt_Result strict

Defined in fuchsia.hardware.gpio/gpio.fidl

OrdinalVariantTypeDescription
response Gpio_ReleaseInterrupt_Response
err zx/Status

Gpio_SetAltFunction_Result strict

Defined in fuchsia.hardware.gpio/gpio.fidl

OrdinalVariantTypeDescription
response Gpio_SetAltFunction_Response
err zx/Status

Gpio_SetDriveStrength_Result strict

Defined in fuchsia.hardware.gpio/gpio.fidl

OrdinalVariantTypeDescription
response Gpio_SetDriveStrength_Response
err zx/Status

Gpio_SetPolarity_Result strict

Defined in fuchsia.hardware.gpio/gpio.fidl

OrdinalVariantTypeDescription
response Gpio_SetPolarity_Response
err zx/Status

Gpio_Write_Result strict

Defined in fuchsia.hardware.gpio/gpio.fidl

OrdinalVariantTypeDescription
response Gpio_Write_Response
err zx/Status

CONSTANTS

NameValueTypeDescription
MAX_GPIO_NAME_LEN 256 uint32

Maximum length of the GPIO name.

SERVICES

Service

Defined in fuchsia.hardware.gpio/gpio.fidl

NameTypeTransport
device fuchsia.hardware.gpio/Gpio Channel