diff options
| author | melvdl <[email protected]> | 2025-06-27 01:08:45 +0200 |
|---|---|---|
| committer | melvdl <[email protected]> | 2025-06-27 01:08:45 +0200 |
| commit | 41327c1325367177548dabc644636617274de7f4 (patch) | |
| tree | b389d87f80f0843db946635837691982e41740a0 /examples/stm32h7/src/bin/low_level_timer_api.rs | |
| parent | 6f88c2c73caa63a6e534130f4a064cb95d3e9d7d (diff) | |
stm32: adapt examples to timer API changes
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(); |
