diff options
Diffstat (limited to 'tests/stm32/src/bin/stop.rs')
| -rw-r--r-- | tests/stm32/src/bin/stop.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/stm32/src/bin/stop.rs b/tests/stm32/src/bin/stop.rs index b9810673a..000296d46 100644 --- a/tests/stm32/src/bin/stop.rs +++ b/tests/stm32/src/bin/stop.rs | |||
| @@ -2,7 +2,6 @@ | |||
| 2 | 2 | ||
| 3 | #![no_std] | 3 | #![no_std] |
| 4 | #![no_main] | 4 | #![no_main] |
| 5 | #![feature(type_alias_impl_trait)] | ||
| 6 | #[path = "../common.rs"] | 5 | #[path = "../common.rs"] |
| 7 | mod common; | 6 | mod common; |
| 8 | 7 | ||
| @@ -15,7 +14,7 @@ use embassy_stm32::rcc::LsConfig; | |||
| 15 | use embassy_stm32::rtc::{Rtc, RtcConfig}; | 14 | use embassy_stm32::rtc::{Rtc, RtcConfig}; |
| 16 | use embassy_stm32::Config; | 15 | use embassy_stm32::Config; |
| 17 | use embassy_time::Timer; | 16 | use embassy_time::Timer; |
| 18 | use static_cell::make_static; | 17 | use static_cell::StaticCell; |
| 19 | 18 | ||
| 20 | #[entry] | 19 | #[entry] |
| 21 | fn main() -> ! { | 20 | fn main() -> ! { |
| @@ -64,7 +63,8 @@ async fn async_main(spawner: Spawner) { | |||
| 64 | 63 | ||
| 65 | rtc.set_datetime(now.into()).expect("datetime not set"); | 64 | rtc.set_datetime(now.into()).expect("datetime not set"); |
| 66 | 65 | ||
| 67 | let rtc = make_static!(rtc); | 66 | static RTC: StaticCell<Rtc> = StaticCell::new(); |
| 67 | let rtc = RTC.init(rtc); | ||
| 68 | 68 | ||
| 69 | stop_with_rtc(rtc); | 69 | stop_with_rtc(rtc); |
| 70 | 70 | ||
