diff options
| author | Matous Hybl <[email protected]> | 2022-01-18 11:18:54 +0100 |
|---|---|---|
| committer | Matous Hybl <[email protected]> | 2022-01-18 11:18:54 +0100 |
| commit | 4988dfe98175f5d92d896edd2b9ee774a91b28d5 (patch) | |
| tree | 477636afacb1a086d63eca93b65b396d5c14969f /embassy-stm32/src/timer/mod.rs | |
| parent | ddf8c99a938f7d2c4bb6e3ea9476c487c5b1c047 (diff) | |
Make advanced timer trait not require general purpose timer trait as the timers are too different.
Diffstat (limited to 'embassy-stm32/src/timer/mod.rs')
| -rw-r--r-- | embassy-stm32/src/timer/mod.rs | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/embassy-stm32/src/timer/mod.rs b/embassy-stm32/src/timer/mod.rs index ed2cb2d97..e3389fbad 100644 --- a/embassy-stm32/src/timer/mod.rs +++ b/embassy-stm32/src/timer/mod.rs | |||
| @@ -39,7 +39,7 @@ pub(crate) mod sealed { | |||
| 39 | fn set_frequency<F: Into<Hertz>>(&mut self, frequency: F); | 39 | fn set_frequency<F: Into<Hertz>>(&mut self, frequency: F); |
| 40 | } | 40 | } |
| 41 | 41 | ||
| 42 | pub trait AdvancedControlInstance: GeneralPurpose16bitInstance { | 42 | pub trait AdvancedControlInstance: Basic16bitInstance { |
| 43 | fn regs_advanced(&self) -> crate::pac::timer::TimAdv; | 43 | fn regs_advanced(&self) -> crate::pac::timer::TimAdv; |
| 44 | } | 44 | } |
| 45 | } | 45 | } |
| @@ -205,14 +205,6 @@ crate::pac::interrupts! { | |||
| 205 | impl Basic16bitInstance for crate::peripherals::$inst { | 205 | impl Basic16bitInstance for crate::peripherals::$inst { |
| 206 | } | 206 | } |
| 207 | 207 | ||
| 208 | impl sealed::GeneralPurpose16bitInstance for crate::peripherals::$inst { | ||
| 209 | fn regs_gp16(&self) -> crate::pac::timer::TimGp16 { | ||
| 210 | crate::pac::timer::TimGp16(crate::pac::$inst.0) | ||
| 211 | } | ||
| 212 | } | ||
| 213 | |||
| 214 | impl GeneralPurpose16bitInstance for crate::peripherals::$inst { | ||
| 215 | } | ||
| 216 | impl sealed::AdvancedControlInstance for crate::peripherals::$inst { | 208 | impl sealed::AdvancedControlInstance for crate::peripherals::$inst { |
| 217 | fn regs_advanced(&self) -> crate::pac::timer::TimAdv { | 209 | fn regs_advanced(&self) -> crate::pac::timer::TimAdv { |
| 218 | crate::pac::$inst | 210 | crate::pac::$inst |
