Skip to content

Commit

Permalink
Removed second division by refdiv
Browse files Browse the repository at this point in the history
  • Loading branch information
vinsynth committed Sep 16, 2023
1 parent 78f71ae commit 4142678
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rp2040-hal/src/pll.rs
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ impl<D: PhaseLockedLoopDevice> PhaseLockedLoop<Disabled, D> {
let refdiv = config.refdiv;
let post_div1 = config.post_div1;
let post_div2 = config.post_div2;
let frequency: HertzU32 = ((ref_freq_hz / u32::from(refdiv)) * u32::from(fbdiv))
let frequency: HertzU32 = (ref_freq_hz * u32::from(fbdiv))
/ (u32::from(post_div1) * u32::from(post_div2));

Ok(PhaseLockedLoop {
Expand Down

0 comments on commit 4142678

Please sign in to comment.