STM32L486xx HAL User Manual
Functions
Configuration
I2C Exported Functions

Functions

__STATIC_INLINE void LL_I2C_Enable (I2C_TypeDef *I2Cx)
 Enable I2C peripheral (PE = 1).
__STATIC_INLINE void LL_I2C_Disable (I2C_TypeDef *I2Cx)
 Disable I2C peripheral (PE = 0).
__STATIC_INLINE uint32_t LL_I2C_IsEnabled (I2C_TypeDef *I2Cx)
 Check if the I2C peripheral is enabled or disabled.
__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_SetDigitalFilter (I2C_TypeDef *I2Cx, uint32_t DigitalFilter)
 Configure Digital Noise Filter.
__STATIC_INLINE uint32_t LL_I2C_GetDigitalFilter (I2C_TypeDef *I2Cx)
 Get the current Digital Noise Filter configuration.
__STATIC_INLINE void LL_I2C_EnableAnalogFilter (I2C_TypeDef *I2Cx)
 Enable Analog Noise Filter.
__STATIC_INLINE void LL_I2C_DisableAnalogFilter (I2C_TypeDef *I2Cx)
 Disable Analog Noise Filter.
__STATIC_INLINE uint32_t LL_I2C_IsEnabledAnalogFilter (I2C_TypeDef *I2Cx)
 Check if Analog Noise Filter is enabled or disabled.
__STATIC_INLINE void LL_I2C_EnableDMAReq_TX (I2C_TypeDef *I2Cx)
 Enable DMA transmission requests.
__STATIC_INLINE void LL_I2C_DisableDMAReq_TX (I2C_TypeDef *I2Cx)
 Disable DMA transmission requests.
__STATIC_INLINE uint32_t LL_I2C_IsEnabledDMAReq_TX (I2C_TypeDef *I2Cx)
 Check if DMA transmission requests are enabled or disabled.
__STATIC_INLINE void LL_I2C_EnableDMAReq_RX (I2C_TypeDef *I2Cx)
 Enable DMA reception requests.
__STATIC_INLINE void LL_I2C_DisableDMAReq_RX (I2C_TypeDef *I2Cx)
 Disable DMA reception requests.
__STATIC_INLINE uint32_t LL_I2C_IsEnabledDMAReq_RX (I2C_TypeDef *I2Cx)
 Check if DMA reception requests are enabled or disabled.
__STATIC_INLINE uint32_t LL_I2C_DMA_GetRegAddr (I2C_TypeDef *I2Cx, uint32_t Direction)
 Get the data register address used for DMA transfer.
__STATIC_INLINE void LL_I2C_EnableClockStretching (I2C_TypeDef *I2Cx)
 Enable Clock stretching.
__STATIC_INLINE void LL_I2C_DisableClockStretching (I2C_TypeDef *I2Cx)
 Disable Clock stretching.
__STATIC_INLINE uint32_t LL_I2C_IsEnabledClockStretching (I2C_TypeDef *I2Cx)
 Check if Clock stretching is enabled or disabled.
__STATIC_INLINE void LL_I2C_EnableSlaveByteControl (I2C_TypeDef *I2Cx)
 Enable hardware byte control in slave mode.
__STATIC_INLINE void LL_I2C_DisableSlaveByteControl (I2C_TypeDef *I2Cx)
 Disable hardware byte control in slave mode.
__STATIC_INLINE uint32_t LL_I2C_IsEnabledSlaveByteControl (I2C_TypeDef *I2Cx)
 Check if hardware byte control in slave mode is enabled or disabled.
__STATIC_INLINE void LL_I2C_EnableWakeUpFromStop (I2C_TypeDef *I2Cx)
 Enable Wakeup from STOP.
__STATIC_INLINE void LL_I2C_DisableWakeUpFromStop (I2C_TypeDef *I2Cx)
 Disable Wakeup from STOP.
__STATIC_INLINE uint32_t LL_I2C_IsEnabledWakeUpFromStop (I2C_TypeDef *I2Cx)
 Check if Wakeup from STOP is enabled or disabled.
__STATIC_INLINE void LL_I2C_EnableGeneralCall (I2C_TypeDef *I2Cx)
 Enable General Call.
__STATIC_INLINE void LL_I2C_DisableGeneralCall (I2C_TypeDef *I2Cx)
 Disable General Call.
__STATIC_INLINE uint32_t LL_I2C_IsEnabledGeneralCall (I2C_TypeDef *I2Cx)
 Check if General Call is enabled or disabled.
__STATIC_INLINE void LL_I2C_SetMasterAddressingMode (I2C_TypeDef *I2Cx, uint32_t AddressingMode)
 Configure the Master to operate in 7-bit or 10-bit addressing mode.
__STATIC_INLINE uint32_t LL_I2C_GetMasterAddressingMode (I2C_TypeDef *I2Cx)
 Get the Master addressing mode.
__STATIC_INLINE void LL_I2C_SetOwnAddress1 (I2C_TypeDef *I2Cx, uint32_t OwnAddress1, uint32_t OwnAddrSize)
 Set the Own Address1.
__STATIC_INLINE void LL_I2C_EnableOwnAddress1 (I2C_TypeDef *I2Cx)
 Enable acknowledge on Own Address1 match address.
__STATIC_INLINE void LL_I2C_DisableOwnAddress1 (I2C_TypeDef *I2Cx)
 Disable acknowledge on Own Address1 match address.
__STATIC_INLINE uint32_t LL_I2C_IsEnabledOwnAddress1 (I2C_TypeDef *I2Cx)
 Check if Own Address1 acknowledge is enabled or disabled.
__STATIC_INLINE void LL_I2C_SetOwnAddress2 (I2C_TypeDef *I2Cx, uint32_t OwnAddress2, uint32_t OwnAddrMask)
 Set the 7bits Own Address2.
