Skip to content

Rework LP pin traits - #6073

Open
bugadani wants to merge 1 commit into
esp-rs:mainfrom
bugadani:lp-pin-markers
Open

Rework LP pin traits#6073
bugadani wants to merge 1 commit into
esp-rs:mainfrom
bugadani:lp-pin-markers

Conversation

@bugadani

@bugadani bugadani commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Extracted from #6060

Changelog

esp-hal

  • Fixed: set_analog and the touch pad setup no longer clear the open-drain bit of another pad on
    esp32, which numbers its low-power pads differently from its digital ones.
  • Removed: gpio::LpPinWithResistors. gpio::LpPin now covers every low-power pad, and the pull
    resistors of a pad are reached through the driver instead.
  • Changed: Ext1WakeupSource::new and RtcioWakeupSource::new take &mut dyn LpPin on every chip.

Migration guide

esp-hal/GPIO

LpPinWithResistors is replaced by LpPin

The trait held the pull resistor controls of a low-power pad. Those are internal to esp-hal now, so
one trait covers every low-power pad. Name LpPin in a bound or a trait object where you named
LpPinWithResistors:

-let wakeup_pins: &mut [(&mut dyn LpPinWithResistors, Level)] = &mut [
+let wakeup_pins: &mut [(&mut dyn LpPin, Level)] = &mut [
     (&mut peripherals.GPIO2, Level::Low),
     (&mut peripherals.GPIO3, Level::High),
 ];

 let ext1 = Ext1WakeupSource::new(wakeup_pins);

Use Input or Flex to set the pull resistors of a pad. A wake pad keeps the resistors that its
driver configured.

…f the low-power number

Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant