PROTOCOLS
Gpio
Defined in fuchsia.hardware.gpio/gpio.fidl
Common error codes:
ZX_ERR_NOT_SUPPORTED: The requested operation is not supported by this controller.
ConfigureInterrupt
Configures the polarity of an interrupt and whether it is edge- or level-triggered. Only the
client with the interrupt can call ConfigureInterrupt(), unless no client has an
interrupt.
Returns ZX_ERR_INVALID_ARGS if no fields are set in config, or ZX_ERR_ACCESS_DENIED if
another client has the interrupt.
Request
| Name | Type |
|---|---|
config |
InterruptConfiguration
|
Response
| Name | Type |
|---|---|
payload |
Gpio_ConfigureInterrupt_Result
|
GetInterrupt
Gets an interrupt object pertaining to a particular GPIO pin. Only one interrupt may
be outstanding per pin, and it must be released by calling ReleaseInterrupt() before the
next call to GetInterrupt() will succeed.
Returns ZX_ERR_ALREADY_EXISTS if GetInterrupt() has already been called without a
subsequent call to ReleaseInterrupt(), ZX_ERR_INVALID_ARGS if options is invalid, or
ZX_ERR_ACCESS_DENIED if another client has the interrupt.
Request
| Name | Type |
|---|---|
options |
InterruptOptions
|
Response
| Name | Type |
|---|---|
payload |
Gpio_GetInterrupt_Result
|
Read
Reads the current value of a GPIO, returning true for a high voltage and false for a
low voltage.
Request
<EMPTY>
Response
| Name | Type |
|---|---|
payload |
Gpio_Read_Result
|
ReleaseInterrupt
Releases the interrupt, allowing GetInterrupt() to be called again or by another
client. A client's interrupt is automatically released when it disconnects from the
server.
Returns ZX_ERR_NOT_FOUND if the interrupt has already been released, or if
GetInterrupt() has not been called. Returns ZX_ERR_ACCESS_DENIED if another client has
the interrupt.
Request
<EMPTY>
Response
| Name | Type |
|---|---|
payload |
Gpio_ReleaseInterrupt_Result
|
SetBufferMode
Configures the output buffer as per mode.
Request
| Name | Type |
|---|---|
mode |
BufferMode
|
Response
| Name | Type |
|---|---|
payload |
Gpio_SetBufferMode_Result
|
STRUCTS
Gpio_ConfigureInterrupt_Response
Defined in fuchsia.hardware.gpio/gpio.fidl
<EMPTY>
Gpio_GetInterrupt_Response resource
Defined in fuchsia.hardware.gpio/gpio.fidl
| Field | Type | Description | Default |
|---|---|---|---|
interrupt |
handle<interrupt>
|
No default |
Gpio_Read_Response
Defined in fuchsia.hardware.gpio/gpio.fidl
| Field | Type | Description | Default |
|---|---|---|---|
value |
bool
|
No default |
Gpio_ReleaseInterrupt_Response
Defined in fuchsia.hardware.gpio/gpio.fidl
<EMPTY>
Gpio_SetBufferMode_Response
Defined in fuchsia.hardware.gpio/gpio.fidl
<EMPTY>
ENUMS
BufferMode strict
Type: uint32
Defined in fuchsia.hardware.gpio/gpio.fidl
Whether to drive the GPIO to a high or low voltage, or disable the output buffer.
| Name | Value | Description |
|---|---|---|
INPUT |
0 |
|
OUTPUT_LOW |
1 |
|
OUTPUT_HIGH |
2 |
InterruptMode strict
Type: uint32
Defined in fuchsia.hardware.gpio/gpio.fidl
| Name | Value | Description |
|---|---|---|
EDGE_LOW |
0 |
|
EDGE_HIGH |
1 |
|
EDGE_BOTH |
2 |
|
LEVEL_LOW |
3 |
|
LEVEL_HIGH |
4 |
TABLES
InterruptConfiguration
Defined in fuchsia.hardware.gpio/gpio.fidl
| Ordinal | Field | Type | Description |
|---|---|---|---|
1 |
mode |
InterruptMode
|
UNIONS
Gpio_ConfigureInterrupt_Result strict
Defined in fuchsia.hardware.gpio/gpio.fidl
| Ordinal | Variant | Type | Description |
|---|---|---|---|
1 |
response |
Gpio_ConfigureInterrupt_Response
|
|
2 |
err |
zx/Status
|
Gpio_GetInterrupt_Result strict resource
Defined in fuchsia.hardware.gpio/gpio.fidl
| Ordinal | Variant | Type | Description |
|---|---|---|---|
1 |
response |
Gpio_GetInterrupt_Response
|
|
2 |
err |
zx/Status
|
Gpio_Read_Result strict
Defined in fuchsia.hardware.gpio/gpio.fidl
| Ordinal | Variant | Type | Description |
|---|---|---|---|
1 |
response |
Gpio_Read_Response
|
|
2 |
err |
zx/Status
|
Gpio_ReleaseInterrupt_Result strict
Defined in fuchsia.hardware.gpio/gpio.fidl
| Ordinal | Variant | Type | Description |
|---|---|---|---|
1 |
response |
Gpio_ReleaseInterrupt_Response
|
|
2 |
err |
zx/Status
|
Gpio_SetBufferMode_Result strict
Defined in fuchsia.hardware.gpio/gpio.fidl
| Ordinal | Variant | Type | Description |
|---|---|---|---|
1 |
response |
Gpio_SetBufferMode_Response
|
|
2 |
err |
zx/Status
|
BITS
InterruptOptions flexible
Type: uint32
Defined in fuchsia.hardware.gpio/gpio.fidl
| Name | Value | Description |
|---|---|---|
WAKEABLE |
1 | The interrupt wakes up the system if the system is suspended. Must not be set if system suspend / resume is disabled. Added: 27
|
TIMESTAMP_MONO |
2 | The interrupt returns a monotonic timestamp from synchronous and asynchronous waits. Otherwise, it returns a boot timestamp from waits. Added: 28
|
CONSTANTS
| Name | Value | Type | Description |
|---|---|---|---|
| SIGNAL_ACK_INTERRUPT |
16777216
|
uint32 |
Removed: 28 Added: 27
|
SERVICES
Service
Defined in fuchsia.hardware.gpio/gpio.fidl
| Name | Type | Transport |
|---|---|---|
| device |
fuchsia.hardware.gpio/Gpio
|
Channel |