__STATIC_INLINE void LL_I2C_EnableOwnAddress2 (I2C_TypeDef *I2Cx)
 Enable acknowledge on Own Address2 match address.
__STATIC_INLINE void LL_I2C_DisableOwnAddress2 (I2C_TypeDef *I2Cx)
 Disable acknowledge on Own Address2 match address.
__STATIC_INLINE uint32_t LL_I2C_IsEnabledOwnAddress2 (I2C_TypeDef *I2Cx)
 Check if Own Address1 acknowledge is enabled or disabled.
__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 uint32_t LL_I2C_GetTimingPrescaler (I2C_TypeDef *I2Cx)
 Get the Timing Prescaler setting.
__STATIC_INLINE uint32_t LL_I2C_GetClockLowPeriod (I2C_TypeDef *I2Cx)
 Get the SCL low period setting.
__STATIC_INLINE uint32_t LL_I2C_GetClockHighPeriod (I2C_TypeDef *I2Cx)
 Get the SCL high period setting.
__STATIC_INLINE uint32_t LL_I2C_GetDataHoldTime (I2C_TypeDef *I2Cx)
 Get the SDA hold time.
__STATIC_INLINE uint32_t LL_I2C_GetDataSetupTime (I2C_TypeDef *I2Cx)
 Get the SDA setup time.
__STATIC_INLINE void LL_I2C_SetMode (I2C_TypeDef *I2Cx, uint32_t PeripheralMode)
 Configure peripheral mode.
__STATIC_INLINE uint32_t LL_I2C_GetMode (I2C_TypeDef *I2Cx)
 Get peripheral mode.
__STATIC_INLINE void LL_I2C_EnableSMBusAlert (I2C_TypeDef *I2Cx)
 Enable SMBus alert (Host or Device mode)
__STATIC_INLINE void LL_I2C_DisableSMBusAlert (I2C_TypeDef *I2Cx)
 Disable SMBus alert (Host or Device mode)
__STATIC_INLINE uint32_t LL_I2C_IsEnabledSMBusAlert (I2C_TypeDef *I2Cx)
 Check if SMBus alert (Host or Device mode) is enabled or disabled.
__STATIC_INLINE void LL_I2C_EnableSMBusPEC (I2C_TypeDef *I2Cx)
 Enable SMBus Packet Error Calculation (PEC).
__STATIC_INLINE void LL_I2C_DisableSMBusPEC (I2C_TypeDef *I2Cx)
 Disable SMBus Packet Error Calculation (PEC).
__STATIC_INLINE uint32_t LL_I2C_IsEnabledSMBusPEC (I2C_TypeDef *I2Cx)
 Check if SMBus Packet Error Calculation (PEC) is enabled or disabled.
__STATIC_INLINE void LL_I2C_ConfigSMBusTimeout (I2C_TypeDef *I2Cx, uint32_t TimeoutA, uint32_t TimeoutAMode, uint32_t TimeoutB)
 Configure the SMBus Clock Timeout.
__STATIC_INLINE void LL_I2C_SetSMBusTimeoutA (I2C_TypeDef *I2Cx, uint32_t TimeoutA)
 Configure the SMBus Clock TimeoutA (SCL low timeout or SCL and SDA high timeout depends on TimeoutA mode).
__STATIC_INLINE uint32_t LL_I2C_GetSMBusTimeoutA (I2C_TypeDef *I2Cx)
 Get the SMBus Clock TimeoutA setting.
__STATIC_INLINE void LL_I2C_SetSMBusTimeoutAMode (I2C_TypeDef *I2Cx, uint32_t TimeoutAMode)
 Set the SMBus Clock TimeoutA mode.
__STATIC_INLINE uint32_t LL_I2C_GetSMBusTimeoutAMode (I2C_TypeDef *I2Cx)
 Get the SMBus Clock TimeoutA mode.
__STATIC_INLINE void LL_I2C_SetSMBusTimeoutB (I2C_TypeDef *I2Cx, uint32_t TimeoutB)
 Configure the SMBus Extended Cumulative Clock TimeoutB (Master or Slave mode).
__STATIC_INLINE uint32_t LL_I2C_GetSMBusTimeoutB (I2C_TypeDef *I2Cx)
 Get the SMBus Extented Cumulative Clock TimeoutB setting.
__STATIC_INLINE void LL_I2C_EnableSMBusTimeout (I2C_TypeDef *I2Cx, uint32_t ClockTimeout)
 Enable the SMBus Clock Timeout.
__STATIC_INLINE void LL_I2C_DisableSMBusTimeout (I2C_TypeDef *I2Cx, uint32_t ClockTimeout)
 Disable the SMBus Clock Timeout.
__STATIC_INLINE uint32_t LL_I2C_IsEnabledSMBusTimeout (I2C_TypeDef *I2Cx, uint32_t ClockTimeout)
 Check if the SMBus Clock Timeout is enabled or disabled.

Function Documentation

__STATIC_INLINE void LL_I2C_ConfigFilters ( I2C_TypeDef *  I2Cx,
uint32_t  AnalogFilter,
uint32_t  DigitalFilter 
)

Configure Noise Filters (Analog and Digital).

Note:
If the analog filter is also enabled, the digital filter is added to analog filter. The filters can only be programmed when the I2C is disabled (PE = 0).
Reference Manual to LL API cross reference:
CR1 ANFOFF LL_I2C_ConfigFilters
CR1 DNF LL_I2C_ConfigFilters
Parameters:
I2CxI2C Instance.
AnalogFilterThis parameter can be one of the following values:
DigitalFilterThis parameter must be a value between Min_Data=0x00 (Digital filter disabled) and Max_Data=0x0F (Digital filter enabled and filtering capability up to 15*ti2cclk). This parameter is used to configure the digital noise filter on SDA and SCL input. The digital filter will filter spikes with a length of up to DNF[3:0]*ti2cclk.
Return values:
None

