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/time_driver.rs | |
| parent | a51533c0b4edd551a1b9587b9272026b0b256d54 (diff) | |
low_power: misc cleanups and allow main macro
Diffstat (limited to 'embassy-stm32/src/time_driver.rs')
| -rw-r--r-- | embassy-stm32/src/time_driver.rs | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/embassy-stm32/src/time_driver.rs b/embassy-stm32/src/time_driver.rs index 6d93b430a..0b75aef92 100644 --- a/embassy-stm32/src/time_driver.rs +++ b/embassy-stm32/src/time_driver.rs | |||
| @@ -245,7 +245,7 @@ embassy_time_driver::time_driver_impl!(static DRIVER: RtcDriver = RtcDriver { | |||
| 245 | impl RtcDriver { | 245 | impl RtcDriver { |
| 246 | /// initialize the timer, but don't start it. Used for chips like stm32wle5 | 246 | /// initialize the timer, but don't start it. Used for chips like stm32wle5 |
| 247 | /// for low power where the timer config is lost in STOP2. | 247 | /// for low power where the timer config is lost in STOP2. |
| 248 | fn init_timer(&'static self, cs: critical_section::CriticalSection) { | 248 | pub(crate) fn init_timer(&'static self, cs: critical_section::CriticalSection) { |
| 249 | let r = regs_gp16(); | 249 | let r = regs_gp16(); |
| 250 | 250 | ||
| 251 | rcc::enable_and_reset_with_cs::<T>(cs); | 251 | rcc::enable_and_reset_with_cs::<T>(cs); |
| @@ -516,8 +516,3 @@ pub(crate) const fn get_driver() -> &'static RtcDriver { | |||
| 516 | pub(crate) fn init(cs: CriticalSection) { | 516 | pub(crate) fn init(cs: CriticalSection) { |
| 517 | DRIVER.init(cs) | 517 | DRIVER.init(cs) |
| 518 | } | 518 | } |
| 519 | |||
| 520 | #[cfg(all(feature = "low-power", stm32wlex))] | ||
| 521 | pub(crate) fn init_timer(cs: CriticalSection) { | ||
| 522 | DRIVER.init_timer(cs) | ||
| 523 | } | ||
