Trait esp32_hal::gpio::OutputPin [−][src]
pub trait OutputPin: Pin + Pull { fn set_to_open_drain_output(&mut self) -> &mut Self; fn set_to_push_pull_output(&mut self) -> &mut Self; fn enable_output(&mut self, on: bool) -> &mut Self; fn set_output_high(&mut self, on: bool) -> &mut Self; fn set_drive_strength(&mut self, strength: DriveStrength) -> &mut Self; fn enable_open_drain(&mut self, on: bool) -> &mut Self; fn enable_output_in_sleep_mode(&mut self, on: bool) -> &mut Self; fn set_drive_strength_in_sleep_mode(
&mut self,
strength: DriveStrength
) -> &mut Self; fn internal_pull_up_in_sleep_mode(&mut self, on: bool) -> &mut Self; fn internal_pull_down_in_sleep_mode(&mut self, on: bool) -> &mut Self; fn connect_peripheral_to_output_with_options(
&mut self,
signal: OutputSignal,
invert: bool,
invert_enable: bool,
enable_from_gpio: bool,
force_via_gpio_mux: bool
) -> &mut Self; fn connect_peripheral_to_output(
&mut self,
signal: OutputSignal
) -> &mut Self { ... } }
Expand description
Functions available on output pins
Required methods
fn set_to_open_drain_output(&mut self) -> &mut Self
fn set_to_open_drain_output(&mut self) -> &mut Self
Set pad to open drain output
Disables input, pull up/down resistors and sleep mode. Sets function to GPIO and drive strength to default (20mA). Does not change sleep mode settings.
fn set_to_push_pull_output(&mut self) -> &mut Self
fn set_to_push_pull_output(&mut self) -> &mut Self
Set pad to push/pull output
Disables input, pull up/down resistors and sleep mode. Sets function to GPIO and drive strength to default (20mA). Does not change sleep mode settings.
fn enable_output(&mut self, on: bool) -> &mut Self
fn enable_output(&mut self, on: bool) -> &mut Self
Enable/disable the output
fn set_output_high(&mut self, on: bool) -> &mut Self
fn set_output_high(&mut self, on: bool) -> &mut Self
Set the output to high or low
fn set_drive_strength(&mut self, strength: DriveStrength) -> &mut Self
fn set_drive_strength(&mut self, strength: DriveStrength) -> &mut Self
Set drive strength
fn enable_open_drain(&mut self, on: bool) -> &mut Self
fn enable_open_drain(&mut self, on: bool) -> &mut Self
Enable/Disable open drain
fn enable_output_in_sleep_mode(&mut self, on: bool) -> &mut Self
fn enable_output_in_sleep_mode(&mut self, on: bool) -> &mut Self
Enable/disable the output while in sleep mode
fn set_drive_strength_in_sleep_mode(
&mut self,
strength: DriveStrength
) -> &mut Self
fn set_drive_strength_in_sleep_mode(
&mut self,
strength: DriveStrength
) -> &mut Self
Set drive strength while in sleep mode
fn internal_pull_up_in_sleep_mode(&mut self, on: bool) -> &mut Self
fn internal_pull_up_in_sleep_mode(&mut self, on: bool) -> &mut Self
Enable/Disable internal pull up resistor while in sleep mode
fn internal_pull_down_in_sleep_mode(&mut self, on: bool) -> &mut Self
fn internal_pull_down_in_sleep_mode(&mut self, on: bool) -> &mut Self
Enable/Disable internal pull down resistor while in sleep mode
fn connect_peripheral_to_output_with_options(
&mut self,
signal: OutputSignal,
invert: bool,
invert_enable: bool,
enable_from_gpio: bool,
force_via_gpio_mux: bool
) -> &mut Self
fn connect_peripheral_to_output_with_options(
&mut self,
signal: OutputSignal,
invert: bool,
invert_enable: bool,
enable_from_gpio: bool,
force_via_gpio_mux: bool
) -> &mut Self
Connect peripheral to output
invert
inverts the output signal, invert_enable
inverts the output
enable signal, enable_from_gpio
uses the output enable signal from the gpio
control register instead of controlling it by the peripheral 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_peripheral_to_output(&mut self, signal: OutputSignal) -> &mut Self
fn connect_peripheral_to_output(&mut self, signal: OutputSignal) -> &mut Self
Connect peripheral to output using default options
This is a wrapper around connect_peripheral_to_output_with_options, which sets all the options to false.