diff options
| author | Dario Nieuwenhuis <[email protected]> | 2023-12-25 14:26:00 +0000 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-12-25 14:26:00 +0000 |
| commit | eebfee189a592427423d3a3ad22132d59926a0e8 (patch) | |
| tree | 04a904e569fb1870817aff3335958ef4e20b56e7 /examples/stm32f4/src | |
| parent | 8b6c6c7df68088abc4a572a825a03e79c9b8694a (diff) | |
| parent | d90a97aa4c5977e3d071fb4ed94656e6666d965c (diff) | |
Merge pull request #2355 from eZioPan/update-metapac7
update metapac after stm32-data PR323
Diffstat (limited to 'examples/stm32f4/src')
| -rw-r--r-- | examples/stm32f4/src/bin/ws2812_pwm_dma.rs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/examples/stm32f4/src/bin/ws2812_pwm_dma.rs b/examples/stm32f4/src/bin/ws2812_pwm_dma.rs index cdce36f2e..4458b643f 100644 --- a/examples/stm32f4/src/bin/ws2812_pwm_dma.rs +++ b/examples/stm32f4/src/bin/ws2812_pwm_dma.rs | |||
| @@ -21,7 +21,6 @@ | |||
| 21 | use embassy_executor::Spawner; | 21 | use embassy_executor::Spawner; |
| 22 | use embassy_stm32::gpio::OutputType; | 22 | use embassy_stm32::gpio::OutputType; |
| 23 | use embassy_stm32::pac; | 23 | use embassy_stm32::pac; |
| 24 | use embassy_stm32::pac::timer::vals::Ocpe; | ||
| 25 | use embassy_stm32::time::khz; | 24 | use embassy_stm32::time::khz; |
| 26 | use embassy_stm32::timer::simple_pwm::{PwmPin, SimplePwm}; | 25 | use embassy_stm32::timer::simple_pwm::{PwmPin, SimplePwm}; |
| 27 | use embassy_stm32::timer::{Channel, CountingMode}; | 26 | use embassy_stm32::timer::{Channel, CountingMode}; |
| @@ -94,7 +93,7 @@ async fn main(_spawner: Spawner) { | |||
| 94 | // keep output waveform integrity | 93 | // keep output waveform integrity |
| 95 | pac::TIM3 | 94 | pac::TIM3 |
| 96 | .ccmr_output(pwm_channel.index()) | 95 | .ccmr_output(pwm_channel.index()) |
| 97 | .modify(|v| v.set_ocpe(0, Ocpe::ENABLED)); | 96 | .modify(|v| v.set_ocpe(0, true)); |
| 98 | 97 | ||
| 99 | // make sure PWM output keep low on first start | 98 | // make sure PWM output keep low on first start |
| 100 | ws2812_pwm.set_duty(pwm_channel, 0); | 99 | ws2812_pwm.set_duty(pwm_channel, 0); |
