From 8ee7b5801a01cc3e856a04dce154e25c67751bb3 Mon Sep 17 00:00:00 2001 From: Determinant Date: Fri, 22 Sep 2017 01:23:30 -0400 Subject: fix a bug in sysclock calc --- src/i2c.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- cgit v1.2.3-70-g09d2