STM32F4xx_HAL_Driver  1.8.3
+ Collaboration diagram for Configuration:

Functions

__STATIC_INLINE void LL_I2C_Enable (I2C_TypeDef *I2Cx)
 Enable I2C peripheral (PE = 1). @rmtoll CR1 PE LL_I2C_Enable. More...
 
__STATIC_INLINE void LL_I2C_Disable (I2C_TypeDef *I2Cx)
 Disable I2C peripheral (PE = 0). @rmtoll CR1 PE LL_I2C_Disable. More...
 
__STATIC_INLINE uint32_t LL_I2C_IsEnabled (I2C_TypeDef *I2Cx)
 Check if the I2C peripheral is enabled or disabled. @rmtoll CR1 PE LL_I2C_IsEnabled. More...
 
__STATIC_INLINE void LL_I2C_ConfigFilters (I2C_TypeDef *I2Cx, uint32_t AnalogFilter, uint32_t DigitalFilter)
 Configure Noise Filters (Analog and Digital). More...
 
__STATIC_INLINE void LL_I2C_SetDigitalFilter (I2C_TypeDef *I2Cx, uint32_t DigitalFilter)
 Configure Digital Noise Filter. More...
 
__STATIC_INLINE uint32_t LL_I2C_GetDigitalFilter (I2C_TypeDef *I2Cx)
 Get the current Digital Noise Filter configuration. @rmtoll FLTR DNF LL_I2C_GetDigitalFilter. More...
 
__STATIC_INLINE void LL_I2C_EnableAnalogFilter (I2C_TypeDef *I2Cx)
 Enable Analog Noise Filter. More...
 
__STATIC_INLINE void LL_I2C_DisableAnalogFilter (I2C_TypeDef *I2Cx)
 Disable Analog Noise Filter. More...
 
__STATIC_INLINE uint32_t LL_I2C_IsEnabledAnalogFilter (I2C_TypeDef *I2Cx)
 Check if Analog Noise Filter is enabled or disabled. @rmtoll FLTR ANOFF LL_I2C_IsEnabledAnalogFilter. More...
 
__STATIC_INLINE void LL_I2C_EnableDMAReq_TX (I2C_TypeDef *I2Cx)
 Enable DMA transmission requests. @rmtoll CR2 DMAEN LL_I2C_EnableDMAReq_TX. More...
 
__STATIC_INLINE void LL_I2C_DisableDMAReq_TX (I2C_TypeDef *I2Cx)
 Disable DMA transmission requests. @rmtoll CR2 DMAEN LL_I2C_DisableDMAReq_TX. More...
 
__STATIC_INLINE uint32_t LL_I2C_IsEnabledDMAReq_TX (I2C_TypeDef *I2Cx)
 Check if DMA transmission requests are enabled or disabled. @rmtoll CR2 DMAEN LL_I2C_IsEnabledDMAReq_TX. More...
 
__STATIC_INLINE void LL_I2C_EnableDMAReq_RX (I2C_TypeDef *I2Cx)
 Enable DMA reception requests. @rmtoll CR2 DMAEN LL_I2C_EnableDMAReq_RX. More...
 
__STATIC_INLINE void LL_I2C_DisableDMAReq_RX (I2C_TypeDef *I2Cx)
 Disable DMA reception requests. @rmtoll CR2 DMAEN LL_I2C_DisableDMAReq_RX. More...
 
__STATIC_INLINE uint32_t LL_I2C_IsEnabledDMAReq_RX (I2C_TypeDef *I2Cx)
 Check if DMA reception requests are enabled or disabled. @rmtoll CR2 DMAEN LL_I2C_IsEnabledDMAReq_RX. More...
 
__STATIC_INLINE uint32_t LL_I2C_DMA_GetRegAddr (I2C_TypeDef *I2Cx)
 Get the data register address used for DMA transfer. @rmtoll DR DR LL_I2C_DMA_GetRegAddr. More...
 
__STATIC_INLINE void LL_I2C_EnableClockStretching (I2C_TypeDef *I2Cx)
 Enable Clock stretching. More...
 
