pub trait InputPin {
    type Error;

    fn is_high(&self) -> Result<bool, Self::Error>;
    fn is_low(&self) -> Result<bool, Self::Error>;
}
Expand description

Single digital input pin

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

Required Associated Types

Error type

Required Methods

Is the input pin high?

Is the input pin low?

Implementors

Implementation of fallible v2::InputPin for v1::InputPin digital traits

impl<I> InputPin for Pin<I, ReadableOutput>where
    I: PinId,

impl<I, C> InputPin for Pin<I, Input<C>>where
    I: PinId,
    C: InputConfig,

impl<I, C> InputPin for Pin<I, Interrupt<C>>where
    I: PinId,
    C: InterruptConfig,

impl InputPin for DynPin

impl<GPIO, C> InputPin for ExtInt0<GPIO>where
    GPIO: AnyPin<Mode = Interrupt<C>>,
    C: InterruptConfig,

impl<GPIO, C> InputPin for ExtInt1<GPIO>where
    GPIO: AnyPin<Mode = Interrupt<C>>,
    C: InterruptConfig,

impl<GPIO, C> InputPin for ExtInt2<GPIO>where
    GPIO: AnyPin<Mode = Interrupt<C>>,
    C: InterruptConfig,

impl<GPIO, C> InputPin for ExtInt3<GPIO>where
    GPIO: AnyPin<Mode = Interrupt<C>>,
    C: InterruptConfig,

impl<GPIO, C> InputPin for ExtInt4<GPIO>where
    GPIO: AnyPin<Mode = Interrupt<C>>,
    C: InterruptConfig,

impl<GPIO, C> InputPin for ExtInt5<GPIO>where
    GPIO: AnyPin<Mode = Interrupt<C>>,
    C: InterruptConfig,

impl<GPIO, C> InputPin for ExtInt6<GPIO>where
    GPIO: AnyPin<Mode = Interrupt<C>>,
    C: InterruptConfig,

impl<GPIO, C> InputPin for ExtInt7<GPIO>where
    GPIO: AnyPin<Mode = Interrupt<C>>,
    C: InterruptConfig,

impl<GPIO, C> InputPin for ExtInt8<GPIO>where
    GPIO: AnyPin<Mode = Interrupt<C>>,
    C: InterruptConfig,

impl<GPIO, C> InputPin for ExtInt9<GPIO>where
    GPIO: AnyPin<Mode = Interrupt<C>>,
    C: InterruptConfig,

impl<GPIO, C> InputPin for ExtInt10<GPIO>where
    GPIO: AnyPin<Mode = Interrupt<C>>,
    C: InterruptConfig,

impl<GPIO, C> InputPin for ExtInt11<GPIO>where
    GPIO: AnyPin<Mode = Interrupt<C>>,
    C: InterruptConfig,

impl<GPIO, C> InputPin for ExtInt12<GPIO>where
    GPIO: AnyPin<Mode = Interrupt<C>>,
    C: InterruptConfig,

impl<GPIO, C> InputPin for ExtInt13<GPIO>where
    GPIO: AnyPin<Mode = Interrupt<C>>,
    C: InterruptConfig,

impl<GPIO, C> InputPin for ExtInt14<GPIO>where
    GPIO: AnyPin<Mode = Interrupt<C>>,
    C: InterruptConfig,

impl<GPIO, C> InputPin for ExtInt15<GPIO>where
    GPIO: AnyPin<Mode = Interrupt<C>>,
    C: InterruptConfig,