diff options
| author | xoviat <[email protected]> | 2023-10-25 19:07:31 -0500 |
|---|---|---|
| committer | xoviat <[email protected]> | 2023-10-25 19:07:31 -0500 |
| commit | e8a3cfaed6b3e0ee9e77e16caf51d4479c89090f (patch) | |
| tree | f1322c8ed0e9261ab712bcc108e164d8ec419cf1 /embassy-stm32/src/rtc | |
| parent | 0cc3e18db65dd2d6ae173e94014973741f14e2ee (diff) | |
stm32/low-power: refactor refcount
Diffstat (limited to 'embassy-stm32/src/rtc')
| -rw-r--r-- | embassy-stm32/src/rtc/mod.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/embassy-stm32/src/rtc/mod.rs b/embassy-stm32/src/rtc/mod.rs index d77443a9c..3334262f9 100644 --- a/embassy-stm32/src/rtc/mod.rs +++ b/embassy-stm32/src/rtc/mod.rs | |||
| @@ -187,7 +187,9 @@ impl Rtc { | |||
| 187 | critical_section::with(|cs| { | 187 | critical_section::with(|cs| { |
| 188 | <RTC as crate::rcc::sealed::RccPeripheral>::enable_and_reset_with_cs(cs); | 188 | <RTC as crate::rcc::sealed::RccPeripheral>::enable_and_reset_with_cs(cs); |
| 189 | #[cfg(feature = "low-power")] | 189 | #[cfg(feature = "low-power")] |
| 190 | crate::rcc::clock_refcount_sub(cs); | 190 | unsafe { |
| 191 | crate::rcc::REFCOUNT_STOP2 -= 1 | ||
| 192 | }; | ||
| 191 | }); | 193 | }); |
| 192 | 194 | ||
| 193 | let mut this = Self { | 195 | let mut this = Self { |
