aboutsummaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorxoviat <[email protected]>2023-08-08 19:58:03 -0500
committerxoviat <[email protected]>2023-08-08 19:58:03 -0500
commit6a73ab1afa76944c413cb91932881c35ddfbcbcd (patch)
tree28f2d62dc4d9ab554da1da414db1820e4cd53b90 /examples
parent6fc5c608f8a99e0275916b7c86116ac6eb14c97a (diff)
stm32/l4: set rtc clock source in rcc
Diffstat (limited to 'examples')
-rw-r--r--examples/stm32l4/src/bin/rtc.rs5
1 files changed, 1 insertions, 4 deletions
diff --git a/examples/stm32l4/src/bin/rtc.rs b/examples/stm32l4/src/bin/rtc.rs
index fe2aabb44..294ea456c 100644
--- a/examples/stm32l4/src/bin/rtc.rs
+++ b/examples/stm32l4/src/bin/rtc.rs
@@ -33,10 +33,7 @@ async fn main(_spawner: Spawner) {
33 .and_hms_opt(10, 30, 15) 33 .and_hms_opt(10, 30, 15)
34 .unwrap(); 34 .unwrap();
35 35
36 let mut rtc = Rtc::new( 36 let mut rtc = Rtc::new(p.RTC, RtcConfig::default());
37 p.RTC,
38 RtcConfig::default().clock_source(embassy_stm32::rtc::RtcClockSource::LSE),
39 );
40 info!("Got RTC! {:?}", now.timestamp()); 37 info!("Got RTC! {:?}", now.timestamp());
41 38
42 rtc.set_datetime(now.into()).expect("datetime not set"); 39 rtc.set_datetime(now.into()).expect("datetime not set");