summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDeterminant <[email protected]>2017-09-22 01:23:30 -0400
committerDeterminant <[email protected]>2017-09-22 01:23:30 -0400
commit8ee7b5801a01cc3e856a04dce154e25c67751bb3 (patch)
tree7c711faa02212c3652470b5e166215b64d92c730
parenta459ddf4bfe00f956bf0ffffe70d57585e889501 (diff)
fix a bug in sysclock calc
-rw-r--r--src/i2c.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/i2c.rs b/src/i2c.rs
index 8904730..8ccf3af 100644
--- a/src/i2c.rs
+++ b/src/i2c.rs
@@ -43,7 +43,7 @@ impl<'a> I2C<'a> {
SWSR::PLL => {
let pllmull = cfgr.pllmul().bits();
let pllsource = cfgr.pllsrc();
- let pllmull = (pllmull as u32 >> 18) + 2;
+ let pllmull = pllmull as u32 + 2;
match pllsource {
PLLSRCR::INTERNAL => {
(HSI_VALUE >> 1) * pllmull