Trait esp32_hal::gpio::InputPin

source ·
pub trait InputPin: Pin {
    // Required methods
    fn set_to_input(&mut self) -> &mut Self;
    fn enable_input(&mut self, on: bool) -> &mut Self;
    fn enable_input_in_sleep_mode(&mut self, on: bool) -> &mut Self;
    fn is_input_high(&self) -> bool;
    fn connect_input_to_peripheral(&mut self, signal: InputSignal) -> &mut Self;
    fn connect_input_to_peripheral_with_options(
        &mut self,
        signal: InputSignal,
        invert: bool,
        force_via_gpio_mux: bool
    ) -> &mut Self;
    fn disconnect_input_from_peripheral(
        &mut self,
        signal: InputSignal
    ) -> &mut Self;
}

Required Methods§

source

fn set_to_input(&mut self) -> &mut Self

source

fn enable_input(&mut self, on: bool) -> &mut Self

source

fn enable_input_in_sleep_mode(&mut self, on: bool) -> &mut Self

source

fn is_input_high(&self) -> bool

source

fn connect_input_to_peripheral(&mut self, signal: InputSignal) -> &mut Self

source

fn connect_input_to_peripheral_with_options( &mut self, signal: InputSignal, invert: bool, force_via_gpio_mux: bool ) -> &mut Self

source

fn disconnect_input_from_peripheral(&mut self, signal: InputSignal) -> &mut Self

Remove a connected signal from this input pin.

Clears the entry in the GPIO matrix / IO mux that associates this input pin with the given input signal. Any other connected signals remain intact.

Object Safety§

This trait is not object safe.

Implementors§

source§

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