__STATIC_INLINE void LL_I2C_DisableClockStretching (I2C_TypeDef *I2Cx)
 Disable Clock stretching. More...
 
__STATIC_INLINE uint32_t LL_I2C_IsEnabledClockStretching (I2C_TypeDef *I2Cx)
 Check if Clock stretching is enabled or disabled. @rmtoll CR1 NOSTRETCH LL_I2C_IsEnabledClockStretching. More...
 
__STATIC_INLINE void LL_I2C_EnableGeneralCall (I2C_TypeDef *I2Cx)
 Enable General Call. More...
 
__STATIC_INLINE void LL_I2C_DisableGeneralCall (I2C_TypeDef *I2Cx)
 Disable General Call. More...
 
__STATIC_INLINE uint32_t LL_I2C_IsEnabledGeneralCall (I2C_TypeDef *I2Cx)
 Check if General Call is enabled or disabled. @rmtoll CR1 ENGC LL_I2C_IsEnabledGeneralCall. More...
 
__STATIC_INLINE void LL_I2C_SetOwnAddress1 (I2C_TypeDef *I2Cx, uint32_t OwnAddress1, uint32_t OwnAddrSize)
 Set the Own Address1. @rmtoll OAR1 ADD0 LL_I2C_SetOwnAddress1
OAR1 ADD1_7 LL_I2C_SetOwnAddress1
OAR1 ADD8_9 LL_I2C_SetOwnAddress1
OAR1 ADDMODE LL_I2C_SetOwnAddress1. More...
 
__STATIC_INLINE void LL_I2C_SetOwnAddress2 (I2C_TypeDef *I2Cx, uint32_t OwnAddress2)
 Set the 7bits Own Address2. More...
 
__STATIC_INLINE void LL_I2C_EnableOwnAddress2 (I2C_TypeDef *I2Cx)
 Enable acknowledge on Own Address2 match address. @rmtoll OAR2 ENDUAL LL_I2C_EnableOwnAddress2. More...
 
__STATIC_INLINE void LL_I2C_DisableOwnAddress2 (I2C_TypeDef *I2Cx)
 Disable acknowledge on Own Address2 match address. @rmtoll OAR2 ENDUAL LL_I2C_DisableOwnAddress2. More...
 
__STATIC_INLINE uint32_t LL_I2C_IsEnabledOwnAddress2 (I2C_TypeDef *I2Cx)
 Check if Own Address1 acknowledge is enabled or disabled. @rmtoll OAR2 ENDUAL LL_I2C_IsEnabledOwnAddress2. More...
 
__STATIC_INLINE void LL_I2C_SetPeriphClock (I2C_TypeDef *I2Cx, uint32_t PeriphClock)
 Configure the Peripheral clock frequency. @rmtoll CR2 FREQ LL_I2C_SetPeriphClock. More...
 
__STATIC_INLINE uint32_t LL_I2C_GetPeriphClock (I2C_TypeDef *I2Cx)
 Get the Peripheral clock frequency. @rmtoll CR2 FREQ LL_I2C_GetPeriphClock. More...
 
__STATIC_INLINE void LL_I2C_SetDutyCycle (I2C_TypeDef *I2Cx, uint32_t DutyCycle)
 Configure the Duty cycle (Fast mode only). @rmtoll CCR DUTY LL_I2C_SetDutyCycle. More...
 
__STATIC_INLINE uint32_t LL_I2C_GetDutyCycle (I2C_TypeDef *I2Cx)
 Get the Duty cycle (Fast mode only). @rmtoll CCR DUTY LL_I2C_GetDutyCycle. More...
 
__STATIC_INLINE void LL_I2C_SetClockSpeedMode (I2C_TypeDef *I2Cx, uint32_t ClockSpeedMode)
 Configure the I2C master clock speed mode. @rmtoll CCR FS LL_I2C_SetClockSpeedMode. More...
 
__STATIC_INLINE uint32_t LL_I2C_GetClockSpeedMode (I2C_TypeDef *I2Cx)
 Get the the I2C master speed mode. @rmtoll CCR FS LL_I2C_GetClockSpeedMode. More...
 
