Skip to content

Commit c983ec0

Browse files
authored
Merge pull request #137 from rfuest/hertz
Change Into<Hertz> to TryInto<Hertz> in rcc.rs
2 parents aeba2b7 + 55f282a commit c983ec0

File tree

3 files changed

+132
-71
lines changed

3 files changed

+132
-71
lines changed

examples/blinky_delay.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ fn main() -> ! {
2222
let rcc = p.RCC.constrain();
2323

2424
// Configure clock and freeze it
25-
let clocks = rcc.cfgr.sysclk(216_000_000.Hz()).freeze();
25+
let clocks = rcc.cfgr.sysclk(216.MHz()).freeze();
2626

2727
// Get delay provider
2828
let mut delay = Delay::new(cp.SYST, clocks);

src/ltdc.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ impl<T: 'static + SupportedWord> DisplayController<T> {
8585
// Get base clock and PLLM divisor
8686
let base_clk: u32;
8787
match &hse {
88-
Some(hse) => base_clk = hse.freq,
88+
Some(hse) => base_clk = hse.freq.0,
8989
// If no HSE is provided, we use the HSI clock at 16 MHz
9090
None => base_clk = 16_000_000,
9191
}

0 commit comments

Comments
 (0)