STM32F4xx_HAL_Driver  1.8.3
stm32f4xx_ll_i2c.h File Reference

Header file of I2C LL module. More...

Go to the source code of this file.

Data Structures

struct  LL_I2C_InitTypeDef
 

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...
 
__STATIC_INLINE void LL_I2C_EnableIT_TX (I2C_TypeDef *I2Cx)
 Enable TXE interrupt. @rmtoll CR2 ITEVTEN LL_I2C_EnableIT_TX
CR2 ITBUFEN LL_I2C_EnableIT_TX. More...
 
__STATIC_INLINE void LL_I2C_DisableIT_TX (I2C_TypeDef *I2Cx)
 Disable TXE interrupt. @rmtoll CR2 ITEVTEN LL_I2C_DisableIT_TX
CR2 ITBUFEN LL_I2C_DisableIT_TX. More...
 
__STATIC_INLINE uint32_t LL_I2C_IsEnabledIT_TX (I2C_TypeDef *I2Cx)
 Check if the TXE Interrupt is enabled or disabled. @rmtoll CR2 ITEVTEN LL_I2C_IsEnabledIT_TX
CR2 ITBUFEN LL_I2C_IsEnabledIT_TX. More...
 
__STATIC_INLINE void LL_I2C_EnableIT_RX (I2C_TypeDef *I2Cx)
 Enable RXNE interrupt. @rmtoll CR2 ITEVTEN LL_I2C_EnableIT_RX
CR2 ITBUFEN LL_I2C_EnableIT_RX. More...
 
__STATIC_INLINE void LL_I2C_DisableIT_RX (I2C_TypeDef *I2Cx)
 Disable RXNE interrupt. @rmtoll CR2 ITEVTEN LL_I2C_DisableIT_RX
CR2 ITBUFEN LL_I2C_DisableIT_RX. More...
 
__STATIC_INLINE uint32_t LL_I2C_IsEnabledIT_RX (I2C_TypeDef *I2Cx)
 Check if the RXNE Interrupt is enabled or disabled. @rmtoll CR2 ITEVTEN LL_I2C_IsEnabledIT_RX
CR2 ITBUFEN LL_I2C_IsEnabledIT_RX. More...
 
__STATIC_INLINE void LL_I2C_EnableIT_EVT (I2C_TypeDef *I2Cx)
 Enable Events interrupts. More...
 
__STATIC_INLINE void LL_I2C_DisableIT_EVT (I2C_TypeDef *I2Cx)
 Disable Events interrupts. More...
 
__STATIC_INLINE uint32_t LL_I2C_IsEnabledIT_EVT (I2C_TypeDef *I2Cx)
 Check if Events interrupts are enabled or disabled. @rmtoll CR2 ITEVTEN LL_I2C_IsEnabledIT_EVT. More...
 
__STATIC_INLINE void LL_I2C_EnableIT_BUF (I2C_TypeDef *I2Cx)
 Enable Buffer interrupts. More...
 
__STATIC_INLINE void LL_I2C_DisableIT_BUF (I2C_TypeDef *I2Cx)
 Disable Buffer interrupts. More...
 
__STATIC_INLINE uint32_t LL_I2C_IsEnabledIT_BUF (I2C_TypeDef *I2Cx)
 Check if Buffer interrupts are enabled or disabled. @rmtoll CR2 ITBUFEN LL_I2C_IsEnabledIT_BUF. More...
 
__STATIC_INLINE void LL_I2C_EnableIT_ERR (I2C_TypeDef *I2Cx)
 Enable Error interrupts. More...
 
__STATIC_INLINE void LL_I2C_DisableIT_ERR (I2C_TypeDef *I2Cx)
 Disable Error interrupts. More...
 
__STATIC_INLINE uint32_t LL_I2C_IsEnabledIT_ERR (I2C_TypeDef *I2Cx)
 Check if Error interrupts are enabled or disabled. @rmtoll CR2 ITERREN LL_I2C_IsEnabledIT_ERR. More...
 
__STATIC_INLINE uint32_t LL_I2C_IsActiveFlag_TXE (I2C_TypeDef *I2Cx)
 Indicate the status of Transmit data register empty flag. More...
 
__STATIC_INLINE uint32_t LL_I2C_IsActiveFlag_BTF (I2C_TypeDef *I2Cx)
 Indicate the status of Byte Transfer Finished flag. RESET: When Data byte transfer not done. SET: When Data byte transfer succeeded. @rmtoll SR1 BTF LL_I2C_IsActiveFlag_BTF. More...
 
__STATIC_INLINE uint32_t LL_I2C_IsActiveFlag_RXNE (I2C_TypeDef *I2Cx)
 Indicate the status of Receive data register not empty flag. More...
 
