diff options
| author | Jacob Rosenthal <[email protected]> | 2021-10-31 23:00:33 -0700 |
|---|---|---|
| committer | Jacob Rosenthal <[email protected]> | 2021-10-31 23:13:49 -0700 |
| commit | 78e382c9aa421b8319dcf1c9ea44ae046c1a019d (patch) | |
| tree | 368ec634e9fb534d5ee54c8d50882bd8cb28f4d0 | |
| parent | 96df2fdb4343c701549bc77fa9bb06352e439f81 (diff) | |
stop->sequence_stop
| -rw-r--r-- | embassy-nrf/src/pwm.rs | 4 | ||||
| -rw-r--r-- | examples/nrf/src/bin/pwm_simple_sin.rs | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/embassy-nrf/src/pwm.rs b/embassy-nrf/src/pwm.rs index 83d0bdae3..8d4a9d8b8 100644 --- a/embassy-nrf/src/pwm.rs +++ b/embassy-nrf/src/pwm.rs | |||
| @@ -276,7 +276,7 @@ impl<'d, T: Instance> Pwm<'d, T> { | |||
| 276 | 276 | ||
| 277 | /// Stop playback | 277 | /// Stop playback |
| 278 | #[inline(always)] | 278 | #[inline(always)] |
| 279 | pub fn stop(&self) { | 279 | pub fn sequence_stop(&self) { |
| 280 | let r = T::regs(); | 280 | let r = T::regs(); |
| 281 | 281 | ||
| 282 | r.shorts.write(|w| unsafe { w.bits(0x0) }); | 282 | r.shorts.write(|w| unsafe { w.bits(0x0) }); |
| @@ -363,7 +363,7 @@ impl<'d, T: Instance> Pwm<'d, T> { | |||
| 363 | 363 | ||
| 364 | impl<'a, T: Instance> Drop for Pwm<'a, T> { | 364 | impl<'a, T: Instance> Drop for Pwm<'a, T> { |
| 365 | fn drop(&mut self) { | 365 | fn drop(&mut self) { |
| 366 | self.stop(); | 366 | self.sequence_stop(); |
| 367 | self.disable(); | 367 | self.disable(); |
| 368 | 368 | ||
| 369 | info!("pwm drop: done"); | 369 | info!("pwm drop: done"); |
diff --git a/examples/nrf/src/bin/pwm_simple_sin.rs b/examples/nrf/src/bin/pwm_simple_sin.rs index 3fbfc960f..c7d85381b 100644 --- a/examples/nrf/src/bin/pwm_simple_sin.rs +++ b/examples/nrf/src/bin/pwm_simple_sin.rs | |||
| @@ -38,7 +38,7 @@ async fn main(_spawner: Spawner, p: Peripherals) { | |||
| 38 | 38 | ||
| 39 | Timer::after(Duration::from_millis(20000)).await; | 39 | Timer::after(Duration::from_millis(20000)).await; |
| 40 | 40 | ||
| 41 | pwm.stop(); | 41 | pwm.sequence_stop(); |
| 42 | info!("pwm stopped!"); | 42 | info!("pwm stopped!"); |
| 43 | 43 | ||
| 44 | loop { | 44 | loop { |
