aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpennae <[email protected]>2023-05-02 13:46:51 +0200
committerpennae <[email protected]>2023-05-02 15:46:22 +0200
commitac111f40d894dec12106638e47317d13728c52a1 (patch)
tree80966c45af298286eea90613bccd96e2d8c60f62
parent3229b5e809688d99a592bbfd1f803e1fb9d62050 (diff)
rp/pio: fix PioPin::set_pull, set_schmitt comment
-rw-r--r--embassy-rp/src/pio.rs9
1 files changed, 4 insertions, 5 deletions
diff --git a/embassy-rp/src/pio.rs b/embassy-rp/src/pio.rs
index 459b7806b..27a6068f9 100644
--- a/embassy-rp/src/pio.rs
+++ b/embassy-rp/src/pio.rs
@@ -277,15 +277,14 @@ impl<PIO: PioInstance> PioPin<PIO> {
277 #[inline] 277 #[inline]
278 pub fn set_pull(&mut self, pull: Pull) { 278 pub fn set_pull(&mut self, pull: Pull) {
279 unsafe { 279 unsafe {
280 self.pad_ctrl().modify(|w| match pull { 280 self.pad_ctrl().modify(|w| {
281 Pull::Up => w.set_pue(true), 281 w.set_pue(pull == Pull::Up);
282 Pull::Down => w.set_pde(true), 282 w.set_pde(pull == Pull::Down);
283 Pull::None => {}
284 }); 283 });
285 } 284 }
286 } 285 }
287 286
288 /// Set the pin's pull. 287 /// Set the pin's schmitt trigger.
289 #[inline] 288 #[inline]
290 pub fn set_schmitt(&mut self, enable: bool) { 289 pub fn set_schmitt(&mut self, enable: bool) {
291 unsafe { 290 unsafe {