STM32: combine RccPeripherals reset() and enable() to reset_and_enable()

This commit is contained in:
pbert
2023-10-11 18:06:43 +02:00
parent eb368f77a4
commit f65a96c541
37 changed files with 105 additions and 154 deletions

View File

@ -559,6 +559,7 @@ fn main() {
fn enable() {
critical_section::with(|_cs| {
#before_enable
#rst
#[cfg(feature = "low-power")]
crate::rcc::clock_refcount_add(_cs);
crate::pac::RCC.#en_reg().modify(|w| w.#set_en_field(true));
@ -573,9 +574,6 @@ fn main() {
crate::rcc::clock_refcount_sub(_cs);
})
}
fn reset() {
#rst
}
}
impl crate::rcc::RccPeripheral for peripherals::#pname {}