STM32: combine RccPeripherals reset() and enable() to reset_and_enable()
This commit is contained in:
		@@ -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 {}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user