aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--embassy-rp/src/pio/mod.rs12
1 files changed, 10 insertions, 2 deletions
diff --git a/embassy-rp/src/pio/mod.rs b/embassy-rp/src/pio/mod.rs
index 72aa8f104..98f4f8943 100644
--- a/embassy-rp/src/pio/mod.rs
+++ b/embassy-rp/src/pio/mod.rs
@@ -1054,9 +1054,17 @@ impl<'d, PIO: Instance> Common<'d, PIO> {
1054 pub fn make_pio_pin(&mut self, pin: impl Peripheral<P = impl PioPin + 'd> + 'd) -> Pin<'d, PIO> { 1054 pub fn make_pio_pin(&mut self, pin: impl Peripheral<P = impl PioPin + 'd> + 'd) -> Pin<'d, PIO> {
1055 into_ref!(pin); 1055 into_ref!(pin);
1056 pin.gpio().ctrl().write(|w| w.set_funcsel(PIO::FUNCSEL as _)); 1056 pin.gpio().ctrl().write(|w| w.set_funcsel(PIO::FUNCSEL as _));
1057 #[cfg(feature = "_rp235x")] 1057 pin.pad_ctrl().write(|w| {
1058 pin.pad_ctrl().modify(|w| { 1058 #[cfg(feature = "_rp235x")]
1059 w.set_iso(false); 1059 w.set_iso(false);
1060 w.set_schmitt(true);
1061 w.set_slewfast(false);
1062 // TODO rp235x errata E9 recommends to not enable IE if we're not
1063 // going to use input. Maybe add an API for the user to enable/disable this?
1064 w.set_ie(true);
1065 w.set_od(false);
1066 w.set_pue(false);
1067 w.set_pde(false);
1060 }); 1068 });
1061 // we can be relaxed about this because we're &mut here and nothing is cached 1069 // we can be relaxed about this because we're &mut here and nothing is cached
1062 PIO::state().used_pins.fetch_or(1 << pin.pin_bank(), Ordering::Relaxed); 1070 PIO::state().used_pins.fetch_or(1 << pin.pin_bank(), Ordering::Relaxed);