Trait InputPin

Source
pub trait InputPin {
    type Error;

    // Required methods
    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§

Source

type Error

Error type

Required Methods§

Source

fn is_high(&self) -> Result<bool, Self::Error>

Is the input pin high?

Source

fn is_low(&self) -> Result<bool, Self::Error>

Is the input pin low?

Implementors§

Source§

impl InputPin for ErasedPin<Output<OpenDrain>>

Source§

impl<MODE> InputPin for ErasedPin<Input<MODE>>

Source§

impl<T> InputPin for T
where T: InputPin,

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

Source§

impl<const P: char> InputPin for PartiallyErasedPin<P, Output<OpenDrain>>

Source§

impl<const P: char, MODE> InputPin for PartiallyErasedPin<P, Input<MODE>>

Source§

impl<const P: char, const N: u8> InputPin for DynamicPin<P, N>

Source§

type Error = PinModeError

Source§

impl<const P: char, const N: u8> InputPin for Pin<P, N, Output<OpenDrain>>

Source§

impl<const P: char, const N: u8, MODE> InputPin for Pin<P, N, Input<MODE>>