template <>

class WireServer

Defined at line 1300 of file fidling/gen/sdk/fidl/fuchsia.hardware.gpio/fuchsia.hardware.gpio/cpp/fidl/fuchsia.hardware.gpio/cpp/wire_messaging.h

Pure-virtual interface to be implemented by a server.

This interface uses typed channels (i.e. |::fidl::ClientEnd

<

::fuchsia_hardware_gpio::Gpio>|

and |::fidl::ServerEnd

<

::fuchsia_hardware_gpio::Gpio>|).

Public Methods

void Read (ReadCompleter::Sync & completer)

Reads the current value of a GPIO, returning `true` for a high voltage and `false` for a

low voltage.

void SetBufferMode (::fuchsia_hardware_gpio::wire::GpioSetBufferModeRequest * request, SetBufferModeCompleter::Sync & completer)

Configures the output buffer as per `mode`.

void GetInterrupt (::fuchsia_hardware_gpio::wire::GpioGetInterruptRequest * request, GetInterruptCompleter::Sync & completer)

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. The interrupt is unmasked prior to being

returned to the caller.

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.

void ConfigureInterrupt (::fuchsia_hardware_gpio::wire::GpioConfigureInterruptRequest * request, ConfigureInterruptCompleter::Sync & completer)

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.

void ReleaseInterrupt (ReleaseInterruptCompleter::Sync & completer)

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. The interrupt is masked upon release.

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.

void WireServer ()

Defined at line 1303 of file fidling/gen/sdk/fidl/fuchsia.hardware.gpio/fuchsia.hardware.gpio/cpp/fidl/fuchsia.hardware.gpio/cpp/wire_messaging.h

Handler bind_handler (async_dispatcher_t * dispatcher)

|bind_handler| returns a handler that binds incoming connections to this

server implementation.

The returned handler borrows the server instance.

The server must outlive the provided |dispatcher|. Only after

the dispatcher is shutdown will it be safe to destroy the servers.

The server should not be moved.

void ~WireServer ()

Defined at line 1304 of file fidling/gen/sdk/fidl/fuchsia.hardware.gpio/fuchsia.hardware.gpio/cpp/fidl/fuchsia.hardware.gpio/cpp/wire_messaging.h