Skip to content

Commit

Permalink
Fix using Level as output
Browse files Browse the repository at this point in the history
  • Loading branch information
bugadani committed Oct 24, 2024
1 parent c039ea8 commit b753900
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion esp-hal/src/gpio/placeholder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,14 @@ impl Level {

pub(crate) fn connect_peripheral_to_output(
&mut self,
_signal: OutputSignal,
signal: OutputSignal,
_: private::Internal,
) {
// "Connecting" a constant value to a peripheral output means disconnecting said
// output from the outside world.
unsafe { GPIO::steal() }
.func_in_sel_cfg(signal as usize - FUNC_IN_SEL_OFFSET)
.modify(|_, w| w.sel().clear_bit());
}

pub(crate) fn disconnect_from_peripheral_output(
Expand Down

0 comments on commit b753900

Please sign in to comment.