diff options
Diffstat (limited to 'bsps/arm/stm32h7/hal/stm32h7xx_ll_i2c.c')
-rw-r--r-- | bsps/arm/stm32h7/hal/stm32h7xx_ll_i2c.c | 29 |
1 files changed, 18 insertions, 11 deletions
diff --git a/bsps/arm/stm32h7/hal/stm32h7xx_ll_i2c.c b/bsps/arm/stm32h7/hal/stm32h7xx_ll_i2c.c index 4f19e9ad3d..00a34b5aa8 100644 --- a/bsps/arm/stm32h7/hal/stm32h7xx_ll_i2c.c +++ b/bsps/arm/stm32h7/hal/stm32h7xx_ll_i2c.c @@ -6,13 +6,12 @@ ****************************************************************************** * @attention * - * <h2><center>© Copyright (c) 2017 STMicroelectronics. - * All rights reserved.</center></h2> + * Copyright (c) 2017 STMicroelectronics. + * All rights reserved. * - * This software component is licensed by ST under BSD 3-Clause license, - * the "License"; You may not use this file except in compliance with the - * License. You may obtain a copy of the License at: - * opensource.org/licenses/BSD-3-Clause + * This software is licensed under terms that can be found in the LICENSE file + * in the root directory of this software component. + * If no LICENSE file comes with this software, it is provided AS-IS. * ****************************************************************************** */ @@ -25,13 +24,13 @@ #include "stm32_assert.h" #else #define assert_param(expr) ((void)0U) -#endif +#endif /* USE_FULL_ASSERT */ /** @addtogroup STM32H7xx_LL_Driver * @{ */ -#if defined (I2C1) || defined (I2C2) || defined (I2C3) || defined (I2C4) +#if defined (I2C1) || defined (I2C2) || defined (I2C3) || defined (I2C4) || defined (I2C5) /** @defgroup I2C_LL I2C * @ingroup RTEMSBSPsARMSTM32H7 @@ -125,6 +124,16 @@ ErrorStatus LL_I2C_DeInit(I2C_TypeDef *I2Cx) /* Release reset of I2C clock */ LL_APB4_GRP1_ReleaseReset(LL_APB4_GRP1_PERIPH_I2C4); } +#if defined(I2C5) + else if (I2Cx == I2C5) + { + /* Force reset of I2C clock */ + LL_APB1_GRP1_ForceReset(LL_APB1_GRP1_PERIPH_I2C5); + + /* Release reset of I2C clock */ + LL_APB1_GRP1_ReleaseReset(LL_APB1_GRP1_PERIPH_I2C5); + } +#endif /* I2C5 */ else { status = ERROR; @@ -233,12 +242,10 @@ void LL_I2C_StructInit(LL_I2C_InitTypeDef *I2C_InitStruct) * @} */ -#endif /* I2C1 || I2C2 || I2C3 || I2C4 */ +#endif /* I2C1 || I2C2 || I2C3 || I2C4 || I2C5 */ /** * @} */ #endif /* USE_FULL_LL_DRIVER */ - -/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ |