pub trait _embedded_hal_digital_v2_ToggleableOutputPin {
    type Error;

    // Required method
    fn toggle(&mut self) -> Result<(), Self::Error>;
}
Expand description

Output pin that can be toggled

This trait is available if embedded-hal is built with the "unproven" feature.

See toggleable to use a software implementation if both OutputPin and StatefulOutputPin are implemented. Otherwise, implement this using hardware mechanisms.

Required Associated Types§

type Error

Error type

Required Methods§

fn toggle(&mut self) -> Result<(), Self::Error>

Toggle pin output.

Implementations on Foreign Types§

§

impl<MODE, TYPE> ToggleableOutputPin for AnyPin<Output<MODE>, TYPE>

§

type Error = Infallible

§

fn toggle( &mut self ) -> Result<(), <AnyPin<Output<MODE>, TYPE> as ToggleableOutputPin>::Error>

§

impl<MODE, const GPIONUM: u8> ToggleableOutputPin for GpioPin<Output<MODE>, GPIONUM>
where GpioPin<Output<MODE>, GPIONUM>: GpioProperties, <GpioPin<Output<MODE>, GPIONUM> as GpioProperties>::PinType: IsOutputPin,

§

type Error = Infallible

§

fn toggle( &mut self ) -> Result<(), <GpioPin<Output<MODE>, GPIONUM> as ToggleableOutputPin>::Error>

Implementors§

§

impl<P> ToggleableOutputPin for P
where P: Default,

§

type Error = <P as OutputPin>::Error