[−][src]Module esp32_hal::gpio
GPIO and pin configuration
ESP32 has very flexible pin assignment via the GPIO mux. It also has a separate RTC mux for low power and analog functions.
To support this flexibility two sets of traits are supported:
- The various embedded_hal properties
- Dedicated InputPin, OutputPin, RTCInputPin and RTCOutputPin
The advantage of using the dedicated traits in peripherals is that the configuration of the IO can be done inside the peripheral instead of having to be done upfront.
Re-exports
pub use crate::prelude::*; |
Structs
AF1 | Alternate Function 1 |
AF2 | Alternate Function 2 |
AF4 | Alternate Function 4 |
AF5 | Alternate Function 5 |
AF6 | Alternate Function 6 |
Alternate | Alternate function (type state) |
Analog | Analog mode (type state) |
Floating | Floating input (type state) |
Gpio0 | Pin |
Gpio1 | Pin |
Gpio2 | Pin |
Gpio3 | Pin |
Gpio4 | Pin |
Gpio5 | Pin |
Gpio6 | Pin |
Gpio7 | Pin |
Gpio8 | Pin |
Gpio9 | Pin |
Gpio10 | Pin |
Gpio11 | Pin |
Gpio12 | Pin |
Gpio13 | Pin |
Gpio14 | Pin |
Gpio15 | Pin |
Gpio16 | Pin |
Gpio17 | Pin |
Gpio18 | Pin |
Gpio19 | Pin |
Gpio20 | Pin |
Gpio21 | Pin |
Gpio22 | Pin |
Gpio23 | Pin |
Gpio25 | Pin |
Gpio26 | Pin |
Gpio27 | Pin |
Gpio32 | Pin |
Gpio33 | Pin |
Gpio34 | Pin |
Gpio35 | Pin |
Gpio36 | Pin |
Gpio37 | Pin |
Gpio38 | Pin |
Gpio39 | Pin |
Input | Input mode (type state) |
OpenDrain | Open drain input or output (type state) |
Output | Output mode (type state) |
Parts | Collection of all GPIO pins |
PullDown | Pulled down input (type state) |
PullUp | Pulled up input (type state) |
PushPull | Push pull output (type state) |
RTCInput | Input mode via RTC (type state) |
RTCOutput | Output mode via RTC (type state) |
Unknown | Unknown mode (type state) |
Enums
AlternateFunction | Alternative pin functions |
DriveStrength | Drive strength (values are approximates) |
Event | Interrupt events |
InputSignal | Peripheral input signals for the GPIO mux |
OutputSignal | Peripheral output signals for the GPIO mux |
Traits
GpioExt | Extension trait to split a GPIO peripheral into independent pins and registers |
InputPin | Functions available on input pins |
OutputPin | Functions available on output pins |
Pin | Functions available on all pins |
Pull | Functions available on pins with pull up/down resistors |
RTCInputPin | Functions available on RTC input pins |
RTCOutputPin | Functions available on RTC output pins |
Functions
connect_high_to_peripheral | Connect fixed high to peripheral |
connect_low_to_peripheral | Connect fixed low to peripheral |