stm32: remove Dbgmcu from public API.
The use case is already covered by `config.enable_debug_during_sleep`.
This commit is contained in:
		
							parent
							
								
									2eb0cc5df7
								
							
						
					
					
						commit
						3486d59d73
					
				@ -1,13 +0,0 @@
 | 
				
			|||||||
pub struct Dbgmcu {}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
impl Dbgmcu {
 | 
					 | 
				
			||||||
    pub unsafe fn enable_all() {
 | 
					 | 
				
			||||||
        crate::pac::DBGMCU.cr().modify(|cr| {
 | 
					 | 
				
			||||||
            crate::pac::dbgmcu! {
 | 
					 | 
				
			||||||
                (cr, $fn_name:ident) => {
 | 
					 | 
				
			||||||
                    cr.$fn_name(true);
 | 
					 | 
				
			||||||
                };
 | 
					 | 
				
			||||||
            }
 | 
					 | 
				
			||||||
        });
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
@ -29,8 +29,6 @@ pub mod adc;
 | 
				
			|||||||
pub mod can;
 | 
					pub mod can;
 | 
				
			||||||
#[cfg(dac)]
 | 
					#[cfg(dac)]
 | 
				
			||||||
pub mod dac;
 | 
					pub mod dac;
 | 
				
			||||||
#[cfg(dbgmcu)]
 | 
					 | 
				
			||||||
pub mod dbgmcu;
 | 
					 | 
				
			||||||
#[cfg(dcmi)]
 | 
					#[cfg(dcmi)]
 | 
				
			||||||
pub mod dcmi;
 | 
					pub mod dcmi;
 | 
				
			||||||
#[cfg(all(eth, feature = "net"))]
 | 
					#[cfg(all(eth, feature = "net"))]
 | 
				
			||||||
@ -90,7 +88,13 @@ pub fn init(config: Config) -> Peripherals {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    unsafe {
 | 
					    unsafe {
 | 
				
			||||||
        if config.enable_debug_during_sleep {
 | 
					        if config.enable_debug_during_sleep {
 | 
				
			||||||
            dbgmcu::Dbgmcu::enable_all();
 | 
					            crate::pac::DBGMCU.cr().modify(|cr| {
 | 
				
			||||||
 | 
					                crate::pac::dbgmcu! {
 | 
				
			||||||
 | 
					                    (cr, $fn_name:ident) => {
 | 
				
			||||||
 | 
					                        cr.$fn_name(true);
 | 
				
			||||||
 | 
					                    };
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					            });
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        gpio::init();
 | 
					        gpio::init();
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user