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> {
5858 flash_sz : FlashSize ,
5959 verify : bool ,
6060}
61- impl < ' a , const SECTOR_SZ_KB : u32 > FlashWriter < ' a , SECTOR_SZ_KB > {
61+ impl < const SECTOR_SZ_KB : u32 > FlashWriter < ' _ , SECTOR_SZ_KB > {
6262 #[ allow( unused) ]
6363 fn unlock_options ( & mut self ) -> Result < ( ) > {
6464 // Check if flash is busy
Original file line number Diff line number Diff line change @@ -414,7 +414,7 @@ impl Rcc {
414414 let us_per_s = 1_000_000 ;
415415 // Number of cycles @ sys_freq for 1us, rounded up, this will
416416 // 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) ;
418418 cortex_m:: asm:: delay ( delay_cycles) ;
419419
420420 self . rb
You can’t perform that action at this time.
0 commit comments