Trait Output

Source
pub trait Output {
    // Required methods
    fn set(&self);
    fn clear(&self);
    fn toggle(&self) -> bool;

    // Provided method
    fn write_activation(&self, state: ActivationState, mode: ActivationMode) { ... }
}

Required Methods§

Source

fn set(&self)

Set the GPIO pin high. If the pin is not an output or input/output, this call is ignored.

Source

fn clear(&self)

Set the GPIO pin low. If the pin is not an output or input/output, this call is ignored.

Source

fn toggle(&self) -> bool

Toggle the GPIO pin. If the pin was high, set it low. If the pin was low, set it high. If the pin is not an output or input/output, this call is ignored. Return the new value of the pin.

Provided Methods§

Source

fn write_activation(&self, state: ActivationState, mode: ActivationMode)

Activate or deactivate a GPIO pin, for a given activation mode.

Implementors§

Source§

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

impl Output for GpioPin<'_>

impl Output for GpioPin<'_>

impl Output for Pin<'_>

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

impl<'a> Output for IntPin<'a>

impl<'a> Output for Pin<'a>

impl Output for GPIOPin<'_>

impl Output for GpioPin<'_>

impl Output for RPGpioPin<'_>

impl Output for GPIOPin<'_>

impl Output for GpioPin<'_>

impl Output for Pin<'_>

impl Output for Pin<'_>