__STATIC_INLINE uint32_t LL_I2C_IsActiveFlag_SB (I2C_TypeDef *I2Cx)
 Indicate the status of Start Bit (master mode). More...
 
__STATIC_INLINE uint32_t LL_I2C_IsActiveFlag_ADDR (I2C_TypeDef *I2Cx)
 Indicate the status of Address sent (master mode) or Address matched flag (slave mode). More...
 
__STATIC_INLINE uint32_t LL_I2C_IsActiveFlag_ADD10 (I2C_TypeDef *I2Cx)
 Indicate the status of 10-bit header sent (master mode). More...
 
__STATIC_INLINE uint32_t LL_I2C_IsActiveFlag_AF (I2C_TypeDef *I2Cx)
 Indicate the status of Acknowledge failure flag. More...
 
__STATIC_INLINE uint32_t LL_I2C_IsActiveFlag_STOP (I2C_TypeDef *I2Cx)
 Indicate the status of Stop detection flag (slave mode). More...
 
__STATIC_INLINE uint32_t LL_I2C_IsActiveFlag_BERR (I2C_TypeDef *I2Cx)
 Indicate the status of Bus error flag. More...
 
__STATIC_INLINE uint32_t LL_I2C_IsActiveFlag_ARLO (I2C_TypeDef *I2Cx)
 Indicate the status of Arbitration lost flag. More...
 
__STATIC_INLINE uint32_t LL_I2C_IsActiveFlag_OVR (I2C_TypeDef *I2Cx)
 Indicate the status of Overrun/Underrun flag. More...
 
__STATIC_INLINE uint32_t LL_I2C_IsActiveSMBusFlag_PECERR (I2C_TypeDef *I2Cx)
 Indicate the status of SMBus PEC error flag in reception. More...
 
__STATIC_INLINE uint32_t LL_I2C_IsActiveSMBusFlag_TIMEOUT (I2C_TypeDef *I2Cx)
 Indicate the status of SMBus Timeout detection flag. More...
 
__STATIC_INLINE uint32_t LL_I2C_IsActiveSMBusFlag_ALERT (I2C_TypeDef *I2Cx)
 Indicate the status of SMBus alert flag. More...
 
__STATIC_INLINE uint32_t LL_I2C_IsActiveFlag_BUSY (I2C_TypeDef *I2Cx)
 Indicate the status of Bus Busy flag. More...
 
__STATIC_INLINE uint32_t LL_I2C_IsActiveFlag_DUAL (I2C_TypeDef *I2Cx)
 Indicate the status of Dual flag. More...
 
__STATIC_INLINE uint32_t LL_I2C_IsActiveSMBusFlag_SMBHOST (I2C_TypeDef *I2Cx)
 Indicate the status of SMBus Host address reception (Slave mode). More...
 
__STATIC_INLINE uint32_t LL_I2C_IsActiveSMBusFlag_SMBDEFAULT (I2C_TypeDef *I2Cx)
 Indicate the status of SMBus Device default address reception (Slave mode). More...
 
__STATIC_INLINE uint32_t LL_I2C_IsActiveFlag_GENCALL (I2C_TypeDef *I2Cx)
 Indicate the status of General call address reception (Slave mode). More...
 
__STATIC_INLINE uint32_t LL_I2C_IsActiveFlag_MSL (I2C_TypeDef *I2Cx)
 Indicate the status of Master/Slave flag. More...
 
__STATIC_INLINE void LL_I2C_ClearFlag_ADDR (I2C_TypeDef *I2Cx)
 Clear Address Matched flag. More...
 
__STATIC_INLINE void LL_I2C_ClearFlag_AF (I2C_TypeDef *I2Cx)
 Clear Acknowledge failure flag. @rmtoll SR1 AF LL_I2C_ClearFlag_AF. More...
 
__STATIC_INLINE void LL_I2C_ClearFlag_STOP (I2C_TypeDef *I2Cx)
 Clear Stop detection flag. More...
 
__STATIC_INLINE void LL_I2C_ClearFlag_BERR (I2C_TypeDef *I2Cx)
 Clear Bus error flag. @rmtoll SR1 BERR LL_I2C_ClearFlag_BERR. More...
 
__STATIC_INLINE void LL_I2C_ClearFlag_ARLO (I2C_TypeDef *I2Cx)
 Clear Arbitration lost flag. @rmtoll SR1 ARLO LL_I2C_ClearFlag_ARLO. More...
 
__STATIC_INLINE void LL_I2C_ClearFlag_OVR (I2C_TypeDef *I2Cx)
 Clear Overrun/Underrun flag. @rmtoll SR1 OVR LL_I2C_ClearFlag_OVR. More...
 
__STATIC_INLINE void LL_I2C_ClearSMBusFlag_PECERR (I2C_TypeDef *I2Cx)
 Clear SMBus PEC error flag. @rmtoll SR1 PECERR LL_I2C_ClearSMBusFlag_PECERR. More...
 