__STATIC_INLINE void LL_I2C_SetRiseTime (I2C_TypeDef *I2Cx, uint32_t RiseTime)
 Configure the SCL, SDA rising time. More...
 
__STATIC_INLINE uint32_t LL_I2C_GetRiseTime (I2C_TypeDef *I2Cx)
 Get the SCL, SDA rising time. @rmtoll TRISE TRISE LL_I2C_GetRiseTime. More...
 
__STATIC_INLINE void LL_I2C_SetClockPeriod (I2C_TypeDef *I2Cx, uint32_t ClockPeriod)
 Configure the SCL high and low period. More...
 
__STATIC_INLINE uint32_t LL_I2C_GetClockPeriod (I2C_TypeDef *I2Cx)
 Get the SCL high and low period. @rmtoll CCR CCR LL_I2C_GetClockPeriod. More...
 
__STATIC_INLINE void LL_I2C_ConfigSpeed (I2C_TypeDef *I2Cx, uint32_t PeriphClock, uint32_t ClockSpeed, uint32_t DutyCycle)
 Configure the SCL speed. More...
 
__STATIC_INLINE void LL_I2C_SetMode (I2C_TypeDef *I2Cx, uint32_t PeripheralMode)
 Configure peripheral mode. More...
 
__STATIC_INLINE uint32_t LL_I2C_GetMode (I2C_TypeDef *I2Cx)
 Get peripheral mode. More...
 
__STATIC_INLINE void LL_I2C_EnableSMBusAlert (I2C_TypeDef *I2Cx)
 Enable SMBus alert (Host or Device mode) More...
 
__STATIC_INLINE void LL_I2C_DisableSMBusAlert (I2C_TypeDef *I2Cx)
 Disable SMBus alert (Host or Device mode) More...
 
__STATIC_INLINE uint32_t LL_I2C_IsEnabledSMBusAlert (I2C_TypeDef *I2Cx)
 Check if SMBus alert (Host or Device mode) is enabled or disabled. More...
 
__STATIC_INLINE void LL_I2C_EnableSMBusPEC (I2C_TypeDef *I2Cx)
 Enable SMBus Packet Error Calculation (PEC). More...
 
__STATIC_INLINE void LL_I2C_DisableSMBusPEC (I2C_TypeDef *I2Cx)
 Disable SMBus Packet Error Calculation (PEC). More...
 
__STATIC_INLINE uint32_t LL_I2C_IsEnabledSMBusPEC (I2C_TypeDef *I2Cx)
 Check if SMBus Packet Error Calculation (PEC) is enabled or disabled. More...
 

Detailed Description

Function Documentation

◆ LL_I2C_ConfigFilters()

__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). @rmtoll FLTR ANOFF LL_I2C_ConfigFilters
FLTR DNF LL_I2C_ConfigFilters
Parameters
I2CxI2C Instance.
AnalogFilterThis parameter can be one of the following values:
  • LL_I2C_ANALOGFILTER_ENABLE
  • LL_I2C_ANALOGFILTER_DISABLE
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*TPCLK1) This parameter is used to configure the digital noise filter on SDA and SCL input. The digital filter will suppress the spikes with a length of up to DNF[3:0]*TPCLK1.
Return values
None

Definition at line 413 of file stm32f4xx_ll_i2c.h.

◆ LL_I2C_ConfigSpeed()

__STATIC_INLINE void LL_I2C_ConfigSpeed ( I2C_TypeDef *  I2Cx,
uint32_t  PeriphClock,
uint32_t  ClockSpeed,
uint32_t  DutyCycle 
)

Configure the SCL speed.

Note
This bit can only be programmed when the I2C is disabled (PE = 0). @rmtoll CR2 FREQ LL_I2C_ConfigSpeed
TRISE TRISE LL_I2C_ConfigSpeed
CCR FS LL_I2C_ConfigSpeed
CCR DUTY LL_I2C_ConfigSpeed
CCR CCR LL_I2C_ConfigSpeed
Parameters
I2CxI2C Instance.
PeriphClockPeripheral Clock (in Hz)
ClockSpeedThis parameter must be a value lower than 400kHz (in Hz).
DutyCycleThis parameter can be one of the following values:
  • LL_I2C_DUTYCYCLE_2
  • LL_I2C_DUTYCYCLE_16_9
