template <>

class Server

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

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 Server ()

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

void SetBufferMode (SetBufferModeRequest & request, SetBufferModeCompleter::Sync & completer)

Configures the output buffer as per `mode`.

void GetInterrupt (GetInterruptRequest & 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 (ConfigureInterruptRequest & 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.

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 ~Server ()

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