diff options
| author | Jacob Rosenthal <[email protected]> | 2021-11-13 16:41:44 -0700 |
|---|---|---|
| committer | Jacob Rosenthal <[email protected]> | 2021-11-13 16:42:19 -0700 |
| commit | 3a166db2800c2b4a141d955d035bb3120a2ac757 (patch) | |
| tree | 853c2cbb0b6d3b31fb2979dfc3badeed83ccf0e1 | |
| parent | 7dfc0acb2fd4ecbebc8ae4a63fc94f1f484e66a9 (diff) | |
nrf: pwm use register reset
| -rw-r--r-- | embassy-nrf/src/pwm.rs | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/embassy-nrf/src/pwm.rs b/embassy-nrf/src/pwm.rs index 206be5af4..48a826e9e 100644 --- a/embassy-nrf/src/pwm.rs +++ b/embassy-nrf/src/pwm.rs | |||
| @@ -336,23 +336,23 @@ impl<'a, T: Instance> Drop for SequencePwm<'a, T> { | |||
| 336 | 336 | ||
| 337 | if let Some(pin) = &self.ch0 { | 337 | if let Some(pin) = &self.ch0 { |
| 338 | pin.set_low(); | 338 | pin.set_low(); |
| 339 | pin.conf().write(|w| w); | 339 | pin.conf().reset(); |
| 340 | r.psel.out[0].write(|w| unsafe { w.bits(0x80000000) }); | 340 | r.psel.out[0].reset(); |
| 341 | } | 341 | } |
| 342 | if let Some(pin) = &self.ch1 { | 342 | if let Some(pin) = &self.ch1 { |
| 343 | pin.set_low(); | 343 | pin.set_low(); |
| 344 | pin.conf().write(|w| w); | 344 | pin.conf().reset(); |
| 345 | r.psel.out[1].write(|w| unsafe { w.bits(0x80000000) }); | 345 | r.psel.out[1].reset(); |
| 346 | } | 346 | } |
| 347 | if let Some(pin) = &self.ch2 { | 347 | if let Some(pin) = &self.ch2 { |
| 348 | pin.set_low(); | 348 | pin.set_low(); |
| 349 | pin.conf().write(|w| w); | 349 | pin.conf().reset(); |
| 350 | r.psel.out[2].write(|w| unsafe { w.bits(0x80000000) }); | 350 | r.psel.out[2].reset(); |
| 351 | } | 351 | } |
| 352 | if let Some(pin) = &self.ch3 { | 352 | if let Some(pin) = &self.ch3 { |
| 353 | pin.set_low(); | 353 | pin.set_low(); |
| 354 | pin.conf().write(|w| w); | 354 | pin.conf().reset(); |
| 355 | r.psel.out[3].write(|w| unsafe { w.bits(0x80000000) }); | 355 | r.psel.out[3].reset(); |
| 356 | } | 356 | } |
| 357 | } | 357 | } |
| 358 | } | 358 | } |
| @@ -616,23 +616,23 @@ impl<'a, T: Instance> Drop for SimplePwm<'a, T> { | |||
| 616 | 616 | ||
| 617 | if let Some(pin) = &self.ch0 { | 617 | if let Some(pin) = &self.ch0 { |
| 618 | pin.set_low(); | 618 | pin.set_low(); |
| 619 | pin.conf().write(|w| w); | 619 | pin.conf().reset(); |
| 620 | r.psel.out[0].write(|w| unsafe { w.bits(0x80000000) }); | 620 | r.psel.out[0].reset(); |
| 621 | } | 621 | } |
| 622 | if let Some(pin) = &self.ch1 { | 622 | if let Some(pin) = &self.ch1 { |
| 623 | pin.set_low(); | 623 | pin.set_low(); |
| 624 | pin.conf().write(|w| w); | 624 | pin.conf().reset(); |
| 625 | r.psel.out[1].write(|w| unsafe { w.bits(0x80000000) }); | 625 | r.psel.out[1].reset(); |
| 626 | } | 626 | } |
| 627 | if let Some(pin) = &self.ch2 { | 627 | if let Some(pin) = &self.ch2 { |
| 628 | pin.set_low(); | 628 | pin.set_low(); |
| 629 | pin.conf().write(|w| w); | 629 | pin.conf().reset(); |
| 630 | r.psel.out[2].write(|w| unsafe { w.bits(0x80000000) }); | 630 | r.psel.out[2].reset(); |
| 631 | } | 631 | } |
| 632 | if let Some(pin) = &self.ch3 { | 632 | if let Some(pin) = &self.ch3 { |
| 633 | pin.set_low(); | 633 | pin.set_low(); |
| 634 | pin.conf().write(|w| w); | 634 | pin.conf().reset(); |
| 635 | r.psel.out[3].write(|w| unsafe { w.bits(0x80000000) }); | 635 | r.psel.out[3].reset(); |
| 636 | } | 636 | } |
| 637 | } | 637 | } |
| 638 | } | 638 | } |
