diff options
| author | Dario Nieuwenhuis <[email protected]> | 2025-09-05 23:00:31 +0200 |
|---|---|---|
| committer | Dario Nieuwenhuis <[email protected]> | 2025-09-05 23:00:31 +0200 |
| commit | 7419b398bf7cc5c1ff164c504f4a4027cd6bcd3b (patch) | |
| tree | 9ea26e1059b70502d0e5929a72a9f50c8c43838b /examples/stm32f1/src/bin/pwm_input.rs | |
| parent | a6562c4f033432e40970aafe82f33c5138adf84e (diff) | |
stm32/afio: use type inference for timer remaps as well.
Diffstat (limited to 'examples/stm32f1/src/bin/pwm_input.rs')
| -rw-r--r-- | examples/stm32f1/src/bin/pwm_input.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/stm32f1/src/bin/pwm_input.rs b/examples/stm32f1/src/bin/pwm_input.rs index 63b899767..9ae747018 100644 --- a/examples/stm32f1/src/bin/pwm_input.rs +++ b/examples/stm32f1/src/bin/pwm_input.rs | |||
| @@ -3,7 +3,7 @@ | |||
| 3 | 3 | ||
| 4 | use defmt::*; | 4 | use defmt::*; |
| 5 | use embassy_executor::Spawner; | 5 | use embassy_executor::Spawner; |
| 6 | use embassy_stm32::gpio::{Level, Output, Pull, Speed}; | 6 | use embassy_stm32::gpio::{AfioRemap, Level, Output, Pull, Speed}; |
| 7 | use embassy_stm32::time::khz; | 7 | use embassy_stm32::time::khz; |
| 8 | use embassy_stm32::timer::pwm_input::PwmInput; | 8 | use embassy_stm32::timer::pwm_input::PwmInput; |
| 9 | use embassy_stm32::{bind_interrupts, peripherals, timer, Peri}; | 9 | use embassy_stm32::{bind_interrupts, peripherals, timer, Peri}; |
| @@ -38,7 +38,7 @@ async fn main(spawner: Spawner) { | |||
| 38 | 38 | ||
| 39 | spawner.spawn(unwrap!(blinky(p.PC13))); | 39 | spawner.spawn(unwrap!(blinky(p.PC13))); |
| 40 | 40 | ||
| 41 | let mut pwm_input = PwmInput::new_ch1(p.TIM2, p.PA0, Pull::None, khz(10)); | 41 | let mut pwm_input = PwmInput::new_ch1::<AfioRemap<0>>(p.TIM2, p.PA0, Pull::None, khz(10)); |
| 42 | pwm_input.enable(); | 42 | pwm_input.enable(); |
| 43 | 43 | ||
| 44 | loop { | 44 | loop { |
