Google is committed to advancing racial equity for Black communities. See how.

fuchsia.hardware.gpio

PROTOCOLS

Gpio

Defined in fuchsia.hardware.gpio/gpio.fidl

ConfigIn

Configures a GPIO for input.

Request

NameType
flags GpioFlags

Response

NameType
result Gpio_ConfigIn_Result

ConfigOut

Configures a GPIO for output.

Request

NameType
initial_value uint8

Response

NameType
result Gpio_ConfigOut_Result

Read

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

Request

NameType

Response

NameType
result Gpio_Read_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
result Gpio_SetDriveStrength_Result

Write

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

Request

NameType
value uint8

Response

NameType
result Gpio_Write_Result

STRUCTS

Gpio_ConfigIn_Response

Defined in fuchsia.hardware.gpio/gpio.fidl

NameTypeDescriptionDefault

Gpio_ConfigOut_Response

Defined in fuchsia.hardware.gpio/gpio.fidl

NameTypeDescriptionDefault

Gpio_Read_Response

Defined in fuchsia.hardware.gpio/gpio.fidl

NameTypeDescriptionDefault
value uint8 No default

Gpio_SetDriveStrength_Response

Defined in fuchsia.hardware.gpio/gpio.fidl

NameTypeDescriptionDefault
actual_ds_ua uint64 No default

Gpio_Write_Response

Defined in fuchsia.hardware.gpio/gpio.fidl

NameTypeDescriptionDefault

ENUMS

GpioFlags

Type: uint32

Defined in fuchsia.hardware.gpio/gpio.fidl

Flags for ConfigIn.

NameValueDescription
PULL_DOWN 0
PULL_UP 1
NO_PULL 2
PULL_MASK 3

UNIONS

Gpio_ConfigIn_Result

Defined in fuchsia.hardware.gpio/gpio.fidl

NameTypeDescription
response Gpio_ConfigIn_Response
err zx/status

Gpio_ConfigOut_Result

Defined in fuchsia.hardware.gpio/gpio.fidl

NameTypeDescription
response Gpio_ConfigOut_Response
err zx/status

Gpio_Read_Result

Defined in fuchsia.hardware.gpio/gpio.fidl

NameTypeDescription
response Gpio_Read_Response
err zx/status

Gpio_SetDriveStrength_Result

Defined in fuchsia.hardware.gpio/gpio.fidl

NameTypeDescription
response Gpio_SetDriveStrength_Response
err zx/status

Gpio_Write_Result

Defined in fuchsia.hardware.gpio/gpio.fidl

NameTypeDescription
response Gpio_Write_Response
err zx/status