Definition at line 452 of file stm32l4xx_ll_i2c.h.

Referenced by LL_I2C_Init().

__STATIC_INLINE void LL_I2C_ConfigSMBusTimeout ( I2C_TypeDef *  I2Cx,
uint32_t  TimeoutA,
uint32_t  TimeoutAMode,
uint32_t  TimeoutB 
)

Configure the SMBus Clock Timeout.

Note:
Macro IS_SMBUS_ALL_INSTANCE(I2Cx) can be used to check whether or not SMBus feature is supported by the I2Cx Instance.
This configuration can only be programmed when associated Timeout is disabled (TimeoutA and/orTimeoutB).
Reference Manual to LL API cross reference:
TIMEOUTR TIMEOUTA LL_I2C_ConfigSMBusTimeout
TIMEOUTR TIDLE LL_I2C_ConfigSMBusTimeout
TIMEOUTR TIMEOUTB LL_I2C_ConfigSMBusTimeout
Parameters:
I2CxI2C Instance.
TimeoutAThis parameter must be a value between Min_Data=0 and Max_Data=0xFFF.
TimeoutAModeThis parameter can be one of the following values:
TimeoutB
Return values:
None

Definition at line 1099 of file stm32l4xx_ll_i2c.h.

__STATIC_INLINE void LL_I2C_Disable ( I2C_TypeDef *  I2Cx)

Disable I2C peripheral (PE = 0).

Note:
When PE = 0, the I2C SCL and SDA lines are released. Internal state machines and status bits are put back to their reset value. When cleared, PE must be kept low for at least 3 APB clock cycles.
Reference Manual to LL API cross reference:
CR1 PE LL_I2C_Disable
Parameters:
I2CxI2C Instance.
Return values:
None

Definition at line 421 of file stm32l4xx_ll_i2c.h.

Referenced by LL_I2C_Init().

__STATIC_INLINE void LL_I2C_DisableAnalogFilter ( I2C_TypeDef *  I2Cx)

Disable Analog Noise Filter.

Note:
This filter can only be programmed when the I2C is disabled (PE = 0).
Reference Manual to LL API cross reference:
CR1 ANFOFF LL_I2C_DisableAnalogFilter
Parameters:
I2CxI2C Instance.
Return values:
None

Definition at line 503 of file stm32l4xx_ll_i2c.h.

__STATIC_INLINE void LL_I2C_DisableClockStretching ( I2C_TypeDef *  I2Cx)

Disable Clock stretching.

Note:
This bit can only be programmed when the I2C is disabled (PE = 0).
Reference Manual to LL API cross reference:
CR1 NOSTRETCH LL_I2C_DisableClockStretching
Parameters:
I2CxI2C Instance.
Return values:
None

Definition at line 632 of file stm32l4xx_ll_i2c.h.

__STATIC_INLINE void LL_I2C_DisableDMAReq_RX ( I2C_TypeDef *  I2Cx)

Disable DMA reception requests.

Reference Manual to LL API cross reference:
CR1 RXDMAEN LL_I2C_DisableDMAReq_RX
Parameters:
I2CxI2C Instance.
Return values:
None

Definition at line 569 of file stm32l4xx_ll_i2c.h.

__STATIC_INLINE void LL_I2C_DisableDMAReq_TX ( I2C_TypeDef *  I2Cx)

Disable DMA transmission requests.

Reference Manual to LL API cross reference:
CR1 TXDMAEN LL_I2C_DisableDMAReq_TX
Parameters:
I2CxI2C Instance.
Return values:
None

Definition at line 536 of file stm32l4xx_ll_i2c.h.

__STATIC_INLINE void LL_I2C_DisableGeneralCall ( I2C_TypeDef *  I2Cx)

Disable General Call.

Note:
When disabled the Address 0x00 is NACKed.
Reference Manual to LL API cross reference:
CR1 GCEN LL_I2C_DisableGeneralCall
Parameters:
I2CxI2C Instance.
Return values:
None

Definition at line 740 of file stm32l4xx_ll_i2c.h.

__STATIC_INLINE void LL_I2C_DisableOwnAddress1 ( I2C_TypeDef *  I2Cx)

Disable acknowledge on Own Address1 match address.

Reference Manual to LL API cross reference:
OAR1 OA1EN LL_I2C_DisableOwnAddress1
Parameters:
I2CxI2C Instance.
Return values:
None

Definition at line 817 of file stm32l4xx_ll_i2c.h.

Referenced by LL_I2C_Init().

__STATIC_INLINE void LL_I2C_DisableOwnAddress2 ( I2C_TypeDef *  I2Cx)

Disable acknowledge on Own Address2 match address.

Reference Manual to LL API cross reference:
OAR2 OA2EN LL_I2C_DisableOwnAddress2
Parameters:
I2CxI2C Instance.
Return values:
None

Definition at line 873 of file stm32l4xx_ll_i2c.h.

__STATIC_INLINE void LL_I2C_DisableSlaveByteControl ( I2C_TypeDef *  I2Cx)

Disable hardware byte control in slave mode.

Reference Manual to LL API cross reference:
CR1 SBC LL_I2C_DisableSlaveByteControl
Parameters:
I2CxI2C Instance.
Return values:
None

Definition at line 665 of file stm32l4xx_ll_i2c.h.

__STATIC_INLINE void LL_I2C_DisableSMBusAlert ( I2C_TypeDef *  I2Cx)

Disable SMBus alert (Host or Device mode)

Note:
Macro IS_SMBUS_ALL_INSTANCE(I2Cx) can be used to check whether or not SMBus feature is supported by the I2Cx Instance.
SMBus Device mode:
  • SMBus Alert pin is not drived (can be used as a standard GPIO) and Alert Response Address Header acknowledge is disabled. SMBus Host mode:
  • SMBus Alert pin management is not supported.
