aboutsummaryrefslogtreecommitdiff
path: root/examples/stm32f1/src/bin/input_capture.rs
diff options
context:
space:
mode:
Diffstat (limited to 'examples/stm32f1/src/bin/input_capture.rs')
-rw-r--r--examples/stm32f1/src/bin/input_capture.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/examples/stm32f1/src/bin/input_capture.rs b/examples/stm32f1/src/bin/input_capture.rs
index d747a43c2..b5b26938d 100644
--- a/examples/stm32f1/src/bin/input_capture.rs
+++ b/examples/stm32f1/src/bin/input_capture.rs
@@ -3,7 +3,7 @@
3 3
4use defmt::*; 4use defmt::*;
5use embassy_executor::Spawner; 5use embassy_executor::Spawner;
6use embassy_stm32::gpio::{Level, Output, Pull, Speed}; 6use embassy_stm32::gpio::{AfioRemap, Level, Output, Pull, Speed};
7use embassy_stm32::time::khz; 7use embassy_stm32::time::khz;
8use embassy_stm32::timer::input_capture::{CapturePin, InputCapture}; 8use embassy_stm32::timer::input_capture::{CapturePin, InputCapture};
9use embassy_stm32::timer::{self, Channel}; 9use embassy_stm32::timer::{self, Channel};
@@ -40,7 +40,8 @@ async fn main(spawner: Spawner) {
40 spawner.spawn(unwrap!(blinky(p.PC13))); 40 spawner.spawn(unwrap!(blinky(p.PC13)));
41 41
42 let ch3 = CapturePin::new(p.PA2, Pull::None); 42 let ch3 = CapturePin::new(p.PA2, Pull::None);
43 let mut ic = InputCapture::new(p.TIM2, None, None, Some(ch3), None, Irqs, khz(1000), Default::default()); 43 let mut ic =
44 InputCapture::new::<AfioRemap<0>>(p.TIM2, None, None, Some(ch3), None, Irqs, khz(1000), Default::default());
44 45
45 loop { 46 loop {
46 info!("wait for rising edge"); 47 info!("wait for rising edge");