Skip to content

Commit 2d652c9

Browse files
authored
Merge pull request ARMmbed#15268 from jeromecoutant/PR_L0_I2C2
STM32L0 : I2C2 was missing
2 parents decc6d0 + 271ed68 commit 2d652c9

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

targets/TARGET_STM/TARGET_STM32L0/i2c_device.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,11 @@ uint32_t i2c_get_pclk(I2CName i2c)
4646
break;
4747
}
4848
}
49+
#if defined I2C2_BASE
50+
else if (i2c == I2C_2) {
51+
pclk = HAL_RCC_GetPCLK1Freq();
52+
}
53+
#endif
4954
#if defined I2C3_BASE
5055
else if (i2c == I2C_3) {
5156
clocksource = __HAL_RCC_GET_I2C3_SOURCE();

0 commit comments

Comments
 (0)