Reference Manual to LL API cross reference:
CR1 ALERTEN LL_I2C_DisableSMBusAlert
Parameters:
I2CxI2C Instance.
Return values:
None

Definition at line 1026 of file stm32l4xx_ll_i2c.h.

__STATIC_INLINE void LL_I2C_DisableSMBusPEC ( I2C_TypeDef *  I2Cx)

Disable SMBus Packet Error Calculation (PEC).

Note:
Macro IS_SMBUS_ALL_INSTANCE(I2Cx) can be used to check whether or not SMBus feature is supported by the I2Cx Instance.
Reference Manual to LL API cross reference:
CR1 PECEN LL_I2C_DisableSMBusPEC
Parameters:
I2CxI2C Instance.
Return values:
None

Definition at line 1065 of file stm32l4xx_ll_i2c.h.

__STATIC_INLINE void LL_I2C_DisableSMBusTimeout ( I2C_TypeDef *  I2Cx,
uint32_t  ClockTimeout 
)

Disable the SMBus Clock Timeout.

Note:
Macro IS_SMBUS_ALL_INSTANCE(I2Cx) can be used to check whether or not SMBus feature is supported by the I2Cx Instance.
Reference Manual to LL API cross reference:
TIMEOUTR TIMOUTEN LL_I2C_DisableSMBusTimeout
TIMEOUTR TEXTEN LL_I2C_DisableSMBusTimeout
Parameters:
I2CxI2C Instance.
ClockTimeoutThis parameter can be one of the following values:
Return values:
None

Definition at line 1225 of file stm32l4xx_ll_i2c.h.

__STATIC_INLINE void LL_I2C_DisableWakeUpFromStop ( I2C_TypeDef *  I2Cx)

Disable Wakeup from STOP.

Note:
Macro IS_I2C_WAKEUP_FROMSTOP_INSTANCE(I2Cx) can be used to check whether or not WakeUpFromStop feature is supported by the I2Cx Instance.
Reference Manual to LL API cross reference:
CR1 WUPEN LL_I2C_DisableWakeUpFromStop
Parameters:
I2CxI2C Instance.
Return values:
None

Definition at line 703 of file stm32l4xx_ll_i2c.h.

__STATIC_INLINE uint32_t LL_I2C_DMA_GetRegAddr ( I2C_TypeDef *  I2Cx,
uint32_t  Direction 
)

Get the data register address used for DMA transfer.

Reference Manual to LL API cross reference:
TXDR TXDATA LL_I2C_DMA_GetRegAddr
RXDR RXDATA LL_I2C_DMA_GetRegAddr
Parameters:
I2CxI2C Instance
DirectionThis parameter can be one of the following values:
Return values:
Addressof data register

Definition at line 595 of file stm32l4xx_ll_i2c.h.

References LL_I2C_DMA_REG_DATA_TRANSMIT.

__STATIC_INLINE void LL_I2C_Enable ( I2C_TypeDef *  I2Cx)

Enable I2C peripheral (PE = 1).

Reference Manual to LL API cross reference:
CR1 PE LL_I2C_Enable
Parameters:
I2CxI2C Instance.
Return values:
None

Definition at line 407 of file stm32l4xx_ll_i2c.h.

Referenced by LL_I2C_Init().

__STATIC_INLINE void LL_I2C_EnableAnalogFilter ( I2C_TypeDef *  I2Cx)

Enable Analog Noise Filter.

Note:
This filter can only be programmed when the I2C is disabled (PE = 0).
Reference Manual to LL API cross reference:
CR1 ANFOFF LL_I2C_EnableAnalogFilter
Parameters:
I2CxI2C Instance.
Return values:
None

Definition at line 491 of file stm32l4xx_ll_i2c.h.

__STATIC_INLINE void LL_I2C_EnableClockStretching ( I2C_TypeDef *  I2Cx)

Enable Clock stretching.

Note:
This bit can only be programmed when the I2C is disabled (PE = 0).
Reference Manual to LL API cross reference:
CR1 NOSTRETCH LL_I2C_EnableClockStretching
Parameters:
I2CxI2C Instance.
Return values:
None

Definition at line 620 of file stm32l4xx_ll_i2c.h.

__STATIC_INLINE void LL_I2C_EnableDMAReq_RX ( I2C_TypeDef *  I2Cx)

Enable DMA reception requests.

Reference Manual to LL API cross reference:
CR1 RXDMAEN LL_I2C_EnableDMAReq_RX
Parameters:
I2CxI2C Instance.
Return values:
None

Definition at line 558 of file stm32l4xx_ll_i2c.h.

__STATIC_INLINE void LL_I2C_EnableDMAReq_TX ( I2C_TypeDef *  I2Cx)

Enable DMA transmission requests.

Reference Manual to LL API cross reference:
CR1 TXDMAEN LL_I2C_EnableDMAReq_TX
Parameters:
I2CxI2C Instance.
Return values:
None

Definition at line 525 of file stm32l4xx_ll_i2c.h.

__STATIC_INLINE void LL_I2C_EnableGeneralCall ( I2C_TypeDef *  I2Cx)

Enable General Call.

Note:
When enabled the Address 0x00 is ACKed.
Reference Manual to LL API cross reference:
CR1 GCEN LL_I2C_EnableGeneralCall
Parameters:
I2CxI2C Instance.
Return values:
None

Definition at line 728 of file stm32l4xx_ll_i2c.h.

__STATIC_INLINE void LL_I2C_EnableOwnAddress1 ( I2C_TypeDef *  I2Cx)

Enable acknowledge on Own Address1 match address.

Reference Manual to LL API cross reference:
OAR1 OA1EN LL_I2C_EnableOwnAddress1
Parameters:
I2CxI2C Instance.
Return values:
None

Definition at line 806 of file stm32l4xx_ll_i2c.h.

