diff options
Diffstat (limited to 'embassy-stm32/src/timer/complementary_pwm.rs')
| -rw-r--r-- | embassy-stm32/src/timer/complementary_pwm.rs | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/embassy-stm32/src/timer/complementary_pwm.rs b/embassy-stm32/src/timer/complementary_pwm.rs index 693eb3456..484aae1d0 100644 --- a/embassy-stm32/src/timer/complementary_pwm.rs +++ b/embassy-stm32/src/timer/complementary_pwm.rs | |||
| @@ -27,12 +27,10 @@ impl<'d, T: AdvancedInstance4Channel, C: TimerChannel, #[cfg(afio)] A> if_afio!( | |||
| 27 | pub fn new(pin: Peri<'d, if_afio!(impl TimerComplementaryPin<T, C, A>)>, output_type: OutputType) -> Self { | 27 | pub fn new(pin: Peri<'d, if_afio!(impl TimerComplementaryPin<T, C, A>)>, output_type: OutputType) -> Self { |
| 28 | critical_section::with(|_| { | 28 | critical_section::with(|_| { |
| 29 | pin.set_low(); | 29 | pin.set_low(); |
| 30 | pin.set_as_af( | 30 | set_as_af!( |
| 31 | pin.af_num(), | 31 | pin, |
| 32 | crate::gpio::AfType::output(output_type, crate::gpio::Speed::VeryHigh), | 32 | crate::gpio::AfType::output(output_type, crate::gpio::Speed::VeryHigh) |
| 33 | ); | 33 | ); |
| 34 | #[cfg(afio)] | ||
| 35 | pin.afio_remap(); | ||
| 36 | }); | 34 | }); |
| 37 | ComplementaryPwmPin { | 35 | ComplementaryPwmPin { |
| 38 | pin: pin.into(), | 36 | pin: pin.into(), |
