diff options
| -rw-r--r-- | embassy-stm32/src/timer/mod.rs | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/embassy-stm32/src/timer/mod.rs b/embassy-stm32/src/timer/mod.rs index 1e0999ed3..9f37b8054 100644 --- a/embassy-stm32/src/timer/mod.rs +++ b/embassy-stm32/src/timer/mod.rs | |||
| @@ -173,7 +173,7 @@ pub(crate) mod sealed { | |||
| 173 | } | 173 | } |
| 174 | }); | 174 | }); |
| 175 | } | 175 | } |
| 176 | fn enable_outputs(&mut self, _enable: bool) {} | 176 | fn enable_outputs(&mut self, _enable: bool); |
| 177 | 177 | ||
| 178 | fn set_output_compare_mode(&mut self, channel: Channel, mode: OutputCompareMode) { | 178 | fn set_output_compare_mode(&mut self, channel: Channel, mode: OutputCompareMode) { |
| 179 | let r = Self::regs_gp16(); | 179 | let r = Self::regs_gp16(); |
| @@ -401,7 +401,9 @@ macro_rules! impl_32bit_timer { | |||
| 401 | #[allow(unused)] | 401 | #[allow(unused)] |
| 402 | macro_rules! impl_compare_capable_16bit { | 402 | macro_rules! impl_compare_capable_16bit { |
| 403 | ($inst:ident) => { | 403 | ($inst:ident) => { |
| 404 | impl sealed::CaptureCompare16bitInstance for crate::peripherals::$inst {} | 404 | impl sealed::CaptureCompare16bitInstance for crate::peripherals::$inst { |
| 405 | fn enable_outputs(&mut self, _enable: bool) {} | ||
| 406 | } | ||
| 405 | }; | 407 | }; |
| 406 | } | 408 | } |
| 407 | 409 | ||
| @@ -450,7 +452,13 @@ foreach_interrupt! { | |||
| 450 | impl CaptureCompare16bitInstance for crate::peripherals::$inst {} | 452 | impl CaptureCompare16bitInstance for crate::peripherals::$inst {} |
| 451 | impl ComplementaryCaptureCompare16bitInstance for crate::peripherals::$inst {} | 453 | impl ComplementaryCaptureCompare16bitInstance for crate::peripherals::$inst {} |
| 452 | impl AdvancedControlInstance for crate::peripherals::$inst {} | 454 | impl AdvancedControlInstance for crate::peripherals::$inst {} |
| 453 | impl sealed::CaptureCompare16bitInstance for crate::peripherals::$inst {} | 455 | impl sealed::CaptureCompare16bitInstance for crate::peripherals::$inst { |
| 456 | fn enable_outputs(&mut self, enable: bool) { | ||
| 457 | use crate::timer::sealed::AdvancedControlInstance; | ||
| 458 | let r = Self::regs_advanced(); | ||
| 459 | r.bdtr().modify(|w| w.set_moe(enable)); | ||
| 460 | } | ||
| 461 | } | ||
| 454 | impl sealed::ComplementaryCaptureCompare16bitInstance for crate::peripherals::$inst {} | 462 | impl sealed::ComplementaryCaptureCompare16bitInstance for crate::peripherals::$inst {} |
| 455 | impl sealed::GeneralPurpose16bitInstance for crate::peripherals::$inst { | 463 | impl sealed::GeneralPurpose16bitInstance for crate::peripherals::$inst { |
| 456 | fn regs_gp16() -> crate::pac::timer::TimGp16 { | 464 | fn regs_gp16() -> crate::pac::timer::TimGp16 { |
