Skip to content

Commit d323f02

Browse files
committed
Fmt rcc
1 parent 602b640 commit d323f02

File tree

1 file changed

+3
-11
lines changed

1 file changed

+3
-11
lines changed

src/rcc.rs

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,7 @@ impl CFGR {
383383
fn calc_pll(&self, sysclk: u32) -> (u32, PllConfig) {
384384
let pllsrcclk = self.hse.unwrap_or(HSI);
385385

386-
let (pll_mul, pll_div) = {
386+
let (pll_mul, pll_div) = {
387387
// Get the optimal value for the pll divisor (PLL_DIV) and multiplcator (PLL_MUL)
388388
// with the greatest common divisor calculation.
389389
let common_divisor = gcd(sysclk, pllsrcclk);
@@ -450,22 +450,14 @@ impl CFGR {
450450
(hseclk, cfgr::SW_A::HSE, None)
451451
} else {
452452
let clock_with_pll = self.calc_pll(sysclk);
453-
(
454-
clock_with_pll.0,
455-
cfgr::SW_A::PLL,
456-
Some(clock_with_pll.1),
457-
)
453+
(clock_with_pll.0, cfgr::SW_A::PLL, Some(clock_with_pll.1))
458454
}
459455
} else if sysclk == HSI {
460456
// No need to use the PLL
461457
(HSI, cfgr::SW_A::HSE, None)
462458
} else {
463459
let clock_with_pll = self.calc_pll(sysclk);
464-
(
465-
clock_with_pll.0,
466-
cfgr::SW_A::PLL,
467-
Some(clock_with_pll.1),
468-
)
460+
(clock_with_pll.0, cfgr::SW_A::PLL, Some(clock_with_pll.1))
469461
}
470462
} else if let Some(hseclk) = self.hse {
471463
// Use HSE as system clock

0 commit comments

Comments
 (0)