Skip to content

Commit dc2d860

Browse files
committed
Fixed __HAL_RCC_GET_I2C4_SOURCE() if RCC_VER_2_0 is used
1 parent d059fee commit dc2d860

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

targets/TARGET_STM/TARGET_STM32H7/STM32Cube_FW/STM32H7xx_HAL_Driver/stm32h7xx_hal_rcc_ex.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2403,7 +2403,11 @@ typedef struct
24032403
* @arg RCC_I2C4CLKSOURCE_HSI: HSI selected as I2C4 clock
24042404
* @arg RCC_I2C4CLKSOURCE_CSI: CSI selected as I2C4 clock
24052405
*/
2406+
#if defined(RCC_D3CCIPR_I2C4SEL)
24062407
#define __HAL_RCC_GET_I2C4_SOURCE() ((uint32_t)(READ_BIT(RCC->D3CCIPR, RCC_D3CCIPR_I2C4SEL)))
2408+
#else
2409+
#define __HAL_RCC_GET_I2C4_SOURCE() ((uint32_t)(READ_BIT(RCC->SRDCCIPR, RCC_SRDCCIPR_I2C4SEL)))
2410+
#endif /* RCC_D3CCIPR_I2C4SEL */
24072411

24082412
#if defined(I2C5)
24092413
/** @brief macro to configure the I2C5 clock (I2C5CLK).

0 commit comments

Comments
 (0)