Trait kernel::hil::gpio::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>