diff options
| author | xoviat <[email protected]> | 2025-12-06 21:54:57 +0000 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-12-06 21:54:57 +0000 |
| commit | 7d74e87a547eed2f1a8b991aede2cecc1654c3ab (patch) | |
| tree | 0858218bd4f09c492a62ba23b779bc9e7a37478f /embassy-stm32/src/time_driver.rs | |
| parent | a30d207409f9b356c2b057e971f55f8b8057e4d1 (diff) | |
| parent | 997ad131325a30f79ef5bf407200830ce488302e (diff) | |
Merge pull request #4998 from xoviat/low-power
low-power: improve debug logic
Diffstat (limited to 'embassy-stm32/src/time_driver.rs')
| -rw-r--r-- | embassy-stm32/src/time_driver.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/embassy-stm32/src/time_driver.rs b/embassy-stm32/src/time_driver.rs index cfcf5f3fd..ed5d902bd 100644 --- a/embassy-stm32/src/time_driver.rs +++ b/embassy-stm32/src/time_driver.rs | |||
| @@ -329,6 +329,12 @@ impl RtcDriver { | |||
| 329 | regs_gp16().cr1().modify(|w| w.set_cen(true)); | 329 | regs_gp16().cr1().modify(|w| w.set_cen(true)); |
| 330 | } | 330 | } |
| 331 | 331 | ||
| 332 | #[cfg(feature = "low-power")] | ||
| 333 | /// Returns whether time is currently stopped | ||
| 334 | pub(crate) fn is_stopped(&self) -> bool { | ||
| 335 | !regs_gp16().cr1().read().cen() | ||
| 336 | } | ||
| 337 | |||
| 332 | fn set_alarm(&self, cs: CriticalSection, timestamp: u64) -> bool { | 338 | fn set_alarm(&self, cs: CriticalSection, timestamp: u64) -> bool { |
| 333 | let r = regs_gp16(); | 339 | let r = regs_gp16(); |
| 334 | 340 | ||
