Module gpio

Source
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
Gpio0Signals
Gpio1Signals
Gpio2Signals
Gpio3Signals
Gpio4Signals
Gpio5Signals
Gpio6Signals
Gpio7Signals
Gpio8Signals
Gpio9Signals
Gpio10Signals
Gpio11Signals
Gpio12Signals
Gpio13Signals
Gpio14Signals
Gpio15Signals
Gpio16Signals
Gpio17Signals
Gpio18Signals
Gpio19Signals
Gpio20Signals
Gpio21Signals
Gpio22Signals
Gpio23Signals
Gpio24Signals
Gpio25Signals
Gpio26Signals
Gpio27Signals
GpioPin
IO
General Purpose Input/Output driver
Input
InvertedInput
InvertedOutput
OpenDrain
Output
Pins
PullDown
PullUp
PushPull
RTCInput
RTCOutput
Unknown

Enums§

AlternateFunction
DriveStrength
Event
InputSignal
Peripheral input signals for the GPIO mux
OutputSignal
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

Traits§

AnalogPin
GpioProperties
InputPin
OutputPin
Pin
RTCInputPin
RTCOutputPin
RTCPin
RTCPinWithResistors

Functions§

connect_high_to_peripheral
connect_low_to_peripheral

Type Aliases§

Gpio0
Gpio1
Gpio2
Gpio3
Gpio4
Gpio5
Gpio6
Gpio7
Gpio8
Gpio9
Gpio10
Gpio11
Gpio12
Gpio13
Gpio14
Gpio15
Gpio16
Gpio17
Gpio18
Gpio19
Gpio20
Gpio21
Gpio22
Gpio23
Gpio24
Gpio25
Gpio26
Gpio27
NoPinType
Convenience type-alias for a no-pin / don’t care - pin
OutputSignalType