STM32L486xx HAL User Manual
Data Structures | Defines | Functions
stm32l4xx_ll_i2c.h File Reference

Header file of I2C LL module. More...

#include "stm32l4xx.h"

Go to the source code of this file.

Data Structures

struct  LL_I2C_InitTypeDef

Defines

#define LL_I2C_ICR_ADDRCF   I2C_ICR_ADDRCF
#define LL_I2C_ICR_NACKCF   I2C_ICR_NACKCF
#define LL_I2C_ICR_STOPCF   I2C_ICR_STOPCF
#define LL_I2C_ICR_BERRCF   I2C_ICR_BERRCF
#define LL_I2C_ICR_ARLOCF   I2C_ICR_ARLOCF
#define LL_I2C_ICR_OVRCF   I2C_ICR_OVRCF
#define LL_I2C_ICR_PECCF   I2C_ICR_PECCF
#define LL_I2C_ICR_TIMOUTCF   I2C_ICR_TIMOUTCF
#define LL_I2C_ICR_ALERTCF   I2C_ICR_ALERTCF
#define LL_I2C_ISR_TXE   I2C_ISR_TXE
#define LL_I2C_ISR_TXIS   I2C_ISR_TXIS
#define LL_I2C_ISR_RXNE   I2C_ISR_RXNE
#define LL_I2C_ISR_ADDR   I2C_ISR_ADDR
#define LL_I2C_ISR_NACKF   I2C_ISR_NACKF
#define LL_I2C_ISR_STOPF   I2C_ISR_STOPF
#define LL_I2C_ISR_TC   I2C_ISR_TC
#define LL_I2C_ISR_TCR   I2C_ISR_TCR
#define LL_I2C_ISR_BERR   I2C_ISR_BERR
#define LL_I2C_ISR_ARLO   I2C_ISR_ARLO
#define LL_I2C_ISR_OVR   I2C_ISR_OVR
#define LL_I2C_ISR_PECERR   I2C_ISR_PECERR
#define LL_I2C_ISR_TIMEOUT   I2C_ISR_TIMEOUT
#define LL_I2C_ISR_ALERT   I2C_ISR_ALERT
#define LL_I2C_ISR_BUSY   I2C_ISR_BUSY
#define LL_I2C_CR1_TXIE   I2C_CR1_TXIE
#define LL_I2C_CR1_RXIE   I2C_CR1_RXIE
#define LL_I2C_CR1_ADDRIE   I2C_CR1_ADDRIE
#define LL_I2C_CR1_NACKIE   I2C_CR1_NACKIE
#define LL_I2C_CR1_STOPIE   I2C_CR1_STOPIE
#define LL_I2C_CR1_TCIE   I2C_CR1_TCIE
#define LL_I2C_CR1_ERRIE   I2C_CR1_ERRIE
#define LL_I2C_MODE_I2C   0x00000000U
#define LL_I2C_MODE_SMBUS_HOST   I2C_CR1_SMBHEN
#define LL_I2C_MODE_SMBUS_DEVICE   0x00000000U
#define LL_I2C_MODE_SMBUS_DEVICE_ARP   I2C_CR1_SMBDEN
#define LL_I2C_ANALOGFILTER_ENABLE   0x00000000U
#define LL_I2C_ANALOGFILTER_DISABLE   I2C_CR1_ANFOFF
#define LL_I2C_ADDRESSING_MODE_7BIT   0x00000000U
#define LL_I2C_ADDRESSING_MODE_10BIT   I2C_CR2_ADD10
#define LL_I2C_OWNADDRESS1_7BIT   0x00000000U
#define LL_I2C_OWNADDRESS1_10BIT   I2C_OAR1_OA1MODE
#define LL_I2C_OWNADDRESS2_NOMASK   I2C_OAR2_OA2NOMASK
#define LL_I2C_OWNADDRESS2_MASK01   I2C_OAR2_OA2MASK01
#define LL_I2C_OWNADDRESS2_MASK02   I2C_OAR2_OA2MASK02
#define LL_I2C_OWNADDRESS2_MASK03   I2C_OAR2_OA2MASK03
#define LL_I2C_OWNADDRESS2_MASK04   I2C_OAR2_OA2MASK04
#define LL_I2C_OWNADDRESS2_MASK05   I2C_OAR2_OA2MASK05
#define LL_I2C_OWNADDRESS2_MASK06   I2C_OAR2_OA2MASK06
#define LL_I2C_OWNADDRESS2_MASK07   I2C_OAR2_OA2MASK07
#define LL_I2C_ACK   0x00000000U
#define LL_I2C_NACK   I2C_CR2_NACK
#define LL_I2C_ADDRSLAVE_7BIT   0x00000000U
#define LL_I2C_ADDRSLAVE_10BIT   I2C_CR2_ADD10
#define LL_I2C_REQUEST_WRITE   0x00000000U
#define LL_I2C_REQUEST_READ   I2C_CR2_RD_WRN
#define LL_I2C_MODE_RELOAD   I2C_CR2_RELOAD
#define LL_I2C_MODE_AUTOEND   I2C_CR2_AUTOEND
#define LL_I2C_MODE_SOFTEND   0x00000000U
#define LL_I2C_MODE_SMBUS_RELOAD   LL_I2C_MODE_RELOAD
#define LL_I2C_MODE_SMBUS_AUTOEND_NO_PEC   LL_I2C_MODE_AUTOEND
#define LL_I2C_MODE_SMBUS_SOFTEND_NO_PEC   LL_I2C_MODE_SOFTEND
#define LL_I2C_MODE_SMBUS_AUTOEND_WITH_PEC   (uint32_t)(LL_I2C_MODE_AUTOEND | I2C_CR2_PECBYTE)
#define LL_I2C_MODE_SMBUS_SOFTEND_WITH_PEC   (uint32_t)(LL_I2C_MODE_SOFTEND | I2C_CR2_PECBYTE)
#define LL_I2C_GENERATE_NOSTARTSTOP   0x00000000U
#define LL_I2C_GENERATE_STOP   (uint32_t)(0x80000000U | I2C_CR2_STOP)
#define LL_I2C_GENERATE_START_READ   (uint32_t)(0x80000000U | I2C_CR2_START | I2C_CR2_RD_WRN)
#define LL_I2C_GENERATE_START_WRITE   (uint32_t)(0x80000000U | I2C_CR2_START)
#define LL_I2C_GENERATE_RESTART_7BIT_READ   (uint32_t)(0x80000000U | I2C_CR2_START | I2C_CR2_RD_WRN)
#define LL_I2C_GENERATE_RESTART_7BIT_WRITE   (uint32_t)(0x80000000U | I2C_CR2_START)
#define LL_I2C_GENERATE_RESTART_10BIT_READ   (uint32_t)(0x80000000U | I2C_CR2_START | I2C_CR2_RD_WRN | I2C_CR2_HEAD10R)
#define LL_I2C_GENERATE_RESTART_10BIT_WRITE   (uint32_t)(0x80000000U | I2C_CR2_START)
#define LL_I2C_DIRECTION_WRITE   0x00000000U
#define LL_I2C_DIRECTION_READ   I2C_ISR_DIR
#define LL_I2C_DMA_REG_DATA_TRANSMIT   0x00000000U
#define LL_I2C_DMA_REG_DATA_RECEIVE   0x00000001U
#define LL_I2C_SMBUS_TIMEOUTA_MODE_SCL_LOW   0x00000000U
#define LL_I2C_SMBUS_TIMEOUTA_MODE_SDA_SCL_HIGH   I2C_TIMEOUTR_TIDLE
#define LL_I2C_SMBUS_TIMEOUTA   I2C_TIMEOUTR_TIMOUTEN
#define LL_I2C_SMBUS_TIMEOUTB   I2C_TIMEOUTR_TEXTEN
#define LL_I2C_SMBUS_ALL_TIMEOUT   (uint32_t)(I2C_TIMEOUTR_TIMOUTEN | I2C_TIMEOUTR_TEXTEN)
#define LL_I2C_WriteReg(__INSTANCE__, __REG__, __VALUE__)   WRITE_REG(__INSTANCE__->__REG__, (__VALUE__))
 Write a value in I2C register.
