pub trait _embedded_hal_digital_v2_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§

type Error

Error type

Required Methods§

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

Is the input pin high?

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

Is the input pin low?

Implementations on Foreign Types§

§

impl<MODE, TYPE> InputPin for AnyPin<Input<MODE>, TYPE>

§

type Error = Infallible

§

fn is_high( &self ) -> Result<bool, <AnyPin<Input<MODE>, TYPE> as InputPin>::Error>

§

fn is_low(&self) -> Result<bool, <AnyPin<Input<MODE>, TYPE> as InputPin>::Error>

§

impl<MODE, const GPIONUM: u8> InputPin for GpioPin<Input<MODE>, GPIONUM>
where GpioPin<Input<MODE>, GPIONUM>: GpioProperties,

§

type Error = Infallible

§

fn is_high( &self ) -> Result<bool, <GpioPin<Input<MODE>, GPIONUM> as InputPin>::Error>

§

fn is_low( &self ) -> Result<bool, <GpioPin<Input<MODE>, GPIONUM> as InputPin>::Error>

§

impl<const GPIONUM: u8> InputPin for GpioPin<Output<OpenDrain>, GPIONUM>
where GpioPin<Output<OpenDrain>, GPIONUM>: GpioProperties,

§

type Error = Infallible

§

fn is_high( &self ) -> Result<bool, <GpioPin<Output<OpenDrain>, GPIONUM> as InputPin>::Error>

§

fn is_low( &self ) -> Result<bool, <GpioPin<Output<OpenDrain>, GPIONUM> as InputPin>::Error>

Implementors§

§

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

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

§

type Error = ()