aboutsummaryrefslogtreecommitdiff
path: root/examples/stm32h7/src/bin/rtc.rs
diff options
context:
space:
mode:
Diffstat (limited to 'examples/stm32h7/src/bin/rtc.rs')
-rw-r--r--examples/stm32h7/src/bin/rtc.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/stm32h7/src/bin/rtc.rs b/examples/stm32h7/src/bin/rtc.rs
index f2a19af81..78cea9c89 100644
--- a/examples/stm32h7/src/bin/rtc.rs
+++ b/examples/stm32h7/src/bin/rtc.rs
@@ -8,7 +8,7 @@ use embassy_executor::Spawner;
8use embassy_stm32::rcc::LsConfig; 8use embassy_stm32::rcc::LsConfig;
9use embassy_stm32::rtc::{Rtc, RtcConfig}; 9use embassy_stm32::rtc::{Rtc, RtcConfig};
10use embassy_stm32::Config; 10use embassy_stm32::Config;
11use embassy_time::{Duration, Timer}; 11use embassy_time::Timer;
12use {defmt_rtt as _, panic_probe as _}; 12use {defmt_rtt as _, panic_probe as _};
13 13
14#[embassy_executor::main] 14#[embassy_executor::main]
@@ -30,7 +30,7 @@ async fn main(_spawner: Spawner) {
30 rtc.set_datetime(now.into()).expect("datetime not set"); 30 rtc.set_datetime(now.into()).expect("datetime not set");
31 31
32 // In reality the delay would be much longer 32 // In reality the delay would be much longer
33 Timer::after(Duration::from_millis(20000)).await; 33 Timer::after_millis(20000).await;
34 34
35 let then: NaiveDateTime = rtc.now().unwrap().into(); 35 let then: NaiveDateTime = rtc.now().unwrap().into();
36 info!("Got RTC! {:?}", then.timestamp()); 36 info!("Got RTC! {:?}", then.timestamp());