[][src]Trait esp32_hal::gpio::OutputPin

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 { ... } }

Functions available on output pins

Required methods

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

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

Enable/disable the output

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

Set drive strength

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

Enable/disable the output while in sleep mode

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

Enable/Disable internal pull up resistor while in sleep mode

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

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.

Loading content...

Provided methods

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.

Loading content...

Implementors

impl<MODE> OutputPin for Gpio0<MODE>[src]

impl<MODE> OutputPin for Gpio1<MODE>[src]

impl<MODE> OutputPin for Gpio2<MODE>[src]

impl<MODE> OutputPin for Gpio3<MODE>[src]

impl<MODE> OutputPin for Gpio4<MODE>[src]

impl<MODE> OutputPin for Gpio5<MODE>[src]

impl<MODE> OutputPin for Gpio6<MODE>[src]

impl<MODE> OutputPin for Gpio7<MODE>[src]

impl<MODE> OutputPin for Gpio8<MODE>[src]

impl<MODE> OutputPin for Gpio9<MODE>[src]

impl<MODE> OutputPin for Gpio10<MODE>[src]

impl<MODE> OutputPin for Gpio11<MODE>[src]

impl<MODE> OutputPin for Gpio12<MODE>[src]

impl<MODE> OutputPin for Gpio13<MODE>[src]

impl<MODE> OutputPin for Gpio14<MODE>[src]

impl<MODE> OutputPin for Gpio15<MODE>[src]

impl<MODE> OutputPin for Gpio16<MODE>[src]

impl<MODE> OutputPin for Gpio17<MODE>[src]

impl<MODE> OutputPin for Gpio18<MODE>[src]

impl<MODE> OutputPin for Gpio19<MODE>[src]

impl<MODE> OutputPin for Gpio20<MODE>[src]

impl<MODE> OutputPin for Gpio21<MODE>[src]

impl<MODE> OutputPin for Gpio22<MODE>[src]

impl<MODE> OutputPin for Gpio23<MODE>[src]

impl<MODE> OutputPin for Gpio25<MODE>[src]

impl<MODE> OutputPin for Gpio26<MODE>[src]

impl<MODE> OutputPin for Gpio27<MODE>[src]

impl<MODE> OutputPin for Gpio32<MODE>[src]

impl<MODE> OutputPin for Gpio33<MODE>[src]

Loading content...