aboutsummaryrefslogtreecommitdiff
path: root/embassy-rp/src
diff options
context:
space:
mode:
Diffstat (limited to 'embassy-rp/src')
-rw-r--r--embassy-rp/src/pio/mod.rs7
1 files changed, 6 insertions, 1 deletions
diff --git a/embassy-rp/src/pio/mod.rs b/embassy-rp/src/pio/mod.rs
index 1c370fdfc..4d20dfd81 100644
--- a/embassy-rp/src/pio/mod.rs
+++ b/embassy-rp/src/pio/mod.rs
@@ -294,7 +294,12 @@ impl<'l, PIO: Instance> Pin<'l, PIO> {
294 294
295 /// Set the pin's input sync bypass. 295 /// Set the pin's input sync bypass.
296 pub fn set_input_sync_bypass(&mut self, bypass: bool) { 296 pub fn set_input_sync_bypass(&mut self, bypass: bool) {
297 let mask = 1 << self.pin(); 297 let offset = match self.pin() {
298 pin @ 0..32 => 0,
299 pin @ _ => 16,
300 };
301 let mask = 1 << self.pin() - offset;
302
298 if bypass { 303 if bypass {
299 PIO::PIO.input_sync_bypass().write_set(|w| *w = mask); 304 PIO::PIO.input_sync_bypass().write_set(|w| *w = mask);
300 } else { 305 } else {