summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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