diff options
Diffstat (limited to 'examples/stm32f1/src')
| -rw-r--r-- | examples/stm32f1/src/bin/input_capture.rs | 4 | ||||
| -rw-r--r-- | examples/stm32f1/src/bin/pwm_input.rs | 4 | ||||
| -rw-r--r-- | examples/stm32f1/src/bin/usb_serial.rs | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/examples/stm32f1/src/bin/input_capture.rs b/examples/stm32f1/src/bin/input_capture.rs index 5e2dab9e6..6fe8e0b50 100644 --- a/examples/stm32f1/src/bin/input_capture.rs +++ b/examples/stm32f1/src/bin/input_capture.rs | |||
| @@ -7,14 +7,14 @@ use embassy_stm32::gpio::{Level, Output, Pull, Speed}; | |||
| 7 | use embassy_stm32::time::khz; | 7 | use embassy_stm32::time::khz; |
| 8 | use embassy_stm32::timer::input_capture::{CapturePin, InputCapture}; | 8 | use embassy_stm32::timer::input_capture::{CapturePin, InputCapture}; |
| 9 | use embassy_stm32::timer::{self, Channel}; | 9 | use embassy_stm32::timer::{self, Channel}; |
| 10 | use embassy_stm32::{bind_interrupts, peripherals}; | 10 | use embassy_stm32::{bind_interrupts, peripherals, 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 _}; |
| 13 | 13 | ||
| 14 | /// Connect PA2 and PC13 with a 1k Ohm resistor | 14 | /// Connect PA2 and PC13 with a 1k Ohm resistor |
| 15 | 15 | ||
| 16 | #[embassy_executor::task] | 16 | #[embassy_executor::task] |
| 17 | async fn blinky(led: peripherals::PC13) { | 17 | async fn blinky(led: Peri<'static, peripherals::PC13>) { |
| 18 | let mut led = Output::new(led, Level::High, Speed::Low); | 18 | let mut led = Output::new(led, Level::High, Speed::Low); |
| 19 | 19 | ||
| 20 | loop { | 20 | loop { |
diff --git a/examples/stm32f1/src/bin/pwm_input.rs b/examples/stm32f1/src/bin/pwm_input.rs index f74853d4e..afbef3edb 100644 --- a/examples/stm32f1/src/bin/pwm_input.rs +++ b/examples/stm32f1/src/bin/pwm_input.rs | |||
| @@ -6,14 +6,14 @@ use embassy_executor::Spawner; | |||
| 6 | use embassy_stm32::gpio::{Level, Output, Pull, Speed}; | 6 | use embassy_stm32::gpio::{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}; | 9 | use embassy_stm32::{bind_interrupts, peripherals, timer, Peri}; |
| 10 | use embassy_time::Timer; | 10 | use embassy_time::Timer; |
| 11 | use {defmt_rtt as _, panic_probe as _}; | 11 | use {defmt_rtt as _, panic_probe as _}; |
| 12 | 12 | ||
| 13 | /// Connect PA0 and PC13 with a 1k Ohm resistor | 13 | /// Connect PA0 and PC13 with a 1k Ohm resistor |
| 14 | 14 | ||
| 15 | #[embassy_executor::task] | 15 | #[embassy_executor::task] |
| 16 | async fn blinky(led: peripherals::PC13) { | 16 | async fn blinky(led: Peri<'static, peripherals::PC13>) { |
| 17 | let mut led = Output::new(led, Level::High, Speed::Low); | 17 | let mut led = Output::new(led, Level::High, Speed::Low); |
| 18 | 18 | ||
| 19 | loop { | 19 | loop { |
diff --git a/examples/stm32f1/src/bin/usb_serial.rs b/examples/stm32f1/src/bin/usb_serial.rs index ee99acf41..77ec307b9 100644 --- a/examples/stm32f1/src/bin/usb_serial.rs +++ b/examples/stm32f1/src/bin/usb_serial.rs | |||
| @@ -47,7 +47,7 @@ async fn main(_spawner: Spawner) { | |||
| 47 | // Pull the D+ pin down to send a RESET condition to the USB bus. | 47 | // Pull the D+ pin down to send a RESET condition to the USB bus. |
| 48 | // This forced reset is needed only for development, without it host | 48 | // This forced reset is needed only for development, without it host |
| 49 | // will not reset your device when you upload new firmware. | 49 | // will not reset your device when you upload new firmware. |
| 50 | let _dp = Output::new(&mut p.PA12, Level::Low, Speed::Low); | 50 | let _dp = Output::new(p.PA12.reborrow(), Level::Low, Speed::Low); |
| 51 | Timer::after_millis(10).await; | 51 | Timer::after_millis(10).await; |
| 52 | } | 52 | } |
| 53 | 53 | ||
