diff options
Diffstat (limited to 'examples/stm32h7/src/bin/camera.rs')
| -rw-r--r-- | examples/stm32h7/src/bin/camera.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/examples/stm32h7/src/bin/camera.rs b/examples/stm32h7/src/bin/camera.rs index 40ef16cfc..8195430b2 100644 --- a/examples/stm32h7/src/bin/camera.rs +++ b/examples/stm32h7/src/bin/camera.rs | |||
| @@ -9,7 +9,7 @@ use embassy_stm32::i2c::I2c; | |||
| 9 | use embassy_stm32::rcc::{Mco, Mco1Source, McoPrescaler}; | 9 | use embassy_stm32::rcc::{Mco, Mco1Source, McoPrescaler}; |
| 10 | use embassy_stm32::time::khz; | 10 | use embassy_stm32::time::khz; |
| 11 | use embassy_stm32::{bind_interrupts, i2c, peripherals, Config}; | 11 | use embassy_stm32::{bind_interrupts, i2c, peripherals, Config}; |
| 12 | use embassy_time::{Duration, Timer}; | 12 | use embassy_time::Timer; |
| 13 | use ov7725::*; | 13 | use ov7725::*; |
| 14 | use {defmt_rtt as _, panic_probe as _}; | 14 | use {defmt_rtt as _, panic_probe as _}; |
| 15 | 15 | ||
| @@ -86,11 +86,11 @@ async fn main(_spawner: Spawner) { | |||
| 86 | loop { | 86 | loop { |
| 87 | defmt::info!("high"); | 87 | defmt::info!("high"); |
| 88 | led.set_high(); | 88 | led.set_high(); |
| 89 | Timer::after(Duration::from_millis(500)).await; | 89 | Timer::after_millis(500).await; |
| 90 | 90 | ||
| 91 | defmt::info!("low"); | 91 | defmt::info!("low"); |
| 92 | led.set_low(); | 92 | led.set_low(); |
| 93 | Timer::after(Duration::from_millis(500)).await; | 93 | Timer::after_millis(500).await; |
| 94 | } | 94 | } |
| 95 | } | 95 | } |
| 96 | 96 | ||
| @@ -99,7 +99,7 @@ mod ov7725 { | |||
| 99 | 99 | ||
| 100 | use defmt::Format; | 100 | use defmt::Format; |
| 101 | use embassy_stm32::rcc::{Mco, McoInstance}; | 101 | use embassy_stm32::rcc::{Mco, McoInstance}; |
| 102 | use embassy_time::{Duration, Timer}; | 102 | use embassy_time::Timer; |
| 103 | use embedded_hal_async::i2c::I2c; | 103 | use embedded_hal_async::i2c::I2c; |
| 104 | 104 | ||
| 105 | #[repr(u8)] | 105 | #[repr(u8)] |
| @@ -210,9 +210,9 @@ mod ov7725 { | |||
| 210 | } | 210 | } |
| 211 | 211 | ||
| 212 | pub async fn init(&mut self) -> Result<(), Error<Bus::Error>> { | 212 | pub async fn init(&mut self) -> Result<(), Error<Bus::Error>> { |
| 213 | Timer::after(Duration::from_millis(500)).await; | 213 | Timer::after_millis(500).await; |
| 214 | self.reset_regs().await?; | 214 | self.reset_regs().await?; |
| 215 | Timer::after(Duration::from_millis(500)).await; | 215 | Timer::after_millis(500).await; |
| 216 | self.set_pixformat().await?; | 216 | self.set_pixformat().await?; |
| 217 | self.set_resolution().await?; | 217 | self.set_resolution().await?; |
| 218 | Ok(()) | 218 | Ok(()) |
