diff options
| author | Brian Schwind <[email protected]> | 2025-09-29 22:42:59 +0900 |
|---|---|---|
| committer | Brian Schwind <[email protected]> | 2025-09-29 22:44:59 +0900 |
| commit | 2cd2894d33e69c8481c360026015397f0742876a (patch) | |
| tree | e3ce96f9c2bbeed1124dbc496f216e60e24b8d2c /tests/stm32 | |
| parent | 61bc254879b328a944a36a81080abbadc6431ccf (diff) | |
Fix an afio test
Diffstat (limited to 'tests/stm32')
| -rw-r--r-- | tests/stm32/src/bin/afio.rs | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/tests/stm32/src/bin/afio.rs b/tests/stm32/src/bin/afio.rs index feddbc802..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,7 +259,12 @@ 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>>(p.TIM1.reborrow(), p.PA8.reborrow(), p.PA9.reborrow()); | 262 | Qei::new::<Ch1, Ch2, AfioRemap<1>>( |
| 263 | p.TIM1.reborrow(), | ||
| 264 | p.PA8.reborrow(), | ||
| 265 | p.PA9.reborrow(), | ||
| 266 | Default::default(), | ||
| 267 | ); | ||
| 262 | defmt::assert_eq!(AFIO.mapr().read().tim1_remap(), 1); | 268 | defmt::assert_eq!(AFIO.mapr().read().tim1_remap(), 1); |
| 263 | } | 269 | } |
| 264 | 270 | ||
