Trait Input

Source
pub trait Input {
    // Required method
    fn read(&self) -> bool;

    // Provided method
    fn read_activation(&self, mode: ActivationMode) -> ActivationState { ... }
}

Required Methods§

Source

fn read(&self) -> bool

Get the current state of an input GPIO pin. For an output pin, return the output; for an input pin, return the input; for disabled or function pins the value is undefined.

Provided Methods§

Source

fn read_activation(&self, mode: ActivationMode) -> ActivationState

Get the current state of a GPIO pin, for a given activation mode.

Implementors§

Source§

impl<'a, IP: InterruptPin<'a>> Input for InterruptValueWrapper<'a, IP>

impl Input for GpioPin<'_>

impl Input for GpioPin<'_>

impl Input for Pin<'_>

impl<PAD> Input for GpioPin<'_, PAD>

impl<'a> Input for IntPin<'a>

impl<'a> Input for Pin<'a>

impl Input for GPIOPin<'_>

impl Input for GpioPin<'_>

impl Input for RPGpioPin<'_>

impl Input for GPIOPin<'_>

impl Input for GpioPin<'_>

impl Input for Pin<'_>

impl Input for Pin<'_>