pub struct GpioSynchronousProxy { /* private fields */ }Implementations§
Source§impl GpioSynchronousProxy
impl GpioSynchronousProxy
pub fn new(channel: Channel) -> Self
pub fn into_channel(self) -> Channel
Sourcepub fn wait_for_event(
&self,
deadline: MonotonicInstant,
) -> Result<GpioEvent, Error>
pub fn wait_for_event( &self, deadline: MonotonicInstant, ) -> Result<GpioEvent, Error>
Waits until an event arrives and returns it. It is safe for other threads to make concurrent requests while waiting for an event.
Sourcepub fn read(
&self,
___deadline: MonotonicInstant,
) -> Result<GpioReadResult, Error>
pub fn read( &self, ___deadline: MonotonicInstant, ) -> Result<GpioReadResult, Error>
Reads the current value of a GPIO, returning true for a high voltage and false for a
low voltage.
Sourcepub fn set_buffer_mode(
&self,
mode: BufferMode,
___deadline: MonotonicInstant,
) -> Result<GpioSetBufferModeResult, Error>
pub fn set_buffer_mode( &self, mode: BufferMode, ___deadline: MonotonicInstant, ) -> Result<GpioSetBufferModeResult, Error>
Configures the output buffer as per mode.
Sourcepub fn get_interrupt(
&self,
options: InterruptOptions,
___deadline: MonotonicInstant,
) -> Result<GpioGetInterruptResult, Error>
pub fn get_interrupt( &self, options: InterruptOptions, ___deadline: MonotonicInstant, ) -> Result<GpioGetInterruptResult, Error>
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.
Sourcepub fn configure_interrupt(
&self,
config: &InterruptConfiguration,
___deadline: MonotonicInstant,
) -> Result<GpioConfigureInterruptResult, Error>
pub fn configure_interrupt( &self, config: &InterruptConfiguration, ___deadline: MonotonicInstant, ) -> Result<GpioConfigureInterruptResult, Error>
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.
Sourcepub fn release_interrupt(
&self,
___deadline: MonotonicInstant,
) -> Result<GpioReleaseInterruptResult, Error>
pub fn release_interrupt( &self, ___deadline: MonotonicInstant, ) -> Result<GpioReleaseInterruptResult, Error>
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.
Trait Implementations§
Source§impl Debug for GpioSynchronousProxy
impl Debug for GpioSynchronousProxy
Source§impl From<Channel> for GpioSynchronousProxy
Available on Fuchsia only.
impl From<Channel> for GpioSynchronousProxy
Source§impl From<GpioSynchronousProxy> for NullableHandle
Available on Fuchsia only.
impl From<GpioSynchronousProxy> for NullableHandle
Source§fn from(value: GpioSynchronousProxy) -> Self
fn from(value: GpioSynchronousProxy) -> Self
Source§impl FromClient for GpioSynchronousProxy
Available on Fuchsia only.
impl FromClient for GpioSynchronousProxy
Source§type Protocol = GpioMarker
type Protocol = GpioMarker
Source§fn from_client(value: ClientEnd<GpioMarker>) -> Self
fn from_client(value: ClientEnd<GpioMarker>) -> Self
Source§impl SynchronousProxy for GpioSynchronousProxy
Available on Fuchsia only.
impl SynchronousProxy for GpioSynchronousProxy
Source§type Protocol = GpioMarker
type Protocol = GpioMarker
Proxy controls.