Referenced by LL_I2C_Init().

__STATIC_INLINE void LL_I2C_EnableOwnAddress2 ( I2C_TypeDef *  I2Cx)

Enable acknowledge on Own Address2 match address.

Reference Manual to LL API cross reference:
OAR2 OA2EN LL_I2C_EnableOwnAddress2
Parameters:
I2CxI2C Instance.
Return values:
None

Definition at line 862 of file stm32l4xx_ll_i2c.h.

__STATIC_INLINE void LL_I2C_EnableSlaveByteControl ( I2C_TypeDef *  I2Cx)

Enable hardware byte control in slave mode.

Reference Manual to LL API cross reference:
CR1 SBC LL_I2C_EnableSlaveByteControl
Parameters:
I2CxI2C Instance.
Return values:
None

Definition at line 654 of file stm32l4xx_ll_i2c.h.

__STATIC_INLINE void LL_I2C_EnableSMBusAlert ( I2C_TypeDef *  I2Cx)

Enable SMBus alert (Host or Device mode)

Note:
Macro IS_SMBUS_ALL_INSTANCE(I2Cx) can be used to check whether or not SMBus feature is supported by the I2Cx Instance.
SMBus Device mode:
  • SMBus Alert pin is drived low and Alert Response Address Header acknowledge is enabled. SMBus Host mode:
  • SMBus Alert pin management is supported.
Reference Manual to LL API cross reference:
CR1 ALERTEN LL_I2C_EnableSMBusAlert
Parameters:
I2CxI2C Instance.
Return values:
None

Definition at line 1008 of file stm32l4xx_ll_i2c.h.

__STATIC_INLINE void LL_I2C_EnableSMBusPEC ( I2C_TypeDef *  I2Cx)

Enable SMBus Packet Error Calculation (PEC).

Note:
Macro IS_SMBUS_ALL_INSTANCE(I2Cx) can be used to check whether or not SMBus feature is supported by the I2Cx Instance.
Reference Manual to LL API cross reference:
CR1 PECEN LL_I2C_EnableSMBusPEC
Parameters:
I2CxI2C Instance.
Return values:
None

Definition at line 1052 of file stm32l4xx_ll_i2c.h.

__STATIC_INLINE void LL_I2C_EnableSMBusTimeout ( I2C_TypeDef *  I2Cx,
uint32_t  ClockTimeout 
)

Enable the SMBus Clock Timeout.

Note:
Macro IS_SMBUS_ALL_INSTANCE(I2Cx) can be used to check whether or not SMBus feature is supported by the I2Cx Instance.
Reference Manual to LL API cross reference:
TIMEOUTR TIMOUTEN LL_I2C_EnableSMBusTimeout
TIMEOUTR TEXTEN LL_I2C_EnableSMBusTimeout
Parameters:
I2CxI2C Instance.
ClockTimeoutThis parameter can be one of the following values:
Return values:
None

Definition at line 1207 of file stm32l4xx_ll_i2c.h.

__STATIC_INLINE void LL_I2C_EnableWakeUpFromStop ( I2C_TypeDef *  I2Cx)

Enable Wakeup from STOP.

Note:
Macro IS_I2C_WAKEUP_FROMSTOP_INSTANCE(I2Cx) can be used to check whether or not WakeUpFromStop feature is supported by the I2Cx Instance.
This bit can only be programmed when Digital Filter is disabled.
Reference Manual to LL API cross reference:
CR1 WUPEN LL_I2C_EnableWakeUpFromStop
Parameters:
I2CxI2C Instance.
Return values:
None

Definition at line 690 of file stm32l4xx_ll_i2c.h.

__STATIC_INLINE uint32_t LL_I2C_GetClockHighPeriod ( I2C_TypeDef *  I2Cx)

Get the SCL high period setting.

Reference Manual to LL API cross reference:
TIMINGR SCLH LL_I2C_GetClockHighPeriod
Parameters:
I2CxI2C Instance.
Return values:
Valuebetween Min_Data=0x00 and Max_Data=0xFF

Definition at line 931 of file stm32l4xx_ll_i2c.h.

__STATIC_INLINE uint32_t LL_I2C_GetClockLowPeriod ( I2C_TypeDef *  I2Cx)

Get the SCL low period setting.

Reference Manual to LL API cross reference:
TIMINGR SCLL LL_I2C_GetClockLowPeriod
Parameters:
I2CxI2C Instance.
Return values:
Valuebetween Min_Data=0x00 and Max_Data=0xFF

Definition at line 920 of file stm32l4xx_ll_i2c.h.

__STATIC_INLINE uint32_t LL_I2C_GetDataHoldTime ( I2C_TypeDef *  I2Cx)

Get the SDA hold time.

Reference Manual to LL API cross reference:
TIMINGR SDADEL LL_I2C_GetDataHoldTime
Parameters:
I2CxI2C Instance.
Return values:
Valuebetween Min_Data=0x0 and Max_Data=0xF

Definition at line 942 of file stm32l4xx_ll_i2c.h.

__STATIC_INLINE uint32_t LL_I2C_GetDataSetupTime ( I2C_TypeDef *  I2Cx)

Get the SDA setup time.

Reference Manual to LL API cross reference:
TIMINGR SCLDEL LL_I2C_GetDataSetupTime
Parameters:
I2CxI2C Instance.
Return values:
Valuebetween Min_Data=0x0 and Max_Data=0xF

Definition at line 953 of file stm32l4xx_ll_i2c.h.

__STATIC_INLINE uint32_t LL_I2C_GetDigitalFilter ( I2C_TypeDef *  I2Cx)

Get the current Digital Noise Filter configuration.

Reference Manual to LL API cross reference:
CR1 DNF LL_I2C_GetDigitalFilter
Parameters:
I2CxI2C Instance.
Return values:
Valuebetween Min_Data=0x0 and Max_Data=0xF

