diff options
| author | Jacob Rosenthal <[email protected]> | 2021-10-30 11:33:28 -0700 |
|---|---|---|
| committer | Jacob Rosenthal <[email protected]> | 2021-10-30 11:33:28 -0700 |
| commit | ee8f76537b2dd8e886f44bd7e43d4ba9fd767778 (patch) | |
| tree | 5a21478b6999e61e0d4a89ade4f99c0bc1a83939 | |
| parent | 6d8198a46ae20be24c84fbb07d474d4eb507ac4d (diff) | |
at least stop on drop
| -rw-r--r-- | embassy-nrf/src/pwm.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/embassy-nrf/src/pwm.rs b/embassy-nrf/src/pwm.rs index d834b1303..422943124 100644 --- a/embassy-nrf/src/pwm.rs +++ b/embassy-nrf/src/pwm.rs | |||
| @@ -328,6 +328,7 @@ impl<'a, T: Instance> Drop for Pwm<'a, T> { | |||
| 328 | fn drop(&mut self) { | 328 | fn drop(&mut self) { |
| 329 | let r = T::regs(); | 329 | let r = T::regs(); |
| 330 | 330 | ||
| 331 | self.stop(); | ||
| 331 | r.enable.write(|w| w.enable().disabled()); | 332 | r.enable.write(|w| w.enable().disabled()); |
| 332 | 333 | ||
| 333 | info!("pwm drop: done"); | 334 | info!("pwm drop: done"); |