Return values
None

Definition at line 836 of file stm32f4xx_ll_i2c.h.

◆ LL_I2C_Disable()

__STATIC_INLINE void LL_I2C_Disable ( I2C_TypeDef *  I2Cx)

Disable I2C peripheral (PE = 0). @rmtoll CR1 PE LL_I2C_Disable.

Parameters
I2CxI2C Instance.
Return values
None

Definition at line 382 of file stm32f4xx_ll_i2c.h.

◆ LL_I2C_DisableAnalogFilter()

__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). @rmtoll FLTR ANOFF LL_I2C_DisableAnalogFilter
Parameters
I2CxI2C Instance.
Return values
None

Definition at line 467 of file stm32f4xx_ll_i2c.h.

◆ LL_I2C_DisableClockStretching()

__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). @rmtoll CR1 NOSTRETCH LL_I2C_DisableClockStretching
Parameters
I2CxI2C Instance.
Return values
None

Definition at line 580 of file stm32f4xx_ll_i2c.h.

◆ LL_I2C_DisableDMAReq_RX()

__STATIC_INLINE void LL_I2C_DisableDMAReq_RX ( I2C_TypeDef *  I2Cx)

Disable DMA reception requests. @rmtoll CR2 DMAEN LL_I2C_DisableDMAReq_RX.

Parameters
I2CxI2C Instance.
Return values
None

Definition at line 534 of file stm32f4xx_ll_i2c.h.

◆ LL_I2C_DisableDMAReq_TX()

__STATIC_INLINE void LL_I2C_DisableDMAReq_TX ( I2C_TypeDef *  I2Cx)

Disable DMA transmission requests. @rmtoll CR2 DMAEN LL_I2C_DisableDMAReq_TX.

Parameters
I2CxI2C Instance.
Return values
None

Definition at line 501 of file stm32f4xx_ll_i2c.h.

◆ LL_I2C_DisableGeneralCall()

__STATIC_INLINE void LL_I2C_DisableGeneralCall ( I2C_TypeDef *  I2Cx)

Disable General Call.

Note
When disabled the Address 0x00 is NACKed. @rmtoll CR1 ENGC LL_I2C_DisableGeneralCall
Parameters
I2CxI2C Instance.
Return values
None

Definition at line 615 of file stm32f4xx_ll_i2c.h.

◆ LL_I2C_DisableOwnAddress2()

__STATIC_INLINE void LL_I2C_DisableOwnAddress2 ( I2C_TypeDef *  I2Cx)

Disable acknowledge on Own Address2 match address. @rmtoll OAR2 ENDUAL LL_I2C_DisableOwnAddress2.

Parameters
I2CxI2C Instance.
Return values
None

Definition at line 679 of file stm32f4xx_ll_i2c.h.

◆ LL_I2C_DisableSMBusAlert()

__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. @rmtoll CR1 ALERT LL_I2C_DisableSMBusAlert
Parameters
I2CxI2C Instance.
Return values
None

Definition at line 940 of file stm32f4xx_ll_i2c.h.

◆ LL_I2C_DisableSMBusPEC()

__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. @rmtoll CR1 ENPEC LL_I2C_DisableSMBusPEC
Parameters
I2CxI2C Instance.
Return values
None

Definition at line 979 of file stm32f4xx_ll_i2c.h.

◆ LL_I2C_DMA_GetRegAddr()

__STATIC_INLINE uint32_t LL_I2C_DMA_GetRegAddr ( I2C_TypeDef *  I2Cx)

Get the data register address used for DMA transfer. @rmtoll DR DR LL_I2C_DMA_GetRegAddr.

Parameters
I2CxI2C Instance.
Return values
Addressof data register

Definition at line 556 of file stm32f4xx_ll_i2c.h.

◆ LL_I2C_Enable()

