esp_lp_hal

Module gpio

Source
Expand description

§General Purpose Input/Output

§Overview

It’s assumed that GPIOs are already configured correctly by the HP core.

This driver supports various operations on GPIO pins, primarily manipulating the pin state (setting high/low, toggling).

This module also implements a number of traits from embedded-hal to provide a common interface for GPIO pins.

§Examples

fn main(gpio0: Input<0>, gpio1: Output<1>) -> ! {
    loop {
        let input_state: bool = gpio0.input_state();
        gpio.set_output(input_state);

        esp_lp_hal::delay::Delay.delay_millis(50);
    }
}

Structs§