Trait esp32_hal::gpio::InputPin [−][src]
pub trait InputPin: Pin { 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(&mut self) -> bool; fn connect_input_to_peripheral_with_options(
&mut self,
signal: InputSignal,
invert: bool,
force_via_gpio_mux: bool
) -> &mut Self; fn connect_input_to_peripheral(&mut self, signal: InputSignal) -> &mut Self { ... } }
Expand description
Functions available on input pins
Required methods
fn set_to_input(&mut self) -> &mut Self
fn set_to_input(&mut self) -> &mut Self
Set pad as input
Disables output, pull up/down resistors and sleep mode. Sets function to GPIO. Does not change sleep mode settings
fn enable_input(&mut self, on: bool) -> &mut Self
fn enable_input(&mut self, on: bool) -> &mut Self
Enable/Disable input circuitry
fn enable_input_in_sleep_mode(&mut self, on: bool) -> &mut Self
fn enable_input_in_sleep_mode(&mut self, on: bool) -> &mut Self
Enable/Disable input circuitry while in sleep mode
fn is_input_high(&mut self) -> bool
fn is_input_high(&mut self) -> bool
Get state of input
fn connect_input_to_peripheral_with_options(
&mut self,
signal: InputSignal,
invert: bool,
force_via_gpio_mux: bool
) -> &mut Self
fn connect_input_to_peripheral_with_options(
&mut self,
signal: InputSignal,
invert: bool,
force_via_gpio_mux: bool
) -> &mut Self
Connect input to peripheral
invert
inverts the output signal and force_via_gpio_mux
forces the signal
to be routed through the gpio mux even when it could be routed directly via
the io mux.
Provided methods
fn connect_input_to_peripheral(&mut self, signal: InputSignal) -> &mut Self
fn connect_input_to_peripheral(&mut self, signal: InputSignal) -> &mut Self
Connect input to peripheral using default options
This is a wrapper around connect_input_to_peripheral_with_options, which sets all the options to false.