__STATIC_INLINE void LL_I2C_Enable ( I2C_TypeDef *  I2Cx)

Enable I2C peripheral (PE = 1). @rmtoll CR1 PE LL_I2C_Enable.

Parameters
I2CxI2C Instance.
Return values
None

Definition at line 371 of file stm32f4xx_ll_i2c.h.

◆ LL_I2C_EnableAnalogFilter()

__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). @rmtoll FLTR ANOFF LL_I2C_EnableAnalogFilter
Parameters
I2CxI2C Instance.
Return values
None

Definition at line 455 of file stm32f4xx_ll_i2c.h.

◆ LL_I2C_EnableClockStretching()

__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). @rmtoll CR1 NOSTRETCH LL_I2C_EnableClockStretching
Parameters
I2CxI2C Instance.
Return values
None

Definition at line 568 of file stm32f4xx_ll_i2c.h.

◆ LL_I2C_EnableDMAReq_RX()

__STATIC_INLINE void LL_I2C_EnableDMAReq_RX ( I2C_TypeDef *  I2Cx)

Enable DMA reception requests. @rmtoll CR2 DMAEN LL_I2C_EnableDMAReq_RX.

Parameters
I2CxI2C Instance.
Return values
None

Definition at line 523 of file stm32f4xx_ll_i2c.h.

◆ LL_I2C_EnableDMAReq_TX()

__STATIC_INLINE void LL_I2C_EnableDMAReq_TX ( I2C_TypeDef *  I2Cx)

Enable DMA transmission requests. @rmtoll CR2 DMAEN LL_I2C_EnableDMAReq_TX.

Parameters
I2CxI2C Instance.
Return values
None

Definition at line 490 of file stm32f4xx_ll_i2c.h.

◆ LL_I2C_EnableGeneralCall()

__STATIC_INLINE void LL_I2C_EnableGeneralCall ( I2C_TypeDef *  I2Cx)

Enable General Call.

Note
When enabled the Address 0x00 is ACKed. @rmtoll CR1 ENGC LL_I2C_EnableGeneralCall
Parameters
I2CxI2C Instance.
Return values
None

Definition at line 603 of file stm32f4xx_ll_i2c.h.

◆ LL_I2C_EnableOwnAddress2()

__STATIC_INLINE void LL_I2C_EnableOwnAddress2 ( I2C_TypeDef *  I2Cx)

Enable acknowledge on Own Address2 match address. @rmtoll OAR2 ENDUAL LL_I2C_EnableOwnAddress2.

Parameters
I2CxI2C Instance.
Return values
None

Definition at line 668 of file stm32f4xx_ll_i2c.h.

◆ LL_I2C_EnableSMBusAlert()

__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. @rmtoll CR1 ALERT LL_I2C_EnableSMBusAlert
Parameters
I2CxI2C Instance.
Return values
None

Definition at line 922 of file stm32f4xx_ll_i2c.h.

◆ LL_I2C_EnableSMBusPEC()

__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. @rmtoll CR1 ENPEC LL_I2C_EnableSMBusPEC
Parameters
I2CxI2C Instance.
Return values
None

Definition at line 966 of file stm32f4xx_ll_i2c.h.

◆ LL_I2C_GetClockPeriod()

__STATIC_INLINE uint32_t LL_I2C_GetClockPeriod ( I2C_TypeDef *  I2Cx)

Get the SCL high and low period. @rmtoll CCR CCR LL_I2C_GetClockPeriod.

Parameters
I2CxI2C Instance.
Return values
Valuebetween Min_Data=0x004 and Max_Data=0xFFF, except in FAST DUTY mode where Min_Data=0x001.

Definition at line 815 of file stm32f4xx_ll_i2c.h.

◆ LL_I2C_GetClockSpeedMode()

__STATIC_INLINE uint32_t LL_I2C_GetClockSpeedMode ( I2C_TypeDef *  I2Cx)

Get the the I2C master speed mode. @rmtoll CCR FS LL_I2C_GetClockSpeedMode.

