diff options
| author | Ulf Lilleengen <[email protected]> | 2023-12-21 10:02:11 +0000 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-12-21 10:02:11 +0000 |
| commit | 530ead5fdeba97dd7d84798463436d1c75bbe96e (patch) | |
| tree | 40c027b0f69efe9a9edb9913c0c1122a9b608318 /embassy-stm32 | |
| parent | 8442e72589f47182f8ca1c979c668afc800e5d1e (diff) | |
| parent | 0acf7b09c3bc9176d00479d601356d8df2537a9b (diff) | |
Merge pull request #2339 from embassy-rs/make-static-remove
Replace make_static! macro usage with non-macro version
Diffstat (limited to 'embassy-stm32')
| -rw-r--r-- | embassy-stm32/src/low_power.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/embassy-stm32/src/low_power.rs b/embassy-stm32/src/low_power.rs index a41c40eba..4fab8dae4 100644 --- a/embassy-stm32/src/low_power.rs +++ b/embassy-stm32/src/low_power.rs | |||
| @@ -24,7 +24,7 @@ | |||
| 24 | //! use embassy_executor::Spawner; | 24 | //! use embassy_executor::Spawner; |
| 25 | //! use embassy_stm32::low_power::Executor; | 25 | //! use embassy_stm32::low_power::Executor; |
| 26 | //! use embassy_stm32::rtc::{Rtc, RtcConfig}; | 26 | //! use embassy_stm32::rtc::{Rtc, RtcConfig}; |
| 27 | //! use static_cell::make_static; | 27 | //! use static_cell::StaticCell; |
| 28 | //! | 28 | //! |
| 29 | //! #[cortex_m_rt::entry] | 29 | //! #[cortex_m_rt::entry] |
| 30 | //! fn main() -> ! { | 30 | //! fn main() -> ! { |
| @@ -41,7 +41,8 @@ | |||
| 41 | //! | 41 | //! |
| 42 | //! // give the RTC to the executor... | 42 | //! // give the RTC to the executor... |
| 43 | //! let mut rtc = Rtc::new(p.RTC, RtcConfig::default()); | 43 | //! let mut rtc = Rtc::new(p.RTC, RtcConfig::default()); |
| 44 | //! let rtc = make_static!(rtc); | 44 | //! static RTC: StaticCell<Rtc> = StaticCell::new(); |
| 45 | //! let rtc = RTC.init(rtc); | ||
| 45 | //! embassy_stm32::low_power::stop_with_rtc(rtc); | 46 | //! embassy_stm32::low_power::stop_with_rtc(rtc); |
| 46 | //! | 47 | //! |
| 47 | //! // your application here... | 48 | //! // your application here... |
