Skip to content

Commit cecddec

Browse files
committed
Fixed I2C definitions after new PAC integration
1 parent f90c274 commit cecddec

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/i2c/i2c_def.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,10 @@ macro_rules! i2c {
3636
let ccipr4 = unsafe { (*stm32::RCC::ptr()).ccipr4().read() };
3737

3838
match ccipr4.[<$I2CX:lower sel>]().variant() {
39-
ccipr4::[<$I2CX SEL>]::$Pclk => Some(clocks.$pclk()),
40-
ccipr4::[<$I2CX SEL>]::Pll2R => clocks.pll2_r_ck(),
41-
ccipr4::[<$I2CX SEL>]::HsiKer => clocks.hsi_ck(),
42-
ccipr4::[<$I2CX SEL>]::CsiKer => clocks.csi_ck(),
39+
ccipr4::I2CSEL::$Pclk => Some(clocks.$pclk()),
40+
ccipr4::I2CSEL::Pll2R => clocks.pll2_r_ck(),
41+
ccipr4::I2CSEL::HsiKer => clocks.hsi_ck(),
42+
ccipr4::I2CSEL::CsiKer => clocks.csi_ck(),
4343
}.expect("Source clock not enabled")
4444
}
4545

@@ -91,6 +91,6 @@ mod rm492 {
9191
]
9292
}
9393

94-
i2c! { I2C1: I2c1, RccPclk1, pclk1 }
95-
i2c! { I2C2: I2c2, RccPclk1, pclk1 }
94+
i2c! { I2C1: I2c1, Pclk, pclk1 }
95+
i2c! { I2C2: I2c2, Pclk, pclk1 }
9696
}

0 commit comments

Comments
 (0)