diff options
| author | Matteo Meluzzi <[email protected]> | 2025-10-02 10:53:31 +0200 |
|---|---|---|
| committer | Matteo Meluzzi <[email protected]> | 2025-10-02 10:53:31 +0200 |
| commit | 828a8df18d04877df1f55f04354980b28ff2f2f8 (patch) | |
| tree | c4fa405f5eba7a14b6d435d6cc746c9e0dc52632 /tests/stm32/src | |
| parent | 176649e71ad442ca9856af6c11989b0b2f228c4b (diff) | |
| parent | 194a721d0eab929a2af0a2a4e45ca8e70e0d3f0a (diff) | |
Merge branch 'main' into 17-add-support-for-boot-protocol
Diffstat (limited to 'tests/stm32/src')
| -rw-r--r-- | tests/stm32/src/bin/afio.rs | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/tests/stm32/src/bin/afio.rs b/tests/stm32/src/bin/afio.rs index cc44dc59c..81d50874b 100644 --- a/tests/stm32/src/bin/afio.rs +++ b/tests/stm32/src/bin/afio.rs | |||
| @@ -12,8 +12,9 @@ use embassy_stm32::time::khz; | |||
| 12 | use embassy_stm32::timer::complementary_pwm::{ComplementaryPwm, ComplementaryPwmPin}; | 12 | use embassy_stm32::timer::complementary_pwm::{ComplementaryPwm, ComplementaryPwmPin}; |
| 13 | use embassy_stm32::timer::input_capture::{CapturePin, InputCapture}; | 13 | use embassy_stm32::timer::input_capture::{CapturePin, InputCapture}; |
| 14 | use embassy_stm32::timer::pwm_input::PwmInput; | 14 | use embassy_stm32::timer::pwm_input::PwmInput; |
| 15 | use embassy_stm32::timer::qei::{Qei, QeiPin}; | 15 | use embassy_stm32::timer::qei::Qei; |
| 16 | use embassy_stm32::timer::simple_pwm::{PwmPin, SimplePwm}; | 16 | use embassy_stm32::timer::simple_pwm::{PwmPin, SimplePwm}; |
| 17 | use embassy_stm32::timer::{Ch1, Ch2}; | ||
| 17 | use embassy_stm32::usart::{Uart, UartRx, UartTx}; | 18 | use embassy_stm32::usart::{Uart, UartRx, UartTx}; |
| 18 | use embassy_stm32::{bind_interrupts, Peripherals}; | 19 | use embassy_stm32::{bind_interrupts, Peripherals}; |
| 19 | 20 | ||
| @@ -258,10 +259,11 @@ async fn main(_spawner: Spawner) { | |||
| 258 | { | 259 | { |
| 259 | // partial remap | 260 | // partial remap |
| 260 | reset_afio_registers(); | 261 | reset_afio_registers(); |
| 261 | Qei::new::<AfioRemap<1>>( | 262 | Qei::new::<Ch1, Ch2, AfioRemap<1>>( |
| 262 | p.TIM1.reborrow(), | 263 | p.TIM1.reborrow(), |
| 263 | QeiPin::new(p.PA8.reborrow()), | 264 | p.PA8.reborrow(), |
| 264 | QeiPin::new(p.PA9.reborrow()), | 265 | p.PA9.reborrow(), |
| 266 | Default::default(), | ||
| 265 | ); | 267 | ); |
| 266 | defmt::assert_eq!(AFIO.mapr().read().tim1_remap(), 1); | 268 | defmt::assert_eq!(AFIO.mapr().read().tim1_remap(), 1); |
| 267 | } | 269 | } |
