fuchsia.hardware.pinimpl

Added: HEAD

PROTOCOLS

PinImpl

Defined in fuchsia.hardware.pinimpl/pin-impl.fidl

This protocol combines the functionality of fuchsia.hardware.gpio.Gpio and fuchsia.hardware.pin.Pin, accepting a number indicating the pin to act on. See those protocol definitions for details on specific methods.

A PinImpl server must support at least one client connection. The server should release all interrupts returned by GetInterrupt() if the client that requested the interrupts disconnects.

Common error codes:

  • ZX_ERR_NOT_FOUND: No pin exists with number pin.
  • ZX_ERR_NOT_SUPPORTED: The requested operation is not supported by this controller.
  • ZX_ERR_WRONG_TYPE: If the pin does not support GPIO.

Configure

Request

NameType
pin uint32
config fuchsia.hardware.pin/Configuration

Response

NameType
payload PinImpl_Configure_Result

ConfigureInterrupt

Request

NameType
pin uint32
config fuchsia.hardware.gpio/InterruptConfiguration

Response

NameType
payload PinImpl_ConfigureInterrupt_Result

GetInterrupt

The PinImpl server should create a new interrupt object for each call to GetInterrupt().

Request

NameType
pin uint32
options fuchsia.hardware.gpio/InterruptOptions

Response

NameType
payload PinImpl_GetInterrupt_Result

Read

Request

NameType
pin uint32

Response

NameType
payload PinImpl_Read_Result

ReleaseInterrupt

Request

NameType
pin uint32

Response

NameType
payload PinImpl_ReleaseInterrupt_Result

SetBufferMode

Request

NameType
pin uint32
mode fuchsia.hardware.gpio/BufferMode

Response

NameType
payload PinImpl_SetBufferMode_Result

STRUCTS

Call

Defined in fuchsia.hardware.pinimpl/metadata.fidl

FieldTypeDescriptionDefault
pin uint32

The platform-specific pin number that this call operates on.

No default
call InitCall

The call to make and the arguments to pass to it.

No default

ControllerMetadata

Defined in fuchsia.hardware.pinimpl/metadata.fidl

FieldTypeDescriptionDefault
id uint32

ID for the controller which is unique among all GPIO controllers.

No default

PinImpl_ConfigureInterrupt_Response

Defined in fuchsia.hardware.pinimpl/pin-impl.fidl

<EMPTY>

PinImpl_Configure_Response

Defined in fuchsia.hardware.pinimpl/pin-impl.fidl

FieldTypeDescriptionDefault
new_config fuchsia.hardware.pin/Configuration No default

PinImpl_GetInterrupt_Response resource

Defined in fuchsia.hardware.pinimpl/pin-impl.fidl

FieldTypeDescriptionDefault
interrupt handle<interrupt> No default

PinImpl_Read_Response

Defined in fuchsia.hardware.pinimpl/pin-impl.fidl

FieldTypeDescriptionDefault
value bool No default

PinImpl_ReleaseInterrupt_Response

Defined in fuchsia.hardware.pinimpl/pin-impl.fidl

<EMPTY>

PinImpl_SetBufferMode_Response

Defined in fuchsia.hardware.pinimpl/pin-impl.fidl

<EMPTY>

TABLES

Metadata

Defined in fuchsia.hardware.pinimpl/metadata.fidl

Passed to the GPIO core driver in metadata as DEVICE_METADATA_GPIO_INIT. Steps are processed sequentially in the order that they appear in the vector. Processing occurs once during the GPIO core driver's bind hook.

OrdinalFieldTypeDescription
init_steps vector<InitStep>

UNIONS

InitCall flexible

Defined in fuchsia.hardware.pinimpl/metadata.fidl

Arguments to a fuchsia.hardware.pinimpl.PinImpl call to make as part of an InitStep.

OrdinalVariantTypeDescription
pin_config fuchsia.hardware.pin/Configuration

If set, the GPIO core driver will call `Configure' with the given config.

buffer_mode fuchsia.hardware.gpio/BufferMode

If set, the GPIO core driver will call SetBufferMode with the given mode.

InitStep flexible

Defined in fuchsia.hardware.pinimpl/metadata.fidl

A single init step to be performed by the GPIO core driver.

OrdinalVariantTypeDescription
call Call

If set, the GPIO core driver will make a call to the PinImpl driver with the given pin and arguments.

delay zx/Duration

If set, the GPIO core driver will delay for this long before processing the next step.

PinImpl_ConfigureInterrupt_Result strict

Defined in fuchsia.hardware.pinimpl/pin-impl.fidl

OrdinalVariantTypeDescription
response PinImpl_ConfigureInterrupt_Response
err zx/Status

PinImpl_Configure_Result strict

Defined in fuchsia.hardware.pinimpl/pin-impl.fidl

OrdinalVariantTypeDescription
response PinImpl_Configure_Response
err zx/Status

PinImpl_GetInterrupt_Result strict resource

Defined in fuchsia.hardware.pinimpl/pin-impl.fidl

OrdinalVariantTypeDescription
response PinImpl_GetInterrupt_Response
err zx/Status

PinImpl_Read_Result strict

Defined in fuchsia.hardware.pinimpl/pin-impl.fidl

OrdinalVariantTypeDescription
response PinImpl_Read_Response
err zx/Status

PinImpl_ReleaseInterrupt_Result strict

Defined in fuchsia.hardware.pinimpl/pin-impl.fidl

OrdinalVariantTypeDescription
response PinImpl_ReleaseInterrupt_Response
err zx/Status

PinImpl_SetBufferMode_Result strict

Defined in fuchsia.hardware.pinimpl/pin-impl.fidl

OrdinalVariantTypeDescription
response PinImpl_SetBufferMode_Response
err zx/Status

SERVICES

Service

Defined in fuchsia.hardware.pinimpl/pin-impl.fidl

NameTypeTransport
device fuchsia.hardware.pinimpl/PinImpl Driver