Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions embassy-rp/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Add reset_to_usb_boot for rp235x ([#4705](https://github.com/embassy-rs/embassy/pull/4705))
- Add fix #4822 in PIO onewire. Change to disable the state machine before setting y register ([#4824](https://github.com/embassy-rs/embassy/pull/4824))
- Add PIO::Ws2812 color order support
- Add output enable inversion API (gpio, pio)

## 0.8.0 - 2025-08-26

Expand Down
12 changes: 12 additions & 0 deletions embassy-rp/src/gpio.rs
Original file line number Diff line number Diff line change
Expand Up @@ -722,6 +722,18 @@ impl<'d> Flex<'d> {
});
}

/// Configure the output enable inversion of this pin
#[inline]
pub fn set_output_enable_inversion(&mut self, invert: bool) {
self.pin.gpio().ctrl().modify(|w| {
w.set_oeover(if invert {
pac::io::vals::Oeover::INVERT
} else {
pac::io::vals::Oeover::NORMAL
})
})
}

/// Configure the output logic inversion of this pin.
#[inline]
pub fn set_output_inversion(&mut self, invert: bool) {
Expand Down
12 changes: 12 additions & 0 deletions embassy-rp/src/pio/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,18 @@ impl<'l, PIO: Instance> Pin<'l, PIO> {
});
}

/// Configure the output enable inversion of this pin
#[inline]
pub fn set_output_enable_inversion(&mut self, invert: bool) {
self.pin.gpio().ctrl().modify(|w| {
w.set_oeover(if invert {
pac::io::vals::Oeover::INVERT
} else {
pac::io::vals::Oeover::NORMAL
})
})
}

/// Set the pin's input sync bypass.
pub fn set_input_sync_bypass(&mut self, bypass: bool) {
let mask = 1 << self.pin();
Expand Down