__STATIC_INLINE void LL_I2C_ClearSMBusFlag_TIMEOUT (I2C_TypeDef *I2Cx)
 Clear SMBus Timeout detection flag. More...
 
__STATIC_INLINE void LL_I2C_ClearSMBusFlag_ALERT (I2C_TypeDef *I2Cx)
 Clear SMBus Alert flag. More...
 
__STATIC_INLINE void LL_I2C_EnableReset (I2C_TypeDef *I2Cx)
 Enable Reset of I2C peripheral. @rmtoll CR1 SWRST LL_I2C_EnableReset. More...
 
__STATIC_INLINE void LL_I2C_DisableReset (I2C_TypeDef *I2Cx)
 Disable Reset of I2C peripheral. @rmtoll CR1 SWRST LL_I2C_DisableReset. More...
 
__STATIC_INLINE uint32_t LL_I2C_IsResetEnabled (I2C_TypeDef *I2Cx)
 Check if the I2C peripheral is under reset state or not. @rmtoll CR1 SWRST LL_I2C_IsResetEnabled. More...
 
__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. More...
 
__STATIC_INLINE void LL_I2C_GenerateStartCondition (I2C_TypeDef *I2Cx)
 Generate a START or RESTART condition. More...
 
__STATIC_INLINE void LL_I2C_GenerateStopCondition (I2C_TypeDef *I2Cx)
 Generate a STOP condition after the current byte transfer (master mode). @rmtoll CR1 STOP LL_I2C_GenerateStopCondition. More...
 
__STATIC_INLINE void LL_I2C_EnableBitPOS (I2C_TypeDef *I2Cx)
 Enable bit POS (master/host mode). More...
 
__STATIC_INLINE void LL_I2C_DisableBitPOS (I2C_TypeDef *I2Cx)
 Disable bit POS (master/host mode). More...
 
__STATIC_INLINE uint32_t LL_I2C_IsEnabledBitPOS (I2C_TypeDef *I2Cx)
 Check if bit POS is enabled or disabled. @rmtoll CR1 POS LL_I2C_IsEnabledBitPOS. More...
 
__STATIC_INLINE uint32_t LL_I2C_GetTransferDirection (I2C_TypeDef *I2Cx)
 Indicate the value of transfer direction. More...
 
__STATIC_INLINE void LL_I2C_EnableLastDMA (I2C_TypeDef *I2Cx)
 Enable DMA last transfer. More...
 
__STATIC_INLINE void LL_I2C_DisableLastDMA (I2C_TypeDef *I2Cx)
 Disable DMA last transfer. More...
 
__STATIC_INLINE uint32_t LL_I2C_IsEnabledLastDMA (I2C_TypeDef *I2Cx)
 Check if DMA last transfer is enabled or disabled. @rmtoll CR2 LAST LL_I2C_IsEnabledLastDMA. More...
 
__STATIC_INLINE void LL_I2C_EnableSMBusPECCompare (I2C_TypeDef *I2Cx)
 Enable transfer or internal comparison of the SMBus Packet Error byte (transmission or reception mode). More...
 
__STATIC_INLINE void LL_I2C_DisableSMBusPECCompare (I2C_TypeDef *I2Cx)
 Disable transfer or internal comparison of the SMBus Packet Error byte (transmission or reception mode). More...
 
__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. More...
 
__STATIC_INLINE uint32_t LL_I2C_GetSMBusPEC (I2C_TypeDef *I2Cx)
 Get the SMBus Packet Error byte calculated. More...
 
__STATIC_INLINE uint8_t LL_I2C_ReceiveData8 (I2C_TypeDef *I2Cx)
 Read Receive Data register. @rmtoll DR DR LL_I2C_ReceiveData8. More...
 
__STATIC_INLINE void LL_I2C_TransmitData8 (I2C_TypeDef *I2Cx, uint8_t Data)
 Write in Transmit Data Register . @rmtoll DR DR LL_I2C_TransmitData8. More...
 
uint32_t LL_I2C_Init (I2C_TypeDef *I2Cx, LL_I2C_InitTypeDef *I2C_InitStruct)
 Initialize the I2C registers according to the specified parameters in I2C_InitStruct. More...
 
uint32_t LL_I2C_DeInit (I2C_TypeDef *I2Cx)
 De-initialize the I2C registers to their default reset values. More...
 
void LL_I2C_StructInit (LL_I2C_InitTypeDef *I2C_InitStruct)
 Set each LL_I2C_InitTypeDef field to default value. More...
 

Detailed Description

Header file of I2C LL module.

Author
MCD Application Team
Attention

Copyright (c) 2016 STMicroelectronics. All rights reserved.

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.

Definition in file stm32f4xx_ll_i2c.h.