STM32F439xx HAL User Manual
Functions
Data_Management
I2C Exported Functions

Functions

__STATIC_INLINE void LL_I2C_EnableReset (I2C_TypeDef *I2Cx)
 Enable Reset of I2C peripheral.
__STATIC_INLINE void LL_I2C_DisableReset (I2C_TypeDef *I2Cx)
 Disable Reset of I2C peripheral.
__STATIC_INLINE uint32_t LL_I2C_IsResetEnabled (I2C_TypeDef *I2Cx)
 Check if the I2C peripheral is under reset state or not.
__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 code or next received byte.
__STATIC_INLINE void LL_I2C_GenerateStartCondition (I2C_TypeDef *I2Cx)
 Generate a START or RESTART condition.
__STATIC_INLINE void LL_I2C_GenerateStopCondition (I2C_TypeDef *I2Cx)
 Generate a STOP condition after the current byte transfer (master mode).
__STATIC_INLINE void LL_I2C_EnableBitPOS (I2C_TypeDef *I2Cx)
 Enable bit POS (master/host mode).
__STATIC_INLINE void LL_I2C_DisableBitPOS (I2C_TypeDef *I2Cx)
 Disable bit POS (master/host mode).
__STATIC_INLINE uint32_t LL_I2C_IsEnabledBitPOS (I2C_TypeDef *I2Cx)
 Check if bit POS is enabled or disabled.
__STATIC_INLINE uint32_t LL_I2C_GetTransferDirection (I2C_TypeDef *I2Cx)
 Indicate the value of transfer direction.
__STATIC_INLINE void LL_I2C_EnableLastDMA (I2C_TypeDef *I2Cx)
 Enable DMA last transfer.
__STATIC_INLINE void LL_I2C_DisableLastDMA (I2C_TypeDef *I2Cx)
 Disable DMA last transfer.
__STATIC_INLINE uint32_t LL_I2C_IsEnabledLastDMA (I2C_TypeDef *I2Cx)
 Check if DMA last transfer is enabled or disabled.
__STATIC_INLINE void LL_I2C_EnableSMBusPECCompare (I2C_TypeDef *I2Cx)
 Enable transfer or internal comparison of the SMBus Packet Error byte (transmission or reception mode).
__STATIC_INLINE void LL_I2C_DisableSMBusPECCompare (I2C_TypeDef *I2Cx)
 Disable transfer or internal comparison of the SMBus Packet Error byte (transmission or reception mode).
__STATIC_INLINE uint32_t LL_I2C_IsEnabledSMBusPECCompare (I2C_TypeDef *I2Cx)
 Check if the SMBus Packet Error byte transfer or internal comparison is requested or not.
__STATIC_INLINE uint32_t LL_I2C_GetSMBusPEC (I2C_TypeDef *I2Cx)
 Get the SMBus Packet Error byte calculated.
__STATIC_INLINE uint8_t LL_I2C_ReceiveData8 (I2C_TypeDef *I2Cx)
 Read Receive Data register.
__STATIC_INLINE void LL_I2C_TransmitData8 (I2C_TypeDef *I2Cx, uint8_t Data)
 Write in Transmit Data Register .

Function Documentation

__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 code or next received byte.

Note:
Usage in Slave or Master mode.
Reference Manual to LL API cross reference:
CR1 ACK LL_I2C_AcknowledgeNextData
Parameters:
I2CxI2C Instance.
TypeAcknowledgeThis parameter can be one of the following values:
Return values:
None

Definition at line 1678 of file stm32f4xx_ll_i2c.h.

Referenced by LL_I2C_Init().

__STATIC_INLINE void LL_I2C_DisableBitPOS ( I2C_TypeDef *  I2Cx)

Disable bit POS (master/host mode).

Note:
In that case, the ACK bit controls the (N)ACK of the current byte received or the PEC bit indicates that the current byte in shift register is a PEC.
Reference Manual to LL API cross reference:
CR1 POS LL_I2C_DisableBitPOS
Parameters:
I2CxI2C Instance.
Return values:
None

Definition at line 1726 of file stm32f4xx_ll_i2c.h.

__STATIC_INLINE void LL_I2C_DisableLastDMA ( I2C_TypeDef *  I2Cx)

Disable DMA last transfer.

Note:
This action mean that next DMA EOT is not the last transfer.
Reference Manual to LL API cross reference:
CR2 LAST LL_I2C_DisableLastDMA
Parameters:
I2CxI2C Instance.
Return values:
None

Definition at line 1776 of file stm32f4xx_ll_i2c.h.

__STATIC_INLINE void LL_I2C_DisableReset ( I2C_TypeDef *  I2Cx)

Disable Reset of I2C peripheral.

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

Definition at line 1652 of file stm32f4xx_ll_i2c.h.

__STATIC_INLINE void LL_I2C_DisableSMBusPECCompare ( I2C_TypeDef *  I2Cx)

