diff options
| author | Jacob Rosenthal <[email protected]> | 2021-11-14 11:26:30 -0700 |
|---|---|---|
| committer | Jacob Rosenthal <[email protected]> | 2021-11-14 11:26:30 -0700 |
| commit | 4010a829aef42dd7aec5bdf967675119f2fa0857 (patch) | |
| tree | 2620f3c83aaa0e818ae1760c3382b76c200e041d | |
| parent | 4d61f4aa0dcdaf330e7b9c3df407be03dd8181d4 (diff) | |
nrf: pwm clarify stop and disable pin state
| -rw-r--r-- | embassy-nrf/src/pwm.rs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/embassy-nrf/src/pwm.rs b/embassy-nrf/src/pwm.rs index 7f08866ee..3fdc37ec0 100644 --- a/embassy-nrf/src/pwm.rs +++ b/embassy-nrf/src/pwm.rs | |||
| @@ -308,7 +308,8 @@ impl<'d, T: Instance> SequencePwm<'d, T> { | |||
| 308 | Task::from_reg(&r.tasks_stop) | 308 | Task::from_reg(&r.tasks_stop) |
| 309 | } | 309 | } |
| 310 | 310 | ||
| 311 | /// Stop playback. Does NOT clear the last duty cycle from the pin. | 311 | /// Stop playback. Disables the peripheral. Does NOT clear the last duty |
| 312 | /// cycle from the pin. | ||
| 312 | #[inline(always)] | 313 | #[inline(always)] |
| 313 | pub fn stop(&self) { | 314 | pub fn stop(&self) { |
| 314 | let r = T::regs(); | 315 | let r = T::regs(); |
| @@ -433,8 +434,8 @@ pub enum CounterMode { | |||
| 433 | impl<'d, T: Instance> SimplePwm<'d, T> { | 434 | impl<'d, T: Instance> SimplePwm<'d, T> { |
| 434 | /// Creates the interface to a `SimplePwm` | 435 | /// Creates the interface to a `SimplePwm` |
| 435 | /// | 436 | /// |
| 436 | /// Defaults the freq to 1Mhz, max_duty 1000, duty 0, up mode, and pins low. | 437 | /// Enables the peripheral, defaults the freq to 1Mhz, max_duty 1000, duty |
| 437 | /// Must be started by calling `set_duty` | 438 | /// 0, up mode, and pins low. Must be started by calling `set_duty` |
| 438 | /// | 439 | /// |
| 439 | /// # Safety | 440 | /// # Safety |
| 440 | /// | 441 | /// |