Definition at line 479 of file stm32l4xx_ll_i2c.h.

__STATIC_INLINE uint32_t LL_I2C_GetMasterAddressingMode ( I2C_TypeDef *  I2Cx)

Get the Master addressing mode.

Reference Manual to LL API cross reference:
CR2 ADD10 LL_I2C_GetMasterAddressingMode
Parameters:
I2CxI2C Instance.
Return values:
Returnedvalue can be one of the following values:

Definition at line 779 of file stm32l4xx_ll_i2c.h.

__STATIC_INLINE uint32_t LL_I2C_GetMode ( I2C_TypeDef *  I2Cx)

Get peripheral mode.

Note:
Macro IS_SMBUS_ALL_INSTANCE(I2Cx) can be used to check whether or not SMBus feature is supported by the I2Cx Instance.
Reference Manual to LL API cross reference:
CR1 SMBHEN LL_I2C_GetMode
CR1 SMBDEN LL_I2C_GetMode
Parameters:
I2CxI2C Instance.
Return values:
Returnedvalue can be one of the following values:

Definition at line 990 of file stm32l4xx_ll_i2c.h.

__STATIC_INLINE uint32_t LL_I2C_GetSMBusTimeoutA ( I2C_TypeDef *  I2Cx)

Get the SMBus Clock TimeoutA setting.

Note:
Macro IS_SMBUS_ALL_INSTANCE(I2Cx) can be used to check whether or not SMBus feature is supported by the I2Cx Instance.
Reference Manual to LL API cross reference:
TIMEOUTR TIMEOUTA LL_I2C_GetSMBusTimeoutA
Parameters:
I2CxI2C Instance.
Return values:
Valuebetween Min_Data=0 and Max_Data=0xFFF

Definition at line 1129 of file stm32l4xx_ll_i2c.h.

__STATIC_INLINE uint32_t LL_I2C_GetSMBusTimeoutAMode ( I2C_TypeDef *  I2Cx)

Get the SMBus Clock TimeoutA mode.

Note:
Macro IS_SMBUS_ALL_INSTANCE(I2Cx) can be used to check whether or not SMBus feature is supported by the I2Cx Instance.
Reference Manual to LL API cross reference:
TIMEOUTR TIDLE LL_I2C_GetSMBusTimeoutAMode
Parameters:
I2CxI2C Instance.
Return values:
Returnedvalue can be one of the following values:

Definition at line 1161 of file stm32l4xx_ll_i2c.h.

__STATIC_INLINE uint32_t LL_I2C_GetSMBusTimeoutB ( I2C_TypeDef *  I2Cx)

Get the SMBus Extented Cumulative Clock TimeoutB setting.

Note:
Macro IS_SMBUS_ALL_INSTANCE(I2Cx) can be used to check whether or not SMBus feature is supported by the I2Cx Instance.
Reference Manual to LL API cross reference:
TIMEOUTR TIMEOUTB LL_I2C_GetSMBusTimeoutB
Parameters:
I2CxI2C Instance.
Return values:
Valuebetween Min_Data=0 and Max_Data=0xFFF

Definition at line 1189 of file stm32l4xx_ll_i2c.h.

__STATIC_INLINE uint32_t LL_I2C_GetTimingPrescaler ( I2C_TypeDef *  I2Cx)

Get the Timing Prescaler setting.

Reference Manual to LL API cross reference:
TIMINGR PRESC LL_I2C_GetTimingPrescaler
Parameters:
I2CxI2C Instance.
Return values:
Valuebetween Min_Data=0x0 and Max_Data=0xF

Definition at line 909 of file stm32l4xx_ll_i2c.h.

__STATIC_INLINE uint32_t LL_I2C_IsEnabled ( I2C_TypeDef *  I2Cx)

Check if the I2C peripheral is enabled or disabled.

Reference Manual to LL API cross reference:
CR1 PE LL_I2C_IsEnabled
Parameters:
I2CxI2C Instance.
Return values:
Stateof bit (1 or 0).

Definition at line 432 of file stm32l4xx_ll_i2c.h.

__STATIC_INLINE uint32_t LL_I2C_IsEnabledAnalogFilter ( I2C_TypeDef *  I2Cx)

Check if Analog Noise Filter is enabled or disabled.

Reference Manual to LL API cross reference:
CR1 ANFOFF LL_I2C_IsEnabledAnalogFilter
Parameters:
I2CxI2C Instance.
Return values:
Stateof bit (1 or 0).

Definition at line 514 of file stm32l4xx_ll_i2c.h.

__STATIC_INLINE uint32_t LL_I2C_IsEnabledClockStretching ( I2C_TypeDef *  I2Cx)

Check if Clock stretching is enabled or disabled.

Reference Manual to LL API cross reference:
CR1 NOSTRETCH LL_I2C_IsEnabledClockStretching
Parameters:
I2CxI2C Instance.
Return values:
Stateof bit (1 or 0).

Definition at line 643 of file stm32l4xx_ll_i2c.h.

__STATIC_INLINE uint32_t LL_I2C_IsEnabledDMAReq_RX ( I2C_TypeDef *  I2Cx)

Check if DMA reception requests are enabled or disabled.

Reference Manual to LL API cross reference:
CR1 RXDMAEN LL_I2C_IsEnabledDMAReq_RX
Parameters:
I2CxI2C Instance.
Return values:
Stateof bit (1 or 0).

Definition at line 580 of file stm32l4xx_ll_i2c.h.

__STATIC_INLINE uint32_t LL_I2C_IsEnabledDMAReq_TX ( I2C_TypeDef *  I2Cx)

Check if DMA transmission requests are enabled or disabled.

Reference Manual to LL API cross reference:
CR1 TXDMAEN LL_I2C_IsEnabledDMAReq_TX
Parameters:
I2CxI2C Instance.
Return values:
Stateof bit (1 or 0).

