stm32/low-power: refactor refcount

This commit is contained in:
xoviat
2023-10-25 19:07:31 -05:00
parent 0cc3e18db6
commit e8a3cfaed6
6 changed files with 29 additions and 35 deletions

View File

@ -187,7 +187,9 @@ impl Rtc {
critical_section::with(|cs| {
<RTC as crate::rcc::sealed::RccPeripheral>::enable_and_reset_with_cs(cs);
#[cfg(feature = "low-power")]
crate::rcc::clock_refcount_sub(cs);
unsafe {
crate::rcc::REFCOUNT_STOP2 -= 1
};
});
let mut this = Self {