PROTOCOLS
Gpio
Defined in fuchsia.hardware.gpio/gpio.fidl
ConfigIn
Configures a GPIO for input.
Request
Name | Type |
---|---|
flags |
uint32
|
Response
Name | Type |
---|---|
s |
zx/status
|
ConfigOut
Configures a GPIO for output.
Request
Name | Type |
---|---|
initial_value |
uint8
|
Response
Name | Type |
---|---|
s |
zx/status
|
GetInterrupt
Gets an interrupt object pertaining to a particular GPIO pin.
Request
Name | Type |
---|---|
flags |
uint32
|
Response
Name | Type |
---|---|
s |
zx/status
|
irq |
handle<interrupt>
|
Read
Reads the current value of a GPIO (0 or 1).
Request
Name | Type |
---|
Response
Name | Type |
---|---|
s |
zx/status
|
value |
uint8
|
ReleaseInterrupt
Release the interrupt.
Request
Name | Type |
---|
Response
Name | Type |
---|---|
s |
zx/status
|
SetAltFunction
Configures the GPIO pin for an alternate function (I2C, SPI, etc) the interpretation of "function" is platform dependent.
Request
Name | Type |
---|---|
function |
uint64
|
Response
Name | Type |
---|---|
s |
zx/status
|
SetDriveStrength
Set GPIO drive strength.
Request
Name | Type |
---|---|
ds_ua |
uint64
|
Response
Name | Type |
---|---|
s |
zx/status
|
actual_ds_ua |
uint64
|
SetPolarity
Set GPIO polarity.
Request
Name | Type |
---|---|
polarity |
GpioPolarity
|
Response
Name | Type |
---|---|
s |
zx/status
|
Write
Sets the current value of the GPIO (any non-zero value maps to 1).
Request
Name | Type |
---|---|
value |
uint8
|
Response
Name | Type |
---|---|
s |
zx/status
|
Gpio
Defined in fuchsia.hardware.gpio/gpio.fidl
ConfigIn
Configures a GPIO for input.
Request
Name | Type |
---|---|
flags |
GpioFlags
|
Response
Name | Type |
---|---|
result |
Gpio_ConfigIn_Result
|
ConfigOut
Configures a GPIO for output.
Request
Name | Type |
---|---|
initial_value |
uint8
|
Response
Name | Type |
---|---|
result |
Gpio_ConfigOut_Result
|
Read
Reads the current value of a GPIO (0 or 1).
Request
Name | Type |
---|
Response
Name | Type |
---|---|
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
Name | Type |
---|---|
ds_ua |
uint64
|
Response
Name | Type |
---|---|
result |
Gpio_SetDriveStrength_Result
|
Write
Sets the current value of the GPIO (any non-zero value maps to 1).
Request
Name | Type |
---|---|
value |
uint8
|
Response
Name | Type |
---|---|
result |
Gpio_Write_Result
|
STRUCTS
Gpio_ConfigIn_Response
Defined in fuchsia.hardware.gpio/gpio.fidl
Name | Type | Description | Default |
---|
Gpio_ConfigOut_Response
Defined in fuchsia.hardware.gpio/gpio.fidl
Name | Type | Description | Default |
---|
Gpio_Read_Response
Defined in fuchsia.hardware.gpio/gpio.fidl
Name | Type | Description | Default |
---|---|---|---|
value |
uint8
|
No default |
Gpio_SetDriveStrength_Response
Defined in fuchsia.hardware.gpio/gpio.fidl
Name | Type | Description | Default |
---|---|---|---|
actual_ds_ua |
uint64
|
No default |
Gpio_Write_Response
Defined in fuchsia.hardware.gpio/gpio.fidl
Name | Type | Description | Default |
---|
ENUMS
GpioFlags
Type: uint32
Defined in fuchsia.hardware.gpio/gpio.fidl
Flags for ConfigIn
.
Name | Value | Description |
---|---|---|
PULL_DOWN |
0 |
|
PULL_UP |
1 |
|
NO_PULL |
2 |
|
PULL_MASK |
3 |
GpioPolarity
Type: uint32
Defined in fuchsia.hardware.gpio/gpio.fidl
Values for SetPolarity
.
Name | Value | Description |
---|---|---|
LOW |
0 |
|
HIGH |
1 |
UNIONS
Gpio_ConfigIn_Result
Defined in fuchsia.hardware.gpio/gpio.fidl
Name | Type | Description |
---|---|---|
response |
Gpio_ConfigIn_Response
|
|
err |
zx/status
|
Gpio_ConfigOut_Result
Defined in fuchsia.hardware.gpio/gpio.fidl
Name | Type | Description |
---|---|---|
response |
Gpio_ConfigOut_Response
|
|
err |
zx/status
|
Gpio_Read_Result
Defined in fuchsia.hardware.gpio/gpio.fidl
Name | Type | Description |
---|---|---|
response |
Gpio_Read_Response
|
|
err |
zx/status
|
Gpio_SetDriveStrength_Result
Defined in fuchsia.hardware.gpio/gpio.fidl
Name | Type | Description |
---|---|---|
response |
Gpio_SetDriveStrength_Response
|
|
err |
zx/status
|
Gpio_Write_Result
Defined in fuchsia.hardware.gpio/gpio.fidl
Name | Type | Description |
---|---|---|
response |
Gpio_Write_Response
|
|
err |
zx/status
|
CONSTANTS
Name | Value | Type | Description |
---|---|---|---|
GPIO_NO_PULL |
2
|
uint32 |
|
GPIO_PULL_DOWN |
0
|
uint32 |
Flags for |
GPIO_PULL_MASK |
3
|
uint32 |
|
GPIO_PULL_UP |
1
|
uint32 |