diff options
| author | Grant Miller <[email protected]> | 2024-09-06 15:08:58 -0500 |
|---|---|---|
| committer | Grant Miller <[email protected]> | 2024-09-06 15:08:58 -0500 |
| commit | b8beaba6df08c4455f55780a6e13191d95ad9eec (patch) | |
| tree | 0f7ddde7691c4d2141e307fbbd44f8ddcb77c107 /examples/stm32g4 | |
| parent | d24c47a3ff4a82786b67f06d876bafb1bdabc163 (diff) | |
last oops I promise
Diffstat (limited to 'examples/stm32g4')
| -rw-r--r-- | examples/stm32g4/src/bin/pwm.rs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/examples/stm32g4/src/bin/pwm.rs b/examples/stm32g4/src/bin/pwm.rs index 3833be58f..6c965012c 100644 --- a/examples/stm32g4/src/bin/pwm.rs +++ b/examples/stm32g4/src/bin/pwm.rs | |||
| @@ -6,7 +6,6 @@ use embassy_executor::Spawner; | |||
| 6 | use embassy_stm32::gpio::OutputType; | 6 | use embassy_stm32::gpio::OutputType; |
| 7 | use embassy_stm32::time::khz; | 7 | use embassy_stm32::time::khz; |
| 8 | use embassy_stm32::timer::simple_pwm::{PwmPin, SimplePwm}; | 8 | use embassy_stm32::timer::simple_pwm::{PwmPin, SimplePwm}; |
| 9 | use embassy_stm32::timer::Channel; | ||
| 10 | use embassy_time::Timer; | 9 | use embassy_time::Timer; |
| 11 | use {defmt_rtt as _, panic_probe as _}; | 10 | use {defmt_rtt as _, panic_probe as _}; |
| 12 | 11 | ||
| @@ -28,7 +27,7 @@ async fn main(_spawner: Spawner) { | |||
| 28 | Timer::after_millis(300).await; | 27 | Timer::after_millis(300).await; |
| 29 | ch1.set_duty_cycle_fraction(1, 4); | 28 | ch1.set_duty_cycle_fraction(1, 4); |
| 30 | Timer::after_millis(300).await; | 29 | Timer::after_millis(300).await; |
| 31 | ch1.set_dutycycle_fraction(1, 2); | 30 | ch1.set_duty_cycle_fraction(1, 2); |
| 32 | Timer::after_millis(300).await; | 31 | Timer::after_millis(300).await; |
| 33 | ch1.set_duty_cycle(ch1.max_duty_cycle() - 1); | 32 | ch1.set_duty_cycle(ch1.max_duty_cycle() - 1); |
| 34 | Timer::after_millis(300).await; | 33 | Timer::after_millis(300).await; |
