Skip to content

Commit

Permalink
Merge pull request #15268 from jeromecoutant/PR_L0_I2C2
Browse files Browse the repository at this point in the history
STM32L0 : I2C2 was missing
  • Loading branch information
0xc0170 authored Apr 26, 2022
2 parents decc6d0 + 271ed68 commit 2d652c9
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions targets/TARGET_STM/TARGET_STM32L0/i2c_device.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,11 @@ uint32_t i2c_get_pclk(I2CName i2c)
break;
}
}
#if defined I2C2_BASE
else if (i2c == I2C_2) {
pclk = HAL_RCC_GetPCLK1Freq();
}
#endif
#if defined I2C3_BASE
else if (i2c == I2C_3) {
clocksource = __HAL_RCC_GET_I2C3_SOURCE();
Expand Down

0 comments on commit 2d652c9

Please sign in to comment.