File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -58,7 +58,7 @@ pub struct FlashWriter<'a, const SECTOR_SZ_KB: u32> {
58
58
flash_sz : FlashSize ,
59
59
verify : bool ,
60
60
}
61
- impl < ' a , const SECTOR_SZ_KB : u32 > FlashWriter < ' a , SECTOR_SZ_KB > {
61
+ impl < const SECTOR_SZ_KB : u32 > FlashWriter < ' _ , SECTOR_SZ_KB > {
62
62
#[ allow( unused) ]
63
63
fn unlock_options ( & mut self ) -> Result < ( ) > {
64
64
// Check if flash is busy
Original file line number Diff line number Diff line change @@ -414,7 +414,7 @@ impl Rcc {
414
414
let us_per_s = 1_000_000 ;
415
415
// Number of cycles @ sys_freq for 1us, rounded up, this will
416
416
// likely end up being 2us since the AHB prescaler is changed
417
- let delay_cycles = ( sys_freq + us_per_s - 1 ) / us_per_s ;
417
+ let delay_cycles = sys_freq. div_ceil ( us_per_s) ;
418
418
cortex_m:: asm:: delay ( delay_cycles) ;
419
419
420
420
self . rb
You can’t perform that action at this time.
0 commit comments