Parameters
I2CxI2C Instance.
Return values
Returnedvalue can be one of the following values:
  • LL_I2C_CLOCK_SPEED_STANDARD_MODE
  • LL_I2C_CLOCK_SPEED_FAST_MODE

Definition at line 767 of file stm32f4xx_ll_i2c.h.

◆ LL_I2C_GetDigitalFilter()

__STATIC_INLINE uint32_t LL_I2C_GetDigitalFilter ( I2C_TypeDef *  I2Cx)

Get the current Digital Noise Filter configuration. @rmtoll FLTR DNF LL_I2C_GetDigitalFilter.

Parameters
I2CxI2C Instance.
Return values
Valuebetween Min_Data=0x0 and Max_Data=0xF

Definition at line 441 of file stm32f4xx_ll_i2c.h.

◆ LL_I2C_GetDutyCycle()

__STATIC_INLINE uint32_t LL_I2C_GetDutyCycle ( I2C_TypeDef *  I2Cx)

Get the Duty cycle (Fast mode only). @rmtoll CCR DUTY LL_I2C_GetDutyCycle.

Parameters
I2CxI2C Instance.
Return values
Returnedvalue can be one of the following values:
  • LL_I2C_DUTYCYCLE_2
  • LL_I2C_DUTYCYCLE_16_9

Definition at line 740 of file stm32f4xx_ll_i2c.h.

◆ LL_I2C_GetMode()

__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. @rmtoll CR1 SMBUS LL_I2C_GetMode
CR1 SMBTYPE LL_I2C_GetMode
CR1 ENARP LL_I2C_GetMode
Parameters
I2CxI2C Instance.
Return values
Returnedvalue can be one of the following values:
  • LL_I2C_MODE_I2C
  • LL_I2C_MODE_SMBUS_HOST
  • LL_I2C_MODE_SMBUS_DEVICE
  • LL_I2C_MODE_SMBUS_DEVICE_ARP

Definition at line 904 of file stm32f4xx_ll_i2c.h.

◆ LL_I2C_GetPeriphClock()

__STATIC_INLINE uint32_t LL_I2C_GetPeriphClock ( I2C_TypeDef *  I2Cx)

Get the Peripheral clock frequency. @rmtoll CR2 FREQ LL_I2C_GetPeriphClock.

Parameters
I2CxI2C Instance.
Return values
Valueof Peripheral Clock (in Hz)

Definition at line 713 of file stm32f4xx_ll_i2c.h.

◆ LL_I2C_GetRiseTime()

__STATIC_INLINE uint32_t LL_I2C_GetRiseTime ( I2C_TypeDef *  I2Cx)

Get the SCL, SDA rising time. @rmtoll TRISE TRISE LL_I2C_GetRiseTime.

Parameters
I2CxI2C Instance.
Return values
Valuebetween Min_Data=0x02 and Max_Data=0x3F

Definition at line 791 of file stm32f4xx_ll_i2c.h.

◆ LL_I2C_IsEnabled()

__STATIC_INLINE uint32_t LL_I2C_IsEnabled ( I2C_TypeDef *  I2Cx)

Check if the I2C peripheral is enabled or disabled. @rmtoll CR1 PE LL_I2C_IsEnabled.

Parameters
I2CxI2C Instance.
Return values
Stateof bit (1 or 0).

Definition at line 393 of file stm32f4xx_ll_i2c.h.

◆ LL_I2C_IsEnabledAnalogFilter()

__STATIC_INLINE uint32_t LL_I2C_IsEnabledAnalogFilter ( I2C_TypeDef *  I2Cx)

Check if Analog Noise Filter is enabled or disabled. @rmtoll FLTR ANOFF LL_I2C_IsEnabledAnalogFilter.

Parameters
I2CxI2C Instance.
Return values
Stateof bit (1 or 0).

Definition at line 478 of file stm32f4xx_ll_i2c.h.

◆ LL_I2C_IsEnabledClockStretching()

__STATIC_INLINE uint32_t LL_I2C_IsEnabledClockStretching ( I2C_TypeDef *  I2Cx)

