Docs.rs
  • esp32c3-hal-0.5.0
    • esp32c3-hal 0.5.0
    • Docs.rs crate page
    • MIT OR Apache-2.0
    • Links
    • Repository
    • crates.io
    • Source
    • Owners
    • jessebraham
    • github:esp-rs:espressif
    • Dependencies
      • cfg-if ^1.0.0 normal
      • embassy-time ^0.1.0 normal
      • embedded-can ^0.4.1 normal
      • embedded-hal ^0.2.7 normal
      • embedded-hal =1.0.0-alpha.9 normal
      • embedded-hal-async ^0.1.0-alpha.3 normal
      • embedded-hal-nb =1.0.0-alpha.1 normal
      • esp-hal-common ^0.5.0 normal
      • r0 ^1.0.0 normal
      • riscv ^0.10.1 normal
      • riscv-rt ^0.11.0 normal
      • aes ^0.8.2 dev
      • critical-section ^1.1.1 dev
      • embedded-graphics ^0.7.1 dev
      • esp-backtrace ^0.4.0 dev
      • esp-println ^0.3.1 dev
      • sha2 ^0.10.6 dev
      • smart-leds ^0.3.0 dev
      • ssd1306 ^0.7.1 dev
      • static_cell ^1.0.0 dev
    • Versions
    • 50% of the crate is documented
  • Go to latest version
  • Platform
    • i686-pc-windows-msvc
    • i686-unknown-linux-gnu
    • x86_64-apple-darwin
    • x86_64-pc-windows-msvc
    • x86_64-unknown-linux-gnu
  • Feature flags
  • docs.rs
    • About docs.rs
    • Privacy policy
  • Rust
    • Rust website
    • The Book
    • Standard Library API Reference
    • Rust by Example
    • The Cargo Guide
    • Clippy Documentation
logo

logo

Module gpio

  • Structs
  • Enums
  • Traits
  • Functions
  • Type Definitions
?
Change settings

Module esp32c3_hal::gpio

source ·
Expand description

General Purpose I/Os

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.

let io = IO::new(peripherals.GPIO, peripherals.IO_MUX);
let mut led = io.pins.gpio5.into_push_pull_output();

Structs

Alternate
Analog
Floating
Gpio0Signals
Gpio1Signals
Gpio2Signals
Gpio3Signals
Gpio4Signals
Gpio5Signals
Gpio6Signals
Gpio7Signals
Gpio8Signals
Gpio9Signals
Gpio10Signals
Gpio11Signals
Gpio12Signals
Gpio13Signals
Gpio14Signals
Gpio15Signals
Gpio16Signals
Gpio17Signals
Gpio18Signals
Gpio19Signals
Gpio20Signals
Gpio21Signals
GpioPin
IO
Input
OpenDrain
Output
Pins
PullDown
PullUp
PushPull
RTCInput
RTCOutput
Unknown

Enums

AlternateFunction
DriveStrength
Event
InputSignal
Peripheral input signals for the GPIO mux
OutputSignal
Peripheral output signals for the GPIO mux

Traits

AnalogPin
InputPin
OutputPin
Pin
RTCPin

Functions

connect_high_to_peripheral
connect_low_to_peripheral

Type Definitions

Gpio0
Gpio1
Gpio2
Gpio3
Gpio4
Gpio5
Gpio6
Gpio7
Gpio8
Gpio9
Gpio10
Gpio11
Gpio12
Gpio13
Gpio14
Gpio15
Gpio16
Gpio17
Gpio18
Gpio19
Gpio20
Gpio21