#define LL_I2C_ReadReg(__INSTANCE__, __REG__)   READ_REG(__INSTANCE__->__REG__)
 Read a value in I2C register.
#define __LL_I2C_CONVERT_TIMINGS(__PRESCALER__, __DATA_SETUP_TIME__, __DATA_HOLD_TIME__, __CLOCK_HIGH_PERIOD__, __CLOCK_LOW_PERIOD__)
 Configure the SDA setup, hold time and the SCL high, low period.

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.
__STATIC_INLINE void LL_I2C_EnableIT_TX (I2C_TypeDef *I2Cx)
 Enable TXIS interrupt.
__STATIC_INLINE void LL_I2C_DisableIT_TX (I2C_TypeDef *I2Cx)
 Disable TXIS interrupt.
__STATIC_INLINE uint32_t LL_I2C_IsEnabledIT_TX (I2C_TypeDef *I2Cx)
 Check if the TXIS Interrupt is enabled or disabled.
__STATIC_INLINE void LL_I2C_EnableIT_RX (I2C_TypeDef *I2Cx)
 Enable RXNE interrupt.
__STATIC_INLINE void LL_I2C_DisableIT_RX (I2C_TypeDef *I2Cx)
 Disable RXNE interrupt.
__STATIC_INLINE uint32_t LL_I2C_IsEnabledIT_RX (I2C_TypeDef *I2Cx)
 Check if the RXNE Interrupt is enabled or disabled.