Definition at line 547 of file stm32l4xx_ll_i2c.h.

__STATIC_INLINE uint32_t LL_I2C_IsEnabledGeneralCall ( I2C_TypeDef *  I2Cx)

Check if General Call is enabled or disabled.

Reference Manual to LL API cross reference:
CR1 GCEN LL_I2C_IsEnabledGeneralCall
Parameters:
I2CxI2C Instance.
Return values:
Stateof bit (1 or 0).

Definition at line 751 of file stm32l4xx_ll_i2c.h.

__STATIC_INLINE uint32_t LL_I2C_IsEnabledOwnAddress1 ( I2C_TypeDef *  I2Cx)

Check if Own Address1 acknowledge is enabled or disabled.

Reference Manual to LL API cross reference:
OAR1 OA1EN LL_I2C_IsEnabledOwnAddress1
Parameters:
I2CxI2C Instance.
Return values:
Stateof bit (1 or 0).

Definition at line 828 of file stm32l4xx_ll_i2c.h.

__STATIC_INLINE uint32_t LL_I2C_IsEnabledOwnAddress2 ( I2C_TypeDef *  I2Cx)

Check if Own Address1 acknowledge is enabled or disabled.

Reference Manual to LL API cross reference:
OAR2 OA2EN LL_I2C_IsEnabledOwnAddress2
Parameters:
I2CxI2C Instance.
Return values:
Stateof bit (1 or 0).

Definition at line 884 of file stm32l4xx_ll_i2c.h.

__STATIC_INLINE uint32_t LL_I2C_IsEnabledSlaveByteControl ( I2C_TypeDef *  I2Cx)

Check if hardware byte control in slave mode is enabled or disabled.

Reference Manual to LL API cross reference:
CR1 SBC LL_I2C_IsEnabledSlaveByteControl
Parameters:
I2CxI2C Instance.
Return values:
Stateof bit (1 or 0).

Definition at line 676 of file stm32l4xx_ll_i2c.h.

__STATIC_INLINE uint32_t LL_I2C_IsEnabledSMBusAlert ( I2C_TypeDef *  I2Cx)

Check if SMBus alert (Host or Device mode) is enabled or disabled.

Note:
Macro IS_SMBUS_ALL_INSTANCE(I2Cx) can be used to check whether or not SMBus feature is supported by the I2Cx Instance.
Reference Manual to LL API cross reference:
CR1 ALERTEN LL_I2C_IsEnabledSMBusAlert
Parameters:
I2CxI2C Instance.
Return values:
Stateof bit (1 or 0).

Definition at line 1039 of file stm32l4xx_ll_i2c.h.

__STATIC_INLINE uint32_t LL_I2C_IsEnabledSMBusPEC ( I2C_TypeDef *  I2Cx)

Check if SMBus Packet Error Calculation (PEC) is enabled or disabled.

Note:
Macro IS_SMBUS_ALL_INSTANCE(I2Cx) can be used to check whether or not SMBus feature is supported by the I2Cx Instance.
Reference Manual to LL API cross reference:
CR1 PECEN LL_I2C_IsEnabledSMBusPEC
Parameters:
I2CxI2C Instance.
Return values:
Stateof bit (1 or 0).

Definition at line 1078 of file stm32l4xx_ll_i2c.h.

__STATIC_INLINE uint32_t LL_I2C_IsEnabledSMBusTimeout ( I2C_TypeDef *  I2Cx,
uint32_t  ClockTimeout 
)

Check if the SMBus Clock Timeout is enabled or disabled.

Note:
Macro IS_SMBUS_ALL_INSTANCE(I2Cx) can be used to check whether or not SMBus feature is supported by the I2Cx Instance.
Reference Manual to LL API cross reference:
TIMEOUTR TIMOUTEN LL_I2C_IsEnabledSMBusTimeout
TIMEOUTR TEXTEN LL_I2C_IsEnabledSMBusTimeout
Parameters:
I2CxI2C Instance.
ClockTimeoutThis parameter can be one of the following values:
Return values:
Stateof bit (1 or 0).

Definition at line 1243 of file stm32l4xx_ll_i2c.h.

__STATIC_INLINE uint32_t LL_I2C_IsEnabledWakeUpFromStop ( I2C_TypeDef *  I2Cx)

Check if Wakeup from STOP is enabled or disabled.

Note:
Macro IS_I2C_WAKEUP_FROMSTOP_INSTANCE(I2Cx) can be used to check whether or not WakeUpFromStop feature is supported by the I2Cx Instance.
Reference Manual to LL API cross reference:
CR1 WUPEN LL_I2C_IsEnabledWakeUpFromStop
Parameters:
I2CxI2C Instance.
Return values:
Stateof bit (1 or 0).

Definition at line 716 of file stm32l4xx_ll_i2c.h.

__STATIC_INLINE void LL_I2C_SetDigitalFilter ( I2C_TypeDef *  I2Cx,
uint32_t  DigitalFilter 
)

Configure Digital Noise Filter.

Note:
If the analog filter is also enabled, the digital filter is added to analog filter. This filter can only be programmed when the I2C is disabled (PE = 0).
Reference Manual to LL API cross reference:
CR1 DNF LL_I2C_SetDigitalFilter
Parameters:
I2CxI2C Instance.
DigitalFilterThis parameter must be a value between Min_Data=0x00 (Digital filter disabled) and Max_Data=0x0F (Digital filter enabled and filtering capability up to 15*ti2cclk). This parameter is used to configure the digital noise filter on SDA and SCL input. The digital filter will filter spikes with a length of up to DNF[3:0]*ti2cclk.
Return values:
None

Definition at line 468 of file stm32l4xx_ll_i2c.h.

__STATIC_INLINE void LL_I2C_SetMasterAddressingMode ( I2C_TypeDef *  I2Cx,
uint32_t  AddressingMode 
)

