aboutsummaryrefslogtreecommitdiff
path: root/embassy-stm32/src/time_driver.rs
diff options
context:
space:
mode:
authorxoviat <[email protected]>2025-12-06 15:24:30 -0600
committerxoviat <[email protected]>2025-12-06 15:24:30 -0600
commit997ad131325a30f79ef5bf407200830ce488302e (patch)
tree0858218bd4f09c492a62ba23b779bc9e7a37478f /embassy-stm32/src/time_driver.rs
parenta30d207409f9b356c2b057e971f55f8b8057e4d1 (diff)
low-power: improve debug logic
Diffstat (limited to 'embassy-stm32/src/time_driver.rs')
-rw-r--r--embassy-stm32/src/time_driver.rs6
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