__STATIC_INLINE void LL_I2C_EnableIT_ADDR (I2C_TypeDef *I2Cx)
 Enable Address match interrupt (slave mode only).
__STATIC_INLINE void LL_I2C_DisableIT_ADDR (I2C_TypeDef *I2Cx)
 Disable Address match interrupt (slave mode only).
__STATIC_INLINE uint32_t LL_I2C_IsEnabledIT_ADDR (I2C_TypeDef *I2Cx)
 Check if Address match interrupt is enabled or disabled.
__STATIC_INLINE void LL_I2C_EnableIT_NACK (I2C_TypeDef *I2Cx)
 Enable Not acknowledge received interrupt.
__STATIC_INLINE void LL_I2C_DisableIT_NACK (I2C_TypeDef *I2Cx)
 Disable Not acknowledge received interrupt.
__STATIC_INLINE uint32_t LL_I2C_IsEnabledIT_NACK (I2C_TypeDef *I2Cx)
 Check if Not acknowledge received interrupt is enabled or disabled.
__STATIC_INLINE void LL_I2C_EnableIT_STOP (I2C_TypeDef *I2Cx)
 Enable STOP detection interrupt.
__STATIC_INLINE void LL_I2C_DisableIT_STOP (I2C_TypeDef *I2Cx)
 Disable STOP detection interrupt.
__STATIC_INLINE uint32_t LL_I2C_IsEnabledIT_STOP (I2C_TypeDef *I2Cx)
 Check if STOP detection interrupt is enabled or disabled.
__STATIC_INLINE void LL_I2C_EnableIT_TC (I2C_TypeDef *I2Cx)
 Enable Transfer Complete interrupt.
__STATIC_INLINE void LL_I2C_DisableIT_TC (I2C_TypeDef *I2Cx)
 Disable Transfer Complete interrupt.
__STATIC_INLINE uint32_t LL_I2C_IsEnabledIT_TC (I2C_TypeDef *I2Cx)
 Check if Transfer Complete interrupt is enabled or disabled.
__STATIC_INLINE void LL_I2C_EnableIT_ERR (I2C_TypeDef *I2Cx)
 Enable Error interrupts.
__STATIC_INLINE void LL_I2C_DisableIT_ERR (I2C_TypeDef *I2Cx)
 Disable Error interrupts.
__STATIC_INLINE uint32_t LL_I2C_IsEnabledIT_ERR (I2C_TypeDef *I2Cx)
 Check if Error interrupts are enabled or disabled.
__STATIC_INLINE uint32_t LL_I2C_IsActiveFlag_TXE (I2C_TypeDef *I2Cx)
 Indicate the status of Transmit data register empty flag.
