diff options
| author | Ulf Lilleengen <[email protected]> | 2025-07-03 11:33:54 +0200 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-07-03 11:33:54 +0200 |
| commit | e8bf3bd51caef51df72d37b9ef7ae2bf1e6921eb (patch) | |
| tree | a8ebdb0567657864e2705ae2acee2cb39693555b | |
| parent | b528ed06e3025e0803e8fd6dc53ac968df9f49bc (diff) | |
| parent | 30e6d633d3b54b9d34894e9c4b3ce32571115983 (diff) | |
Merge pull request #4361 from jue89/fix/embassy_nrf_pwm
embassy-nrf: fix PWM loop count
| -rw-r--r-- | embassy-nrf/src/pwm.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/embassy-nrf/src/pwm.rs b/embassy-nrf/src/pwm.rs index a2e153e26..3d76272ac 100644 --- a/embassy-nrf/src/pwm.rs +++ b/embassy-nrf/src/pwm.rs | |||
| @@ -479,9 +479,8 @@ impl<'d, 's, T: Instance> Sequencer<'d, 's, T> { | |||
| 479 | let seqstart_index = if start_seq == StartSequence::One { 1 } else { 0 }; | 479 | let seqstart_index = if start_seq == StartSequence::One { 1 } else { 0 }; |
| 480 | 480 | ||
| 481 | match times { | 481 | match times { |
| 482 | // just the one time, no loop count | 482 | SequenceMode::Loop(n) => { |
| 483 | SequenceMode::Loop(_) => { | 483 | r.loop_().write(|w| w.set_cnt(vals::LoopCnt(n))); |
| 484 | r.loop_().write(|w| w.set_cnt(vals::LoopCnt::DISABLED)); | ||
| 485 | } | 484 | } |
| 486 | // to play infinitely, repeat the sequence one time, then have loops done self trigger seq0 again | 485 | // to play infinitely, repeat the sequence one time, then have loops done self trigger seq0 again |
| 487 | SequenceMode::Infinite => { | 486 | SequenceMode::Infinite => { |