Configure the Master to operate in 7-bit or 10-bit addressing mode.

Note:
Changing this bit is not allowed, when the START bit is set.
Reference Manual to LL API cross reference:
CR2 ADD10 LL_I2C_SetMasterAddressingMode
Parameters:
I2CxI2C Instance.
AddressingModeThis parameter can be one of the following values:
Return values:
None

Definition at line 766 of file stm32l4xx_ll_i2c.h.

__STATIC_INLINE void LL_I2C_SetMode ( I2C_TypeDef *  I2Cx,
uint32_t  PeripheralMode 
)

Configure peripheral mode.

Note:
Macro IS_SMBUS_ALL_INSTANCE(I2Cx) can be used to check whether or not SMBus feature is supported by the I2Cx Instance.
Reference Manual to LL API cross reference:
CR1 SMBHEN LL_I2C_SetMode
CR1 SMBDEN LL_I2C_SetMode
Parameters:
I2CxI2C Instance.
PeripheralModeThis parameter can be one of the following values:
Return values:
None

Definition at line 972 of file stm32l4xx_ll_i2c.h.

Referenced by LL_I2C_Init().

__STATIC_INLINE void LL_I2C_SetOwnAddress1 ( I2C_TypeDef *  I2Cx,
uint32_t  OwnAddress1,
uint32_t  OwnAddrSize 
)

Set the Own Address1.

Reference Manual to LL API cross reference:
OAR1 OA1 LL_I2C_SetOwnAddress1
OAR1 OA1MODE LL_I2C_SetOwnAddress1
Parameters:
I2CxI2C Instance.
OwnAddress1This parameter must be a value between Min_Data=0 and Max_Data=0x3FF.
OwnAddrSizeThis parameter can be one of the following values:
Return values:
None

Definition at line 795 of file stm32l4xx_ll_i2c.h.

Referenced by LL_I2C_Init().

__STATIC_INLINE void LL_I2C_SetOwnAddress2 ( I2C_TypeDef *  I2Cx,
uint32_t  OwnAddress2,
uint32_t  OwnAddrMask 
)

Set the 7bits Own Address2.

Note:
This action has no effect if own address2 is enabled.
Reference Manual to LL API cross reference:
OAR2 OA2 LL_I2C_SetOwnAddress2
OAR2 OA2MSK LL_I2C_SetOwnAddress2
Parameters:
I2CxI2C Instance.
OwnAddress2Value between Min_Data=0 and Max_Data=0x7F.
OwnAddrMaskThis parameter can be one of the following values:
Return values:
None

Definition at line 851 of file stm32l4xx_ll_i2c.h.

__STATIC_INLINE void LL_I2C_SetSMBusTimeoutA ( I2C_TypeDef *  I2Cx,
uint32_t  TimeoutA 
)

Configure the SMBus Clock TimeoutA (SCL low timeout or SCL and SDA high timeout depends on TimeoutA mode).

Note:
Macro IS_SMBUS_ALL_INSTANCE(I2Cx) can be used to check whether or not SMBus feature is supported by the I2Cx Instance.
These bits can only be programmed when TimeoutA is disabled.
Reference Manual to LL API cross reference:
TIMEOUTR TIMEOUTA LL_I2C_SetSMBusTimeoutA
Parameters:
I2CxI2C Instance.
TimeoutAThis parameter must be a value between Min_Data=0 and Max_Data=0xFFF.
Return values:
None

Definition at line 1116 of file stm32l4xx_ll_i2c.h.

__STATIC_INLINE void LL_I2C_SetSMBusTimeoutAMode ( I2C_TypeDef *  I2Cx,
uint32_t  TimeoutAMode 
)

Set the SMBus Clock TimeoutA mode.

Note:
Macro IS_SMBUS_ALL_INSTANCE(I2Cx) can be used to check whether or not SMBus feature is supported by the I2Cx Instance.
This bit can only be programmed when TimeoutA is disabled.
Reference Manual to LL API cross reference:
TIMEOUTR TIDLE LL_I2C_SetSMBusTimeoutAMode
Parameters:
I2CxI2C Instance.
TimeoutAModeThis parameter can be one of the following values:
Return values:
None

Definition at line 1146 of file stm32l4xx_ll_i2c.h.

__STATIC_INLINE void LL_I2C_SetSMBusTimeoutB ( I2C_TypeDef *  I2Cx,
uint32_t  TimeoutB 
)

Configure the SMBus Extended Cumulative Clock TimeoutB (Master or Slave mode).

Note:
Macro IS_SMBUS_ALL_INSTANCE(I2Cx) can be used to check whether or not SMBus feature is supported by the I2Cx Instance.
These bits can only be programmed when TimeoutB is disabled.
Reference Manual to LL API cross reference:
TIMEOUTR TIMEOUTB LL_I2C_SetSMBusTimeoutB
Parameters:
I2CxI2C Instance.
TimeoutBThis parameter must be a value between Min_Data=0 and Max_Data=0xFFF.
Return values:
None

Definition at line 1176 of file stm32l4xx_ll_i2c.h.

__STATIC_INLINE void LL_I2C_SetTiming ( I2C_TypeDef *  I2Cx,
uint32_t  Timing 
)

Configure the SDA setup, hold time and the SCL high, low period.

Note:
This bit can only be programmed when the I2C is disabled (PE = 0).
Reference Manual to LL API cross reference:
TIMINGR TIMINGR LL_I2C_SetTiming
Parameters:
I2CxI2C Instance.
TimingThis parameter must be a value between Min_Data=0 and Max_Data=0xFFFFFFFF.
Note:
This parameter is computed with the STM32CubeMX Tool.
Return values:
None

Definition at line 898 of file stm32l4xx_ll_i2c.h.

Referenced by LL_I2C_Init().