__STATIC_INLINE uint32_t LL_I2C_IsActiveFlag_TXIS (I2C_TypeDef *I2Cx)
 Indicate the status of Transmit interrupt flag.
__STATIC_INLINE uint32_t LL_I2C_IsActiveFlag_RXNE (I2C_TypeDef *I2Cx)
 Indicate the status of Receive data register not empty flag.
__STATIC_INLINE uint32_t LL_I2C_IsActiveFlag_ADDR (I2C_TypeDef *I2Cx)
 Indicate the status of Address matched flag (slave mode).
__STATIC_INLINE uint32_t LL_I2C_IsActiveFlag_NACK (I2C_TypeDef *I2Cx)
 Indicate the status of Not Acknowledge received flag.
__STATIC_INLINE uint32_t LL_I2C_IsActiveFlag_STOP (I2C_TypeDef *I2Cx)
 Indicate the status of Stop detection flag.
__STATIC_INLINE uint32_t LL_I2C_IsActiveFlag_TC (I2C_TypeDef *I2Cx)
 Indicate the status of Transfer complete flag (master mode).
__STATIC_INLINE uint32_t LL_I2C_IsActiveFlag_TCR (I2C_TypeDef *I2Cx)
 Indicate the status of Transfer complete flag (master mode).
__STATIC_INLINE uint32_t LL_I2C_IsActiveFlag_BERR (I2C_TypeDef *I2Cx)
 Indicate the status of Bus error flag.
__STATIC_INLINE uint32_t LL_I2C_IsActiveFlag_ARLO (I2C_TypeDef *I2Cx)
 Indicate the status of Arbitration lost flag.
__STATIC_INLINE uint32_t LL_I2C_IsActiveFlag_OVR (I2C_TypeDef *I2Cx)
 Indicate the status of Overrun/Underrun flag (slave mode).
__STATIC_INLINE uint32_t LL_I2C_IsActiveSMBusFlag_PECERR (I2C_TypeDef *I2Cx)
 Indicate the status of SMBus PEC error flag in reception.
__STATIC_INLINE uint32_t LL_I2C_IsActiveSMBusFlag_TIMEOUT (I2C_TypeDef *I2Cx)
 Indicate the status of SMBus Timeout detection flag.
__STATIC_INLINE uint32_t LL_I2C_IsActiveSMBusFlag_ALERT (I2C_TypeDef *I2Cx)
 Indicate the status of SMBus alert flag.
__STATIC_INLINE uint32_t LL_I2C_IsActiveFlag_BUSY (I2C_TypeDef *I2Cx)
 Indicate the status of Bus Busy flag.
__STATIC_INLINE void LL_I2C_ClearFlag_ADDR (I2C_TypeDef *I2Cx)
 Clear Address Matched flag.
__STATIC_INLINE void LL_I2C_ClearFlag_NACK (I2C_TypeDef *I2Cx)
 Clear Not Acknowledge flag.
__STATIC_INLINE void LL_I2C_ClearFlag_STOP (I2C_TypeDef *I2Cx)
 Clear Stop detection flag.
__STATIC_INLINE void LL_I2C_ClearFlag_TXE (I2C_TypeDef *I2Cx)
 Clear Transmit data register empty flag (TXE).
__STATIC_INLINE void LL_I2C_ClearFlag_BERR (I2C_TypeDef *I2Cx)
 Clear Bus error flag.
__STATIC_INLINE void LL_I2C_ClearFlag_ARLO (I2C_TypeDef *I2Cx)
 Clear Arbitration lost flag.
__STATIC_INLINE void LL_I2C_ClearFlag_OVR (I2C_TypeDef *I2Cx)
 Clear Overrun/Underrun flag.
__STATIC_INLINE void LL_I2C_ClearSMBusFlag_PECERR (I2C_TypeDef *I2Cx)
 Clear SMBus PEC error flag.
__STATIC_INLINE void LL_I2C_ClearSMBusFlag_TIMEOUT (I2C_TypeDef *I2Cx)
 Clear SMBus Timeout detection flag.
