diff options
| author | Dario Nieuwenhuis <[email protected]> | 2024-02-01 01:02:01 +0000 |
|---|---|---|
| committer | GitHub <[email protected]> | 2024-02-01 01:02:01 +0000 |
| commit | 7e02389995379f6cc6057530cc5e2c8c9d5fb0b0 (patch) | |
| tree | b38c4604daf076dc08cc8b6e6ca116df83862f7e /examples | |
| parent | 2f7c8faf51617ca76f967bfafd51d9cd079e266a (diff) | |
| parent | b16cc04036da8bcbfe273cd796c092e8e2a074c9 (diff) | |
Merge pull request #2410 from eZioPan/waveform-on-CHx
impl waveform with TIM OC Channel DMA
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/stm32f4/src/bin/ws2812_pwm.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/stm32f4/src/bin/ws2812_pwm.rs b/examples/stm32f4/src/bin/ws2812_pwm.rs index 239709253..6122cea2d 100644 --- a/examples/stm32f4/src/bin/ws2812_pwm.rs +++ b/examples/stm32f4/src/bin/ws2812_pwm.rs | |||
| @@ -91,7 +91,7 @@ async fn main(_spawner: Spawner) { | |||
| 91 | loop { | 91 | loop { |
| 92 | for &color in color_list { | 92 | for &color in color_list { |
| 93 | // with &mut, we can easily reuse same DMA channel multiple times | 93 | // with &mut, we can easily reuse same DMA channel multiple times |
| 94 | ws2812_pwm.gen_waveform(&mut dp.DMA1_CH2, pwm_channel, color).await; | 94 | ws2812_pwm.waveform_up(&mut dp.DMA1_CH2, pwm_channel, color).await; |
| 95 | // ws2812 need at least 50 us low level input to confirm the input data and change it's state | 95 | // ws2812 need at least 50 us low level input to confirm the input data and change it's state |
| 96 | Timer::after_micros(50).await; | 96 | Timer::after_micros(50).await; |
| 97 | // wait until ticker tick | 97 | // wait until ticker tick |
