diff options
| author | Dario Nieuwenhuis <[email protected]> | 2025-06-27 00:03:47 +0000 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-06-27 00:03:47 +0000 |
| commit | 77fc1bac2afa8a64679e86d3e7b1738305831ecc (patch) | |
| tree | d8077e03cb0f00bdc622916293142e304013ac6e /examples/stm32h7/src/bin/low_level_timer_api.rs | |
| parent | 06b160ac83b70b292ea92446a1eb69096b1c86ea (diff) | |
| parent | 2727fb266fa7d87b4fa23f7278e5255ca260fd14 (diff) | |
Merge pull request #4348 from melvdlin/stm32-ch-generic-timer-traits
[stm32]: Replace per-channel traits in `timer` module with generic versions
Diffstat (limited to 'examples/stm32h7/src/bin/low_level_timer_api.rs')
| -rw-r--r-- | examples/stm32h7/src/bin/low_level_timer_api.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/examples/stm32h7/src/bin/low_level_timer_api.rs b/examples/stm32h7/src/bin/low_level_timer_api.rs index 8de31ea5b..12abb8693 100644 --- a/examples/stm32h7/src/bin/low_level_timer_api.rs +++ b/examples/stm32h7/src/bin/low_level_timer_api.rs | |||
| @@ -6,7 +6,7 @@ use embassy_executor::Spawner; | |||
| 6 | use embassy_stm32::gpio::{AfType, Flex, OutputType, Speed}; | 6 | use embassy_stm32::gpio::{AfType, Flex, OutputType, Speed}; |
| 7 | use embassy_stm32::time::{khz, Hertz}; | 7 | use embassy_stm32::time::{khz, Hertz}; |
| 8 | use embassy_stm32::timer::low_level::{OutputCompareMode, Timer as LLTimer}; | 8 | use embassy_stm32::timer::low_level::{OutputCompareMode, Timer as LLTimer}; |
| 9 | use embassy_stm32::timer::{Channel, Channel1Pin, Channel2Pin, Channel3Pin, Channel4Pin, GeneralInstance32bit4Channel}; | 9 | use embassy_stm32::timer::{Ch1, Ch2, Ch3, Ch4, Channel, GeneralInstance32bit4Channel, TimerPin}; |
| 10 | use embassy_stm32::{Config, Peri}; | 10 | use embassy_stm32::{Config, Peri}; |
| 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 _}; |
| @@ -67,10 +67,10 @@ pub struct SimplePwm32<'d, T: GeneralInstance32bit4Channel> { | |||
| 67 | impl<'d, T: GeneralInstance32bit4Channel> SimplePwm32<'d, T> { | 67 | impl<'d, T: GeneralInstance32bit4Channel> SimplePwm32<'d, T> { |
| 68 | pub fn new( | 68 | pub fn new( |
| 69 | tim: Peri<'d, T>, | 69 | tim: Peri<'d, T>, |
| 70 | ch1: Peri<'d, impl Channel1Pin<T>>, | 70 | ch1: Peri<'d, impl TimerPin<T, Ch1>>, |
| 71 | ch2: Peri<'d, impl Channel2Pin<T>>, | 71 | ch2: Peri<'d, impl TimerPin<T, Ch2>>, |
| 72 | ch3: Peri<'d, impl Channel3Pin<T>>, | 72 | ch3: Peri<'d, impl TimerPin<T, Ch3>>, |
| 73 | ch4: Peri<'d, impl Channel4Pin<T>>, | 73 | ch4: Peri<'d, impl TimerPin<T, Ch4>>, |
| 74 | freq: Hertz, | 74 | freq: Hertz, |
| 75 | ) -> Self { | 75 | ) -> Self { |
| 76 | let af1 = ch1.af_num(); | 76 | let af1 = ch1.af_num(); |
