aboutsummaryrefslogtreecommitdiff
path: root/examples/stm32h7/src/bin/pwm.rs
diff options
context:
space:
mode:
Diffstat (limited to 'examples/stm32h7/src/bin/pwm.rs')
-rw-r--r--examples/stm32h7/src/bin/pwm.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/examples/stm32h7/src/bin/pwm.rs b/examples/stm32h7/src/bin/pwm.rs
index 37e4c92cc..3bf373c7e 100644
--- a/examples/stm32h7/src/bin/pwm.rs
+++ b/examples/stm32h7/src/bin/pwm.rs
@@ -9,7 +9,7 @@ use embassy_stm32::time::khz;
9use embassy_stm32::timer::simple_pwm::{PwmPin, SimplePwm}; 9use embassy_stm32::timer::simple_pwm::{PwmPin, SimplePwm};
10use embassy_stm32::timer::Channel; 10use embassy_stm32::timer::Channel;
11use embassy_stm32::Config; 11use embassy_stm32::Config;
12use embassy_time::{Duration, Timer}; 12use embassy_time::Timer;
13use {defmt_rtt as _, panic_probe as _}; 13use {defmt_rtt as _, panic_probe as _};
14 14
15#[embassy_executor::main] 15#[embassy_executor::main]
@@ -48,12 +48,12 @@ async fn main(_spawner: Spawner) {
48 48
49 loop { 49 loop {
50 pwm.set_duty(Channel::Ch1, 0); 50 pwm.set_duty(Channel::Ch1, 0);
51 Timer::after(Duration::from_millis(300)).await; 51 Timer::after_millis(300).await;
52 pwm.set_duty(Channel::Ch1, max / 4); 52 pwm.set_duty(Channel::Ch1, max / 4);
53 Timer::after(Duration::from_millis(300)).await; 53 Timer::after_millis(300).await;
54 pwm.set_duty(Channel::Ch1, max / 2); 54 pwm.set_duty(Channel::Ch1, max / 2);
55 Timer::after(Duration::from_millis(300)).await; 55 Timer::after_millis(300).await;
56 pwm.set_duty(Channel::Ch1, max - 1); 56 pwm.set_duty(Channel::Ch1, max - 1);
57 Timer::after(Duration::from_millis(300)).await; 57 Timer::after_millis(300).await;
58 } 58 }
59} 59}