__STATIC_INLINE void LL_I2C_ClearSMBusFlag_ALERT (I2C_TypeDef *I2Cx)
 Clear SMBus Alert flag.
__STATIC_INLINE void LL_I2C_EnableAutoEndMode (I2C_TypeDef *I2Cx)
 Enable automatic STOP condition generation (master mode).
__STATIC_INLINE void LL_I2C_DisableAutoEndMode (I2C_TypeDef *I2Cx)
 Disable automatic STOP condition generation (master mode).
__STATIC_INLINE uint32_t LL_I2C_IsEnabledAutoEndMode (I2C_TypeDef *I2Cx)
 Check if automatic STOP condition is enabled or disabled.
__STATIC_INLINE void LL_I2C_EnableReloadMode (I2C_TypeDef *I2Cx)
 Enable reload mode (master mode).
__STATIC_INLINE void LL_I2C_DisableReloadMode (I2C_TypeDef *I2Cx)
 Disable reload mode (master mode).
__STATIC_INLINE uint32_t LL_I2C_IsEnabledReloadMode (I2C_TypeDef *I2Cx)
 Check if reload mode is enabled or disabled.
__STATIC_INLINE void LL_I2C_SetTransferSize (I2C_TypeDef *I2Cx, uint32_t TransferSize)
 Configure the number of bytes for transfer.
__STATIC_INLINE uint32_t LL_I2C_GetTransferSize (I2C_TypeDef *I2Cx)
 Get the number of bytes configured for transfer.
__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_EnableAuto10BitRead (I2C_TypeDef *I2Cx)
 Enable automatic RESTART Read request condition for 10bit address header (master mode).
__STATIC_INLINE void LL_I2C_DisableAuto10BitRead (I2C_TypeDef *I2Cx)
 Disable automatic RESTART Read request condition for 10bit address header (master mode).
__STATIC_INLINE uint32_t LL_I2C_IsEnabledAuto10BitRead (I2C_TypeDef *I2Cx)
 Check if automatic RESTART Read request condition for 10bit address header is enabled or disabled.
__STATIC_INLINE void LL_I2C_SetTransferRequest (I2C_TypeDef *I2Cx, uint32_t TransferRequest)
 Configure the transfer direction (master mode).
__STATIC_INLINE uint32_t LL_I2C_GetTransferRequest (I2C_TypeDef *I2Cx)
 Get the transfer direction requested (master mode).
__STATIC_INLINE void LL_I2C_SetSlaveAddr (I2C_TypeDef *I2Cx, uint32_t SlaveAddr)
 Configure the slave address for transfer (master mode).
__STATIC_INLINE uint32_t LL_I2C_GetSlaveAddr (I2C_TypeDef *I2Cx)
 Get the slave address programmed for transfer.
__STATIC_INLINE void LL_I2C_HandleTransfer (I2C_TypeDef *I2Cx, uint32_t SlaveAddr, uint32_t SlaveAddrSize, uint32_t TransferSize, uint32_t EndMode, uint32_t Request)
 Handles I2Cx communication when starting transfer or during transfer (TC or TCR flag are set).
__STATIC_INLINE uint32_t LL_I2C_GetTransferDirection (I2C_TypeDef *I2Cx)
 Indicate the value of transfer direction (slave mode).
__STATIC_INLINE uint32_t LL_I2C_GetAddressMatchCode (I2C_TypeDef *I2Cx)
 Return the slave matched address.
__STATIC_INLINE void LL_I2C_EnableSMBusPECCompare (I2C_TypeDef *I2Cx)
 Enable 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 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 .
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.
uint32_t LL_I2C_DeInit (I2C_TypeDef *I2Cx)
 De-initialize the I2C registers to their default reset values.
void LL_I2C_StructInit (LL_I2C_InitTypeDef *I2C_InitStruct)
 Set each LL_I2C_InitTypeDef field to default value.

Detailed Description

Header file of I2C LL module.

Author:
MCD Application Team
Attention:

© COPYRIGHT(c) 2017 STMicroelectronics

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. Neither the name of STMicroelectronics nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Definition in file stm32l4xx_ll_i2c.h.