aboutsummaryrefslogtreecommitdiff
path: root/embassy-stm32/src/rcc/mod.rs
diff options
context:
space:
mode:
authorxoviat <[email protected]>2025-12-08 08:19:24 -0600
committerxoviat <[email protected]>2025-12-08 08:19:24 -0600
commitc93da8fc6d76cd6978c0cfbfb3ab42b0285af8d8 (patch)
treee745116af2890bdd54821eeb44aed44a3cffff3b /embassy-stm32/src/rcc/mod.rs
parent2a738c147111569e4f0968020eec6fb5d5d4e754 (diff)
low-power: use scoped block stop
Co-authored-by: hjeldin <[email protected]>
Diffstat (limited to 'embassy-stm32/src/rcc/mod.rs')
-rw-r--r--embassy-stm32/src/rcc/mod.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/embassy-stm32/src/rcc/mod.rs b/embassy-stm32/src/rcc/mod.rs
index a33ec5d7d..2a9a1595a 100644
--- a/embassy-stm32/src/rcc/mod.rs
+++ b/embassy-stm32/src/rcc/mod.rs
@@ -498,6 +498,16 @@ pub fn enable_and_reset<T: RccPeripheral>() {
498 T::RCC_INFO.enable_and_reset(); 498 T::RCC_INFO.enable_and_reset();
499} 499}
500 500
501/// Enables and resets peripheral `T` without incrementing the stop refcount.
502///
503/// # Safety
504///
505/// Peripheral must not be in use.
506// TODO: should this be `unsafe`?
507pub fn enable_and_reset_without_stop<T: RccPeripheral>() {
508 T::RCC_INFO.enable_and_reset_without_stop();
509}
510
501/// Disables peripheral `T`. 511/// Disables peripheral `T`.
502/// 512///
503/// # Safety 513/// # Safety