Disable transfer or internal comparison of the SMBus Packet Error byte (transmission or reception 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 PEC LL_I2C_DisableSMBusPECCompare
Parameters:
I2CxI2C Instance.
Return values:
None

Definition at line 1815 of file stm32f4xx_ll_i2c.h.

__STATIC_INLINE void LL_I2C_EnableBitPOS ( I2C_TypeDef *  I2Cx)

Enable bit POS (master/host mode).

Note:
In that case, the ACK bit controls the (N)ACK of the next byte received or the PEC bit indicates that the next byte in shift register is a PEC.
Reference Manual to LL API cross reference:
CR1 POS LL_I2C_EnableBitPOS
Parameters:
I2CxI2C Instance.
Return values:
None

Definition at line 1714 of file stm32f4xx_ll_i2c.h.

__STATIC_INLINE void LL_I2C_EnableLastDMA ( I2C_TypeDef *  I2Cx)

Enable DMA last transfer.

Note:
This action mean that next DMA EOT is the last transfer.
Reference Manual to LL API cross reference:
CR2 LAST LL_I2C_EnableLastDMA
Parameters:
I2CxI2C Instance.
Return values:
None

Definition at line 1764 of file stm32f4xx_ll_i2c.h.

__STATIC_INLINE void LL_I2C_EnableReset ( I2C_TypeDef *  I2Cx)

Enable Reset of I2C peripheral.

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

Definition at line 1641 of file stm32f4xx_ll_i2c.h.

__STATIC_INLINE void LL_I2C_EnableSMBusPECCompare ( I2C_TypeDef *  I2Cx)

Enable transfer or internal comparison of the SMBus Packet Error byte (transmission or reception 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 feature is cleared by hardware when the PEC byte is transferred or compared, or by a START or STOP condition, it is also cleared by software.
Reference Manual to LL API cross reference:
CR1 PEC LL_I2C_EnableSMBusPECCompare
Parameters:
I2CxI2C Instance.
Return values:
None

Definition at line 1802 of file stm32f4xx_ll_i2c.h.

__STATIC_INLINE void LL_I2C_GenerateStartCondition ( I2C_TypeDef *  I2Cx)

Generate a START or RESTART condition.

Note:
The START bit can be set even if bus is BUSY or I2C is in slave mode. This action has no effect when RELOAD is set.
Reference Manual to LL API cross reference:
CR1 START LL_I2C_GenerateStartCondition
Parameters:
I2CxI2C Instance.
Return values:
None

Definition at line 1691 of file stm32f4xx_ll_i2c.h.

__STATIC_INLINE void LL_I2C_GenerateStopCondition ( I2C_TypeDef *  I2Cx)

Generate a STOP condition after the current byte transfer (master mode).

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

Definition at line 1702 of file stm32f4xx_ll_i2c.h.

__STATIC_INLINE uint32_t LL_I2C_GetSMBusPEC ( I2C_TypeDef *  I2Cx)

Get the SMBus Packet Error byte calculated.

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:
SR2 PEC LL_I2C_GetSMBusPEC
Parameters:
I2CxI2C Instance.
Return values:
Valuebetween Min_Data=0x00 and Max_Data=0xFF

Definition at line 1841 of file stm32f4xx_ll_i2c.h.

__STATIC_INLINE uint32_t LL_I2C_GetTransferDirection ( I2C_TypeDef *  I2Cx)

Indicate the value of transfer direction.

Note:
RESET: Bus is in read transfer (peripheral point of view). SET: Bus is in write transfer (peripheral point of view).
Reference Manual to LL API cross reference:
SR2 TRA LL_I2C_GetTransferDirection
Parameters:
I2CxI2C Instance.
Return values:
Returnedvalue can be one of the following values:

Definition at line 1752 of file stm32f4xx_ll_i2c.h.

__STATIC_INLINE uint32_t LL_I2C_IsEnabledBitPOS ( I2C_TypeDef *  I2Cx)

Check if bit POS is enabled or disabled.

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

Definition at line 1737 of file stm32f4xx_ll_i2c.h.

__STATIC_INLINE uint32_t LL_I2C_IsEnabledLastDMA ( I2C_TypeDef *  I2Cx)

Check if DMA last transfer is enabled or disabled.

Reference Manual to LL API cross reference:
CR2 LAST LL_I2C_IsEnabledLastDMA
Parameters:
I2CxI2C Instance.
Return values:
Stateof bit (1 or 0).

Definition at line 1787 of file stm32f4xx_ll_i2c.h.

__STATIC_INLINE uint32_t LL_I2C_IsEnabledSMBusPECCompare ( I2C_TypeDef *  I2Cx)

Check if the SMBus Packet Error byte transfer or internal comparison is requested or not.

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 PEC LL_I2C_IsEnabledSMBusPECCompare
Parameters:
I2CxI2C Instance.
Return values:
Stateof bit (1 or 0).

Definition at line 1828 of file stm32f4xx_ll_i2c.h.

__STATIC_INLINE uint32_t LL_I2C_IsResetEnabled ( I2C_TypeDef *  I2Cx)

Check if the I2C peripheral is under reset state or not.

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

Definition at line 1663 of file stm32f4xx_ll_i2c.h.

__STATIC_INLINE uint8_t LL_I2C_ReceiveData8 ( I2C_TypeDef *  I2Cx)

Read Receive Data register.

Reference Manual to LL API cross reference:
DR DR LL_I2C_ReceiveData8
Parameters:
I2CxI2C Instance.
Return values:
Valuebetween Min_Data=0x0 and Max_Data=0xFF

Definition at line 1852 of file stm32f4xx_ll_i2c.h.

__STATIC_INLINE void LL_I2C_TransmitData8 ( I2C_TypeDef *  I2Cx,
uint8_t  Data 
)

Write in Transmit Data Register .

Reference Manual to LL API cross reference:
DR DR LL_I2C_TransmitData8
Parameters:
I2CxI2C Instance.
DataValue between Min_Data=0x0 and Max_Data=0xFF
Return values:
None

Definition at line 1864 of file stm32f4xx_ll_i2c.h.