diff options
Diffstat (limited to 'examples/stm32f4/src/bin/pwm_complementary.rs')
| -rw-r--r-- | examples/stm32f4/src/bin/pwm_complementary.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/stm32f4/src/bin/pwm_complementary.rs b/examples/stm32f4/src/bin/pwm_complementary.rs index c981f1a76..5e39a06f5 100644 --- a/examples/stm32f4/src/bin/pwm_complementary.rs +++ b/examples/stm32f4/src/bin/pwm_complementary.rs | |||
| @@ -5,9 +5,9 @@ use defmt::*; | |||
| 5 | use embassy_executor::Spawner; | 5 | 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::Channel; | ||
| 8 | use embassy_stm32::timer::complementary_pwm::{ComplementaryPwm, ComplementaryPwmPin}; | 9 | use embassy_stm32::timer::complementary_pwm::{ComplementaryPwm, ComplementaryPwmPin}; |
| 9 | use embassy_stm32::timer::simple_pwm::PwmPin; | 10 | use embassy_stm32::timer::simple_pwm::PwmPin; |
| 10 | use embassy_stm32::timer::Channel; | ||
| 11 | use embassy_time::Timer; | 11 | use embassy_time::Timer; |
| 12 | use {defmt_rtt as _, panic_probe as _}; | 12 | use {defmt_rtt as _, panic_probe as _}; |
| 13 | 13 | ||
| @@ -33,7 +33,7 @@ async fn main(_spawner: Spawner) { | |||
| 33 | ); | 33 | ); |
| 34 | 34 | ||
| 35 | let max = pwm.get_max_duty(); | 35 | let max = pwm.get_max_duty(); |
| 36 | pwm.set_dead_time(max / 1024); | 36 | pwm.set_dead_time((max / 1024) as u16); |
| 37 | 37 | ||
| 38 | pwm.enable(Channel::Ch1); | 38 | pwm.enable(Channel::Ch1); |
| 39 | 39 | ||