Check if Clock stretching is enabled or disabled. @rmtoll CR1 NOSTRETCH LL_I2C_IsEnabledClockStretching.

Parameters
I2CxI2C Instance.
Return values
Stateof bit (1 or 0).

Definition at line 591 of file stm32f4xx_ll_i2c.h.

◆ LL_I2C_IsEnabledDMAReq_RX()

__STATIC_INLINE uint32_t LL_I2C_IsEnabledDMAReq_RX ( I2C_TypeDef *  I2Cx)

Check if DMA reception requests are enabled or disabled. @rmtoll CR2 DMAEN LL_I2C_IsEnabledDMAReq_RX.

Parameters
I2CxI2C Instance.
Return values
Stateof bit (1 or 0).

Definition at line 545 of file stm32f4xx_ll_i2c.h.

◆ LL_I2C_IsEnabledDMAReq_TX()

__STATIC_INLINE uint32_t LL_I2C_IsEnabledDMAReq_TX ( I2C_TypeDef *  I2Cx)

Check if DMA transmission requests are enabled or disabled. @rmtoll CR2 DMAEN LL_I2C_IsEnabledDMAReq_TX.

Parameters
I2CxI2C Instance.
Return values
Stateof bit (1 or 0).

Definition at line 512 of file stm32f4xx_ll_i2c.h.

◆ LL_I2C_IsEnabledGeneralCall()

__STATIC_INLINE uint32_t LL_I2C_IsEnabledGeneralCall ( I2C_TypeDef *  I2Cx)

Check if General Call is enabled or disabled. @rmtoll CR1 ENGC LL_I2C_IsEnabledGeneralCall.

Parameters
I2CxI2C Instance.
Return values
Stateof bit (1 or 0).

Definition at line 626 of file stm32f4xx_ll_i2c.h.

◆ LL_I2C_IsEnabledOwnAddress2()

__STATIC_INLINE uint32_t LL_I2C_IsEnabledOwnAddress2 ( I2C_TypeDef *  I2Cx)

Check if Own Address1 acknowledge is enabled or disabled. @rmtoll OAR2 ENDUAL LL_I2C_IsEnabledOwnAddress2.

Parameters
I2CxI2C Instance.
Return values
Stateof bit (1 or 0).

Definition at line 690 of file stm32f4xx_ll_i2c.h.

◆ LL_I2C_IsEnabledSMBusAlert()

__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. @rmtoll CR1 ALERT LL_I2C_IsEnabledSMBusAlert
Parameters
I2CxI2C Instance.
Return values
Stateof bit (1 or 0).

Definition at line 953 of file stm32f4xx_ll_i2c.h.

◆ LL_I2C_IsEnabledSMBusPEC()

__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. @rmtoll CR1 ENPEC LL_I2C_IsEnabledSMBusPEC
Parameters
I2CxI2C Instance.
Return values
Stateof bit (1 or 0).

Definition at line 992 of file stm32f4xx_ll_i2c.h.

◆ LL_I2C_SetClockPeriod()

__STATIC_INLINE void LL_I2C_SetClockPeriod ( I2C_TypeDef *  I2Cx,
uint32_t  ClockPeriod 
)

Configure the SCL high and low period.

Note
This bit can only be programmed when the I2C is disabled (PE = 0). @rmtoll CCR CCR LL_I2C_SetClockPeriod
Parameters
I2CxI2C Instance.
ClockPeriodThis parameter must be a value between Min_Data=0x004 and Max_Data=0xFFF, except in FAST DUTY mode where Min_Data=0x001.
Return values
None

Definition at line 804 of file stm32f4xx_ll_i2c.h.

◆ LL_I2C_SetClockSpeedMode()

__STATIC_INLINE void LL_I2C_SetClockSpeedMode ( I2C_TypeDef *  I2Cx,
uint32_t  ClockSpeedMode 
)

Configure the I2C master clock speed mode. @rmtoll CCR FS LL_I2C_SetClockSpeedMode.

Parameters
I2CxI2C Instance.
ClockSpeedModeThis parameter can be one of the following values:
  • LL_I2C_CLOCK_SPEED_STANDARD_MODE
  • LL_I2C_CLOCK_SPEED_FAST_MODE
