File tree Expand file tree Collapse file tree 6 files changed +16
-3
lines changed Expand file tree Collapse file tree 6 files changed +16
-3
lines changed Original file line number Diff line number Diff line change 1
1
/target /
2
2
** /* .orig
3
3
** /* .rs.bk
4
- Cargo.lock
4
+ Cargo.lock
5
+
6
+ # Remove idea files
7
+ .idea /
Original file line number Diff line number Diff line change @@ -315,6 +315,8 @@ impl FlashExt for FLASH {
315
315
}
316
316
}
317
317
318
+ // TODO: Remove after ready to use flash write code
319
+ #[ allow( dead_code) ]
318
320
/// Constrained FLASH peripheral
319
321
pub struct Parts {
320
322
/// Opaque ACR register
Original file line number Diff line number Diff line change @@ -494,10 +494,10 @@ macro_rules! gpio {
494
494
pub fn set_speed( self , speed: Speed ) -> Self {
495
495
let offset = 2 * $i;
496
496
unsafe {
497
- & ( * $GPIOX:: ptr( ) ) . ospeedr. modify( |r, w| {
497
+ ( * $GPIOX:: ptr( ) ) . ospeedr. modify( |r, w| {
498
498
w. bits( ( r. bits( ) & !( 0b11 << offset) ) | ( ( speed as u32 ) << offset) )
499
499
} )
500
- } ;
500
+ }
501
501
self
502
502
}
503
503
Original file line number Diff line number Diff line change @@ -18,6 +18,13 @@ macro_rules! bus_enable {
18
18
bb:: clear( Self :: Bus :: enr( rcc) , $bit) ;
19
19
}
20
20
}
21
+
22
+ #[ inline( always) ]
23
+ fn enable_for_sleep_stop( rcc: & RccRB ) {
24
+ unsafe {
25
+ bb:: set( Self :: Bus :: smenr( rcc) , $bit) ;
26
+ }
27
+ }
21
28
}
22
29
} ;
23
30
}
Original file line number Diff line number Diff line change @@ -434,6 +434,7 @@ pub trait RccBus: crate::Sealed {
434
434
pub trait Enable : RccBus {
435
435
fn enable ( rcc : & RccRB ) ;
436
436
fn disable ( rcc : & RccRB ) ;
437
+ fn enable_for_sleep_stop ( rcc : & RccRB ) ;
437
438
}
438
439
439
440
/// Reset peripheral
You can’t perform that action at this time.
0 commit comments