diff options
| author | Dario Nieuwenhuis <[email protected]> | 2024-03-06 18:51:25 +0000 |
|---|---|---|
| committer | GitHub <[email protected]> | 2024-03-06 18:51:25 +0000 |
| commit | aaea056ed16b2fb064a8a4c0985d77336363226e (patch) | |
| tree | d4a547815bc2f2613edb34d2378119b85a9eca33 /examples | |
| parent | 4603b0236a76d6371f08c22d51276237c7ce79bf (diff) | |
| parent | f3efa4ee3ba562fd51cd49b70a6c5305a1aaac6a (diff) | |
Merge pull request #2664 from eZioPan/build-target-fix
ci stm32: build target fix
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/stm32f4/src/bin/rtc.rs | 2 | ||||
| -rw-r--r-- | examples/stm32h7/src/bin/rtc.rs | 4 | ||||
| -rw-r--r-- | examples/stm32l4/src/bin/rtc.rs | 4 | ||||
| -rw-r--r-- | examples/stm32wl/src/bin/rtc.rs | 4 |
4 files changed, 7 insertions, 7 deletions
diff --git a/examples/stm32f4/src/bin/rtc.rs b/examples/stm32f4/src/bin/rtc.rs index abab07b6b..82d8a37ba 100644 --- a/examples/stm32f4/src/bin/rtc.rs +++ b/examples/stm32f4/src/bin/rtc.rs | |||
| @@ -28,7 +28,7 @@ async fn main(_spawner: Spawner) { | |||
| 28 | loop { | 28 | loop { |
| 29 | let now: NaiveDateTime = rtc.now().unwrap().into(); | 29 | let now: NaiveDateTime = rtc.now().unwrap().into(); |
| 30 | 30 | ||
| 31 | info!("{}", now.timestamp()); | 31 | info!("{}", now.and_utc().timestamp()); |
| 32 | 32 | ||
| 33 | Timer::after_millis(1000).await; | 33 | Timer::after_millis(1000).await; |
| 34 | } | 34 | } |
diff --git a/examples/stm32h7/src/bin/rtc.rs b/examples/stm32h7/src/bin/rtc.rs index c6b9cf57e..0adb48877 100644 --- a/examples/stm32h7/src/bin/rtc.rs +++ b/examples/stm32h7/src/bin/rtc.rs | |||
| @@ -24,7 +24,7 @@ async fn main(_spawner: Spawner) { | |||
| 24 | .unwrap(); | 24 | .unwrap(); |
| 25 | 25 | ||
| 26 | let mut rtc = Rtc::new(p.RTC, RtcConfig::default()); | 26 | let mut rtc = Rtc::new(p.RTC, RtcConfig::default()); |
| 27 | info!("Got RTC! {:?}", now.timestamp()); | 27 | info!("Got RTC! {:?}", now.and_utc().timestamp()); |
| 28 | 28 | ||
| 29 | rtc.set_datetime(now.into()).expect("datetime not set"); | 29 | rtc.set_datetime(now.into()).expect("datetime not set"); |
| 30 | 30 | ||
| @@ -32,5 +32,5 @@ async fn main(_spawner: Spawner) { | |||
| 32 | Timer::after_millis(20000).await; | 32 | Timer::after_millis(20000).await; |
| 33 | 33 | ||
| 34 | let then: NaiveDateTime = rtc.now().unwrap().into(); | 34 | let then: NaiveDateTime = rtc.now().unwrap().into(); |
| 35 | info!("Got RTC! {:?}", then.timestamp()); | 35 | info!("Got RTC! {:?}", then.and_utc().timestamp()); |
| 36 | } | 36 | } |
diff --git a/examples/stm32l4/src/bin/rtc.rs b/examples/stm32l4/src/bin/rtc.rs index a8a375ab4..f554f0f78 100644 --- a/examples/stm32l4/src/bin/rtc.rs +++ b/examples/stm32l4/src/bin/rtc.rs | |||
| @@ -40,7 +40,7 @@ async fn main(_spawner: Spawner) { | |||
| 40 | .unwrap(); | 40 | .unwrap(); |
| 41 | 41 | ||
| 42 | let mut rtc = Rtc::new(p.RTC, RtcConfig::default()); | 42 | let mut rtc = Rtc::new(p.RTC, RtcConfig::default()); |
| 43 | info!("Got RTC! {:?}", now.timestamp()); | 43 | info!("Got RTC! {:?}", now.and_utc().timestamp()); |
| 44 | 44 | ||
| 45 | rtc.set_datetime(now.into()).expect("datetime not set"); | 45 | rtc.set_datetime(now.into()).expect("datetime not set"); |
| 46 | 46 | ||
| @@ -48,5 +48,5 @@ async fn main(_spawner: Spawner) { | |||
| 48 | Timer::after_millis(20000).await; | 48 | Timer::after_millis(20000).await; |
| 49 | 49 | ||
| 50 | let then: NaiveDateTime = rtc.now().unwrap().into(); | 50 | let then: NaiveDateTime = rtc.now().unwrap().into(); |
| 51 | info!("Got RTC! {:?}", then.timestamp()); | 51 | info!("Got RTC! {:?}", then.and_utc().timestamp()); |
| 52 | } | 52 | } |
diff --git a/examples/stm32wl/src/bin/rtc.rs b/examples/stm32wl/src/bin/rtc.rs index 0c26426ef..cf7d6d220 100644 --- a/examples/stm32wl/src/bin/rtc.rs +++ b/examples/stm32wl/src/bin/rtc.rs | |||
| @@ -40,7 +40,7 @@ async fn main(_spawner: Spawner) { | |||
| 40 | .unwrap(); | 40 | .unwrap(); |
| 41 | 41 | ||
| 42 | let mut rtc = Rtc::new(p.RTC, RtcConfig::default()); | 42 | let mut rtc = Rtc::new(p.RTC, RtcConfig::default()); |
| 43 | info!("Got RTC! {:?}", now.timestamp()); | 43 | info!("Got RTC! {:?}", now.and_utc().timestamp()); |
| 44 | 44 | ||
| 45 | rtc.set_datetime(now.into()).expect("datetime not set"); | 45 | rtc.set_datetime(now.into()).expect("datetime not set"); |
| 46 | 46 | ||
| @@ -48,5 +48,5 @@ async fn main(_spawner: Spawner) { | |||
| 48 | Timer::after_millis(20000).await; | 48 | Timer::after_millis(20000).await; |
| 49 | 49 | ||
| 50 | let then: NaiveDateTime = rtc.now().unwrap().into(); | 50 | let then: NaiveDateTime = rtc.now().unwrap().into(); |
| 51 | info!("Got RTC! {:?}", then.timestamp()); | 51 | info!("Got RTC! {:?}", then.and_utc().timestamp()); |
| 52 | } | 52 | } |