Return values
None

Definition at line 754 of file stm32f4xx_ll_i2c.h.

◆ LL_I2C_SetDigitalFilter()

__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). @rmtoll FLTR 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*TPCLK1) This parameter is used to configure the digital noise filter on SDA and SCL input. The digital filter will suppress the spikes with a length of up to DNF[3:0]*TPCLK1.
Return values
None

Definition at line 430 of file stm32f4xx_ll_i2c.h.

◆ LL_I2C_SetDutyCycle()

__STATIC_INLINE void LL_I2C_SetDutyCycle ( I2C_TypeDef *  I2Cx,
uint32_t  DutyCycle 
)

Configure the Duty cycle (Fast mode only). @rmtoll CCR DUTY LL_I2C_SetDutyCycle.

Parameters
I2CxI2C Instance.
DutyCycleThis parameter can be one of the following values:
  • LL_I2C_DUTYCYCLE_2
  • LL_I2C_DUTYCYCLE_16_9
Return values
None

Definition at line 727 of file stm32f4xx_ll_i2c.h.

◆ LL_I2C_SetMode()

__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. @rmtoll CR1 SMBUS LL_I2C_SetMode
CR1 SMBTYPE LL_I2C_SetMode
CR1 ENARP LL_I2C_SetMode
Parameters
I2CxI2C Instance.
PeripheralModeThis parameter can be one of the following values:
  • LL_I2C_MODE_I2C
  • LL_I2C_MODE_SMBUS_HOST
  • LL_I2C_MODE_SMBUS_DEVICE
  • LL_I2C_MODE_SMBUS_DEVICE_ARP
Return values
None

Definition at line 885 of file stm32f4xx_ll_i2c.h.

◆ LL_I2C_SetOwnAddress1()

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

Set the Own Address1. @rmtoll OAR1 ADD0 LL_I2C_SetOwnAddress1
OAR1 ADD1_7 LL_I2C_SetOwnAddress1
OAR1 ADD8_9 LL_I2C_SetOwnAddress1
OAR1 ADDMODE 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:
  • LL_I2C_OWNADDRESS1_7BIT
  • LL_I2C_OWNADDRESS1_10BIT
Return values
None

Definition at line 644 of file stm32f4xx_ll_i2c.h.

◆ LL_I2C_SetOwnAddress2()

__STATIC_INLINE void LL_I2C_SetOwnAddress2 ( I2C_TypeDef *  I2Cx,
uint32_t  OwnAddress2 
)

Set the 7bits Own Address2.

Note
This action has no effect if own address2 is enabled. @rmtoll OAR2 ADD2 LL_I2C_SetOwnAddress2
Parameters
I2CxI2C Instance.
OwnAddress2This parameter must be a value between Min_Data=0 and Max_Data=0x7F.
Return values
None

Definition at line 657 of file stm32f4xx_ll_i2c.h.

◆ LL_I2C_SetPeriphClock()

__STATIC_INLINE void LL_I2C_SetPeriphClock ( I2C_TypeDef *  I2Cx,
uint32_t  PeriphClock 
)

Configure the Peripheral clock frequency. @rmtoll CR2 FREQ LL_I2C_SetPeriphClock.

Parameters
I2CxI2C Instance.
PeriphClockPeripheral Clock (in Hz)
Return values
None

Definition at line 702 of file stm32f4xx_ll_i2c.h.

◆ LL_I2C_SetRiseTime()

__STATIC_INLINE void LL_I2C_SetRiseTime ( I2C_TypeDef *  I2Cx,
uint32_t  RiseTime 
)

Configure the SCL, SDA rising time.

Note
This bit can only be programmed when the I2C is disabled (PE = 0). @rmtoll TRISE TRISE LL_I2C_SetRiseTime
Parameters
I2CxI2C Instance.
RiseTimeThis parameter must be a value between Min_Data=0x02 and Max_Data=0x3F.
Return values
None

Definition at line 780 of file stm32f4xx_ll_i2c.h.