Expand description
§General Purpose I/Os
§Overview
The GPIO peripheral provides access to General Purpose Input/Output pins on ESP chips.
This driver supports various operations on GPIO pins, including setting the pin mode, direction, and manipulating the pin state (setting high/low, toggling). It provides an interface to interact with GPIO pins on ESP chips, allowing developers to control and read the state of the pins. This module also implements a number of traits from embedded-hal to provide a common interface for GPIO pins.
To get access to the pins, you first need to convert them into a HAL
designed struct from the pac struct GPIO
and IO_MUX
using IO::new
.
§Example
let io = IO::new(peripherals.GPIO, peripherals.IO_MUX);
let mut led = io.pins.gpio5.into_push_pull_output();
Modules§
- etm
- Event Task Matrix Function
Structs§
- Alternate
- Analog
- AnyPin
- Floating
- Gpio0
Signals - Gpio1
Signals - Gpio2
Signals - Gpio3
Signals - Gpio4
Signals - Gpio5
Signals - Gpio6
Signals - Gpio7
Signals - Gpio8
Signals - Gpio9
Signals - Gpio10
Signals - Gpio11
Signals - Gpio12
Signals - Gpio13
Signals - Gpio14
Signals - Gpio15
Signals - Gpio16
Signals - Gpio17
Signals - Gpio18
Signals - Gpio19
Signals - Gpio20
Signals - Gpio21
Signals - Gpio22
Signals - Gpio23
Signals - Gpio24
Signals - Gpio25
Signals - Gpio26
Signals - Gpio27
Signals - GpioPin
- IO
- General Purpose Input/Output driver
- Input
- Inverted
Input - Inverted
Output - Open
Drain - Output
- Pins
- Pull
Down - PullUp
- Push
Pull - RTCInput
- RTCOutput
- Unknown
Enums§
- Alternate
Function - Drive
Strength - Event
- Input
Signal - Peripheral input signals for the GPIO mux
- Output
Signal - Peripheral input signals for the GPIO mux
- RtcFunction
Constants§
- INPUT_
SIGNAL_ MAX - NO_PIN
- Convenience constant for
Option::None
pin - NUM_
PINS - ONE_
INPUT - OUTPUT_
SIGNAL_ MAX - ZERO_
INPUT