diff options
| author | Dario Nieuwenhuis <[email protected]> | 2022-01-14 22:02:00 +0100 |
|---|---|---|
| committer | Dario Nieuwenhuis <[email protected]> | 2022-01-19 17:59:55 +0100 |
| commit | 58fc64722c65bbdc209ae0fd1700f03702bbcd08 (patch) | |
| tree | 77f9412b47259cd4cf4170b0a257b371398d4f2c /examples/stm32h7/src/bin/camera.rs | |
| parent | 52e156b429417bde59d0ea67d11256866f1dcec9 (diff) | |
stm32/gpio: expose all functionality as inherent methods.
Diffstat (limited to 'examples/stm32h7/src/bin/camera.rs')
| -rw-r--r-- | examples/stm32h7/src/bin/camera.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/examples/stm32h7/src/bin/camera.rs b/examples/stm32h7/src/bin/camera.rs index d94592071..9e8071bb3 100644 --- a/examples/stm32h7/src/bin/camera.rs +++ b/examples/stm32h7/src/bin/camera.rs | |||
| @@ -11,7 +11,6 @@ use embassy_stm32::interrupt; | |||
| 11 | use embassy_stm32::rcc::{Mco, Mco1Source, McoClock}; | 11 | use embassy_stm32::rcc::{Mco, Mco1Source, McoClock}; |
| 12 | use embassy_stm32::time::U32Ext; | 12 | use embassy_stm32::time::U32Ext; |
| 13 | use embassy_stm32::Peripherals; | 13 | use embassy_stm32::Peripherals; |
| 14 | use embedded_hal::digital::v2::OutputPin; | ||
| 15 | 14 | ||
| 16 | use defmt_rtt as _; // global logger | 15 | use defmt_rtt as _; // global logger |
| 17 | use panic_probe as _; | 16 | use panic_probe as _; |
| @@ -114,11 +113,11 @@ async fn main(_spawner: Spawner, p: Peripherals) { | |||
| 114 | defmt::info!("main loop running"); | 113 | defmt::info!("main loop running"); |
| 115 | loop { | 114 | loop { |
| 116 | defmt::info!("high"); | 115 | defmt::info!("high"); |
| 117 | defmt::unwrap!(led.set_high()); | 116 | led.set_high(); |
| 118 | Timer::after(Duration::from_millis(500)).await; | 117 | Timer::after(Duration::from_millis(500)).await; |
| 119 | 118 | ||
| 120 | defmt::info!("low"); | 119 | defmt::info!("low"); |
| 121 | defmt::unwrap!(led.set_low()); | 120 | led.set_low(); |
| 122 | Timer::after(Duration::from_millis(500)).await; | 121 | Timer::after(Duration::from_millis(500)).await; |
| 123 | } | 122 | } |
| 124 | } | 123 | } |
