diff options
| author | eZio Pan <[email protected]> | 2024-01-06 22:22:38 +0800 |
|---|---|---|
| committer | eZio Pan <[email protected]> | 2024-01-06 22:22:38 +0800 |
| commit | 424ddaf3d95417bcfe8b46475c8135aead3792d2 (patch) | |
| tree | c7da31ded7549d103e5b557f057c666afb795a89 /examples/stm32f4/src/bin/ws2812_pwm.rs | |
| parent | 294046cddbdd485a99f7531c29af92c326124123 (diff) | |
impl waveform with TIM Channel
Diffstat (limited to 'examples/stm32f4/src/bin/ws2812_pwm.rs')
| -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 |
