aboutsummaryrefslogtreecommitdiff
path: root/examples/stm32f4/src
diff options
context:
space:
mode:
authorDario Nieuwenhuis <[email protected]>2023-12-25 14:26:00 +0000
committerGitHub <[email protected]>2023-12-25 14:26:00 +0000
commiteebfee189a592427423d3a3ad22132d59926a0e8 (patch)
tree04a904e569fb1870817aff3335958ef4e20b56e7 /examples/stm32f4/src
parent8b6c6c7df68088abc4a572a825a03e79c9b8694a (diff)
parentd90a97aa4c5977e3d071fb4ed94656e6666d965c (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.rs3
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 @@
21use embassy_executor::Spawner; 21use embassy_executor::Spawner;
22use embassy_stm32::gpio::OutputType; 22use embassy_stm32::gpio::OutputType;
23use embassy_stm32::pac; 23use embassy_stm32::pac;
24use embassy_stm32::pac::timer::vals::Ocpe;
25use embassy_stm32::time::khz; 24use embassy_stm32::time::khz;
26use embassy_stm32::timer::simple_pwm::{PwmPin, SimplePwm}; 25use embassy_stm32::timer::simple_pwm::{PwmPin, SimplePwm};
27use embassy_stm32::timer::{Channel, CountingMode}; 26use 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);