diff options
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 | ||
