19 #if defined(USE_FULL_LL_DRIVER) 24 #ifdef USE_FULL_ASSERT 25 #include "stm32_assert.h" 27 #define assert_param(expr) ((void)0U) 34 #if defined (I2C1) || defined (I2C2) || defined (I2C3) || defined (I2C4) 48 #define IS_LL_I2C_PERIPHERAL_MODE(__VALUE__) (((__VALUE__) == LL_I2C_MODE_I2C) || \ 49 ((__VALUE__) == LL_I2C_MODE_SMBUS_HOST) || \ 50 ((__VALUE__) == LL_I2C_MODE_SMBUS_DEVICE) || \ 51 ((__VALUE__) == LL_I2C_MODE_SMBUS_DEVICE_ARP)) 53 #define IS_LL_I2C_ANALOG_FILTER(__VALUE__) (((__VALUE__) == LL_I2C_ANALOGFILTER_ENABLE) || \ 54 ((__VALUE__) == LL_I2C_ANALOGFILTER_DISABLE)) 56 #define IS_LL_I2C_DIGITAL_FILTER(__VALUE__) ((__VALUE__) <= 0x0000000FU) 58 #define IS_LL_I2C_OWN_ADDRESS1(__VALUE__) ((__VALUE__) <= 0x000003FFU) 60 #define IS_LL_I2C_TYPE_ACKNOWLEDGE(__VALUE__) (((__VALUE__) == LL_I2C_ACK) || \ 61 ((__VALUE__) == LL_I2C_NACK)) 63 #define IS_LL_I2C_OWN_ADDRSIZE(__VALUE__) (((__VALUE__) == LL_I2C_OWNADDRESS1_7BIT) || \ 64 ((__VALUE__) == LL_I2C_OWNADDRESS1_10BIT)) 89 ErrorStatus status = SUCCESS;
103 else if (I2Cx == I2C2)
113 else if (I2Cx == I2C3)
122 else if (I2Cx == I2C4)
219 I2C_InitStruct->
Timing = 0U;
220 I2C_InitStruct->
AnalogFilter = LL_I2C_ANALOGFILTER_ENABLE;
224 I2C_InitStruct->
OwnAddrSize = LL_I2C_OWNADDRESS1_7BIT;
__STATIC_INLINE void LL_I2C_ConfigFilters(I2C_TypeDef *I2Cx, uint32_t AnalogFilter, uint32_t DigitalFilter)
Configure Noise Filters (Analog and Digital).
__STATIC_INLINE void LL_I2C_SetMode(I2C_TypeDef *I2Cx, uint32_t PeripheralMode)
Configure peripheral mode.
ErrorStatus LL_I2C_DeInit(I2C_TypeDef *I2Cx)
De-initialize the I2C registers to their default reset values.
Header file of I2C LL module.
__STATIC_INLINE void LL_I2C_Enable(I2C_TypeDef *I2Cx)
Enable I2C peripheral (PE = 1). CR1 PE LL_I2C_Enable.
__STATIC_INLINE void LL_APB1_GRP1_ReleaseReset(uint32_t Periphs)
Release APB1 peripherals reset. APB1RSTR1 TIM2RST LL_APB1_GRP1_ReleaseReset APB1RSTR1 TIM3RST LL_AP...
__STATIC_INLINE void LL_I2C_SetOwnAddress1(I2C_TypeDef *I2Cx, uint32_t OwnAddress1, uint32_t OwnAddrSize)
Set the Own Address1. OAR1 OA1 LL_I2C_SetOwnAddress1 OAR1 OA1MODE LL_I2C_SetOwnAddress1.
__STATIC_INLINE void LL_APB1_GRP2_ForceReset(uint32_t Periphs)
Force APB1 peripherals reset. APB1RSTR2 LPUART1RST LL_APB1_GRP2_ForceReset APB1RSTR2 I2C4RST LL_APB...
__STATIC_INLINE void LL_I2C_EnableOwnAddress1(I2C_TypeDef *I2Cx)
Enable acknowledge on Own Address1 match address. OAR1 OA1EN LL_I2C_EnableOwnAddress1.
__STATIC_INLINE void LL_I2C_DisableOwnAddress1(I2C_TypeDef *I2Cx)
Disable acknowledge on Own Address1 match address. OAR1 OA1EN LL_I2C_DisableOwnAddress1.
__STATIC_INLINE void LL_APB1_GRP2_ReleaseReset(uint32_t Periphs)
Release APB1 peripherals reset. APB1RSTR2 LPUART1RST LL_APB1_GRP2_ReleaseReset APB1RSTR2 I2C4RST LL...
ErrorStatus LL_I2C_Init(I2C_TypeDef *I2Cx, LL_I2C_InitTypeDef *I2C_InitStruct)
Initialize the I2C registers according to the specified parameters in I2C_InitStruct.
Header file of BUS LL module.
__STATIC_INLINE void LL_I2C_Disable(I2C_TypeDef *I2Cx)
Disable I2C peripheral (PE = 0).
__STATIC_INLINE void LL_APB1_GRP1_ForceReset(uint32_t Periphs)
Force APB1 peripherals reset. APB1RSTR1 TIM2RST LL_APB1_GRP1_ForceReset APB1RSTR1 TIM3RST LL_APB1_G...
__STATIC_INLINE void LL_I2C_SetTiming(I2C_TypeDef *I2Cx, uint32_t Timing)
Configure the SDA setup, hold time and the SCL high, low period.
__STATIC_INLINE void LL_I2C_AcknowledgeNextData(I2C_TypeDef *I2Cx, uint32_t TypeAcknowledge)
Prepare the generation of a ACKnowledge or Non ACKnowledge condition after the address receive match ...
void LL_I2C_StructInit(LL_I2C_InitTypeDef *I2C_InitStruct)
Set each LL_I2C_InitTypeDef field to default value.
assert_param(IS_RTC_WAKEUP_CLOCK(WakeUpClock))