diff options
| author | Simon Berg <[email protected]> | 2022-12-09 20:30:17 +0100 |
|---|---|---|
| committer | Simon Berg <[email protected]> | 2022-12-09 20:30:17 +0100 |
| commit | 488e3224783abe07b2be8046642fd9b81f5714b9 (patch) | |
| tree | dc591cbb2889188f2b329da9256c810f0a1d5abc | |
| parent | cd59046e6c179809ee19fb2592e65cf5a0a07980 (diff) | |
Clear unused pulls in set_pull.
| -rw-r--r-- | embassy-rp/src/gpio.rs | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/embassy-rp/src/gpio.rs b/embassy-rp/src/gpio.rs index 315cd2aca..ec05de611 100644 --- a/embassy-rp/src/gpio.rs +++ b/embassy-rp/src/gpio.rs | |||
| @@ -476,11 +476,13 @@ impl<'d, T: Pin> Flex<'d, T> { | |||
| 476 | unsafe { | 476 | unsafe { |
| 477 | self.pin.pad_ctrl().modify(|w| { | 477 | self.pin.pad_ctrl().modify(|w| { |
| 478 | w.set_ie(true); | 478 | w.set_ie(true); |
| 479 | match pull { | 479 | let (pu, pd) = match pull { |
| 480 | Pull::Up => w.set_pue(true), | 480 | Pull::Up => (true, false), |
| 481 | Pull::Down => w.set_pde(true), | 481 | Pull::Down => (false, true), |
| 482 | Pull::None => {} | 482 | Pull::None => (false, false), |
| 483 | } | 483 | }; |
| 484 | w.set_pue(pu); | ||
| 485 | w.set_pde(pd); | ||
| 484 | }); | 486 | }); |
| 485 | } | 487 | } |
| 486 | } | 488 | } |
