diff options
| author | xoviat <[email protected]> | 2025-11-16 07:50:49 -0600 |
|---|---|---|
| committer | xoviat <[email protected]> | 2025-11-16 07:50:49 -0600 |
| commit | 29d4ade2866e6c8d2114b393853354ded1e61db7 (patch) | |
| tree | 13d38bc6cce8f71ceccbde7877ffe66a8643e30d /embassy-stm32/src/rtc/mod.rs | |
| parent | a51533c0b4edd551a1b9587b9272026b0b256d54 (diff) | |
low_power: misc cleanups and allow main macro
Diffstat (limited to 'embassy-stm32/src/rtc/mod.rs')
| -rw-r--r-- | embassy-stm32/src/rtc/mod.rs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/embassy-stm32/src/rtc/mod.rs b/embassy-stm32/src/rtc/mod.rs index 116b3c7ed..e88bd7ab2 100644 --- a/embassy-stm32/src/rtc/mod.rs +++ b/embassy-stm32/src/rtc/mod.rs | |||
| @@ -379,13 +379,16 @@ trait SealedInstance { | |||
| 379 | } | 379 | } |
| 380 | 380 | ||
| 381 | #[cfg(feature = "low-power")] | 381 | #[cfg(feature = "low-power")] |
| 382 | pub(crate) fn init_rtc(cs: CriticalSection, config: RtcConfig) { | 382 | pub(crate) fn init_rtc(cs: CriticalSection, config: RtcConfig, min_stop_pause: embassy_time::Duration) { |
| 383 | use crate::time_driver::get_driver; | ||
| 384 | |||
| 383 | #[cfg(feature = "_allow-disable-rtc")] | 385 | #[cfg(feature = "_allow-disable-rtc")] |
| 384 | if config._disable_rtc { | 386 | if config._disable_rtc { |
| 385 | return; | 387 | return; |
| 386 | } | 388 | } |
| 387 | 389 | ||
| 388 | crate::time_driver::get_driver().set_rtc(cs, Rtc::new_inner(config)); | 390 | get_driver().set_rtc(cs, Rtc::new_inner(config)); |
| 391 | get_driver().set_min_stop_pause(cs, min_stop_pause); | ||
| 389 | 392 | ||
| 390 | trace!("low power: stop with rtc configured"); | 393 | trace!("low power: stop with rtc configured"); |
| 391 | } | 394 | } |
