Docs.rs
  • esp32c2-hal-0.5.1
    • esp32c2-hal 0.5.1
    • Docs.rs crate page
    • MIT OR Apache-2.0
    • Links
    • Repository
    • crates.io
    • Source
    • Owners
    • jessebraham
    • github:esp-rs:espressif
    • Dependencies
      • embassy-time ^0.1.0 normal
      • embedded-hal ^0.2.7 normal
      • embedded-hal =1.0.0-alpha.9 normal
      • embedded-hal-async ^0.2.0-alpha.0 normal
      • embedded-hal-nb =1.0.0-alpha.1 normal
      • esp-hal-common ^0.7.0 normal
      • r0 ^1.0.0 normal
      • critical-section ^1.1.1 dev
      • embedded-graphics ^0.7.1 dev
      • esp-backtrace ^0.5.0 dev
      • esp-println ^0.3.1 dev
      • sha2 ^0.10.6 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
  • Constants
  • Traits
  • Functions
  • Type Definitions
?
Change settings

Module esp32c2_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
  • AnyPin
  • Floating
  • Gpio0Signals
  • Gpio1Signals
  • Gpio2Signals
  • Gpio3Signals
  • Gpio4Signals
  • Gpio5Signals
  • Gpio6Signals
  • Gpio7Signals
  • Gpio8Signals
  • Gpio9Signals
  • Gpio10Signals
  • Gpio18Signals
  • Gpio19Signals
  • Gpio20Signals
  • 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

Constants

  • NUM_PINS

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
  • Gpio18
  • Gpio19
  • Gpio20