diff options
| author | xoviat <[email protected]> | 2025-11-03 19:31:34 +0000 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-11-03 19:31:34 +0000 |
| commit | a967d77a0f0eedcc65778528cceee07edbba2813 (patch) | |
| tree | d318e20498e02245a4b4a30b9a15c3c7717a6443 /examples | |
| parent | 500181ac28039858d032d10932462c1e432c0452 (diff) | |
| parent | 5043f1483e12ce5dbe7a394d5a87c657ff203625 (diff) | |
Merge pull request #4830 from xoviat/low-power
low_power: update api to allow reconfig
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/stm32h5/src/bin/stop.rs | 3 | ||||
| -rw-r--r-- | examples/stm32l5/src/bin/stop.rs | 3 |
2 files changed, 0 insertions, 6 deletions
diff --git a/examples/stm32h5/src/bin/stop.rs b/examples/stm32h5/src/bin/stop.rs index 3c4f49f64..2026d8f99 100644 --- a/examples/stm32h5/src/bin/stop.rs +++ b/examples/stm32h5/src/bin/stop.rs | |||
| @@ -12,7 +12,6 @@ use embassy_stm32::rcc::{HSIPrescaler, LsConfig}; | |||
| 12 | use embassy_stm32::rtc::{Rtc, RtcConfig}; | 12 | use embassy_stm32::rtc::{Rtc, RtcConfig}; |
| 13 | use embassy_stm32::{Config, Peri}; | 13 | use embassy_stm32::{Config, Peri}; |
| 14 | use embassy_time::Timer; | 14 | use embassy_time::Timer; |
| 15 | use static_cell::StaticCell; | ||
| 16 | use {defmt_rtt as _, panic_probe as _}; | 15 | use {defmt_rtt as _, panic_probe as _}; |
| 17 | 16 | ||
| 18 | #[cortex_m_rt::entry] | 17 | #[cortex_m_rt::entry] |
| @@ -39,8 +38,6 @@ async fn async_main(spawner: Spawner) { | |||
| 39 | 38 | ||
| 40 | // give the RTC to the executor... | 39 | // give the RTC to the executor... |
| 41 | let rtc = Rtc::new(p.RTC, RtcConfig::default()); | 40 | let rtc = Rtc::new(p.RTC, RtcConfig::default()); |
| 42 | static RTC: StaticCell<Rtc> = StaticCell::new(); | ||
| 43 | let rtc = RTC.init(rtc); | ||
| 44 | embassy_stm32::low_power::stop_with_rtc(rtc); | 41 | embassy_stm32::low_power::stop_with_rtc(rtc); |
| 45 | 42 | ||
| 46 | spawner.spawn(unwrap!(blinky(p.PB4.into()))); | 43 | spawner.spawn(unwrap!(blinky(p.PB4.into()))); |
diff --git a/examples/stm32l5/src/bin/stop.rs b/examples/stm32l5/src/bin/stop.rs index c34053190..7662dbfa8 100644 --- a/examples/stm32l5/src/bin/stop.rs +++ b/examples/stm32l5/src/bin/stop.rs | |||
| @@ -9,7 +9,6 @@ use embassy_stm32::rcc::LsConfig; | |||
| 9 | use embassy_stm32::rtc::{Rtc, RtcConfig}; | 9 | use embassy_stm32::rtc::{Rtc, RtcConfig}; |
| 10 | use embassy_stm32::{Config, Peri}; | 10 | use embassy_stm32::{Config, Peri}; |
| 11 | use embassy_time::Timer; | 11 | use embassy_time::Timer; |
| 12 | use static_cell::StaticCell; | ||
| 13 | use {defmt_rtt as _, panic_probe as _}; | 12 | use {defmt_rtt as _, panic_probe as _}; |
| 14 | 13 | ||
| 15 | #[cortex_m_rt::entry] | 14 | #[cortex_m_rt::entry] |
| @@ -30,8 +29,6 @@ async fn async_main(spawner: Spawner) { | |||
| 30 | 29 | ||
| 31 | // give the RTC to the executor... | 30 | // give the RTC to the executor... |
| 32 | let rtc = Rtc::new(p.RTC, RtcConfig::default()); | 31 | let rtc = Rtc::new(p.RTC, RtcConfig::default()); |
| 33 | static RTC: StaticCell<Rtc> = StaticCell::new(); | ||
| 34 | let rtc = RTC.init(rtc); | ||
| 35 | embassy_stm32::low_power::stop_with_rtc(rtc); | 32 | embassy_stm32::low_power::stop_with_rtc(rtc); |
| 36 | 33 | ||
| 37 | spawner.spawn(unwrap!(blinky(p.PC7.into()))); | 34 | spawner.spawn(unwrap!(blinky(p.PC7.into()))); |
