aboutsummaryrefslogtreecommitdiff
path: root/examples/stm32f4/src/bin/rtc.rs
diff options
context:
space:
mode:
authorxoviat <[email protected]>2025-11-04 16:35:07 -0600
committerxoviat <[email protected]>2025-11-04 16:35:07 -0600
commitb9559c7713bc7f773cdef0df14f1158840d06d06 (patch)
treed5e126d6c2d891bb47375925353e155177954699 /examples/stm32f4/src/bin/rtc.rs
parentd23c027dd1a1c5f7cdf818750dddf6a250658423 (diff)
rtc: use consistent api between stop and non-stop
Diffstat (limited to 'examples/stm32f4/src/bin/rtc.rs')
-rw-r--r--examples/stm32f4/src/bin/rtc.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/stm32f4/src/bin/rtc.rs b/examples/stm32f4/src/bin/rtc.rs
index feb27f6d9..5ff705ca2 100644
--- a/examples/stm32f4/src/bin/rtc.rs
+++ b/examples/stm32f4/src/bin/rtc.rs
@@ -21,12 +21,12 @@ async fn main(_spawner: Spawner) {
21 .and_hms_opt(10, 30, 15) 21 .and_hms_opt(10, 30, 15)
22 .unwrap(); 22 .unwrap();
23 23
24 let mut rtc = Rtc::new(p.RTC, RtcConfig::default()); 24 let (mut rtc, time_provider) = Rtc::new(p.RTC, RtcConfig::default());
25 25
26 rtc.set_datetime(now.into()).expect("datetime not set"); 26 rtc.set_datetime(now.into()).expect("datetime not set");
27 27
28 loop { 28 loop {
29 let now: NaiveDateTime = rtc.now().unwrap().into(); 29 let now: NaiveDateTime = time_provider.now().unwrap().into();
30 30
31 info!("{}", now.and_utc().timestamp()); 31 info!("{}", now.and_utc().timestamp());
32 32