Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of TUKS-COURSE-TIMER by
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 TXDR TXDATA LL_I2C_DMA_GetRegAddr RXDR RXDATA LL_I2C_DMA_GetRegAddr. | |
__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). CR1 ANFOFF LL_I2C_ConfigFilters
CR1 DNF LL_I2C_ConfigFilters
- Parameters:
-
I2Cx I2C Instance. AnalogFilter This parameter can be one of the following values: - LL_I2C_ANALOGFILTER_ENABLE
- LL_I2C_ANALOGFILTER_DISABLE
DigitalFilter This parameter must be a value between 0x00 (Digital filter disabled) and 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 464 of file stm32l4xx_ll_i2c.h.
__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). TIMEOUTR TIMEOUTA LL_I2C_ConfigSMBusTimeout
TIMEOUTR TIDLE LL_I2C_ConfigSMBusTimeout
TIMEOUTR TIMEOUTB LL_I2C_ConfigSMBusTimeout
- Parameters:
-
I2Cx I2C Instance. TimeoutA This parameter must be a value between Min_Data=0 and Max_Data=0xFFF. TimeoutAMode This parameter can be one of the following values: - LL_I2C_SMBUS_TIMEOUTA_MODE_SCL_LOW
- LL_I2C_SMBUS_TIMEOUTA_MODE_SDA_SCL_HIGH
TimeoutB
- Note:
- This configuration can only be programmed when associated Timeout is disabled (TimeoutA and/orTimeoutB).
- Return values:
-
None
Definition at line 1112 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. CR1 PE LL_I2C_Disable
- Parameters:
-
I2Cx I2C Instance.
- Return values:
-
None
Definition at line 433 of file stm32l4xx_ll_i2c.h.
__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). CR1 ANFOFF LL_I2C_DisableAnalogFilter
- Parameters:
-
I2Cx I2C Instance.
- Return values:
-
None
Definition at line 515 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). CR1 NOSTRETCH LL_I2C_DisableClockStretching
- Parameters:
-
I2Cx I2C Instance.
- Return values:
-
None
Definition at line 644 of file stm32l4xx_ll_i2c.h.
__STATIC_INLINE void LL_I2C_DisableDMAReq_RX | ( | I2C_TypeDef * | I2Cx ) |
Disable DMA reception requests.
CR1 RXDMAEN LL_I2C_DisableDMAReq_RX
- Parameters:
-
I2Cx I2C Instance.
- Return values:
-
None
Definition at line 581 of file stm32l4xx_ll_i2c.h.
__STATIC_INLINE void LL_I2C_DisableDMAReq_TX | ( | I2C_TypeDef * | I2Cx ) |
Disable DMA transmission requests.
CR1 TXDMAEN LL_I2C_DisableDMAReq_TX
- Parameters:
-
I2Cx I2C Instance.
- Return values:
-
None
Definition at line 548 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. CR1 GCEN LL_I2C_DisableGeneralCall
- Parameters:
-
I2Cx I2C Instance.
- Return values:
-
None
Definition at line 752 of file stm32l4xx_ll_i2c.h.
__STATIC_INLINE void LL_I2C_DisableOwnAddress1 | ( | I2C_TypeDef * | I2Cx ) |
Disable acknowledge on Own Address1 match address.
OAR1 OA1EN LL_I2C_DisableOwnAddress1
- Parameters:
-
I2Cx I2C Instance.
- Return values:
-
None
Definition at line 829 of file stm32l4xx_ll_i2c.h.
__STATIC_INLINE void LL_I2C_DisableOwnAddress2 | ( | I2C_TypeDef * | I2Cx ) |
Disable acknowledge on Own Address2 match address.
OAR2 OA2EN LL_I2C_DisableOwnAddress2
- Parameters:
-
I2Cx I2C Instance.
- Return values:
-
None
Definition at line 885 of file stm32l4xx_ll_i2c.h.
__STATIC_INLINE void LL_I2C_DisableSlaveByteControl | ( | I2C_TypeDef * | I2Cx ) |
Disable hardware byte control in slave mode.
CR1 SBC LL_I2C_DisableSlaveByteControl
- Parameters:
-
I2Cx I2C Instance.
- Return values:
-
None
Definition at line 677 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. CR1 ALERTEN LL_I2C_DisableSMBusAlert
- Parameters:
-
I2Cx I2C Instance.
- Return values:
-
None
Definition at line 1038 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. CR1 PECEN LL_I2C_DisableSMBusPEC
- Parameters:
-
I2Cx I2C Instance.
- Return values:
-
None
Definition at line 1077 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. TIMEOUTR TIMOUTEN LL_I2C_DisableSMBusTimeout
TIMEOUTR TEXTEN LL_I2C_DisableSMBusTimeout
- Parameters:
-
I2Cx I2C Instance. ClockTimeout This parameter can be one of the following values: - LL_I2C_SMBUS_TIMEOUTA
- LL_I2C_SMBUS_TIMEOUTB
- LL_I2C_SMBUS_ALL_TIMEOUT
- Return values:
-
None
Definition at line 1238 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. CR1 WUPEN LL_I2C_DisableWakeUpFromStop
- Parameters:
-
I2Cx I2C Instance.
- Return values:
-
None
Definition at line 715 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 TXDR TXDATA LL_I2C_DMA_GetRegAddr
RXDR RXDATA LL_I2C_DMA_GetRegAddr.
- Parameters:
-
I2Cx I2C Instance Direction This parameter can be one of the following values: - LL_I2C_DMA_REG_DATA_TRANSMIT
- LL_I2C_DMA_REG_DATA_RECEIVE
- Return values:
-
Address of data register
Definition at line 607 of file stm32l4xx_ll_i2c.h.
__STATIC_INLINE void LL_I2C_Enable | ( | I2C_TypeDef * | I2Cx ) |
Enable I2C peripheral (PE = 1).
CR1 PE LL_I2C_Enable
- Parameters:
-
I2Cx I2C Instance.
- Return values:
-
None
Definition at line 419 of file stm32l4xx_ll_i2c.h.
__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). CR1 ANFOFF LL_I2C_EnableAnalogFilter
- Parameters:
-
I2Cx I2C Instance.
- Return values:
-
None
Definition at line 503 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). CR1 NOSTRETCH LL_I2C_EnableClockStretching
- Parameters:
-
I2Cx I2C Instance.
- Return values:
-
None
Definition at line 632 of file stm32l4xx_ll_i2c.h.
__STATIC_INLINE void LL_I2C_EnableDMAReq_RX | ( | I2C_TypeDef * | I2Cx ) |
Enable DMA reception requests.
CR1 RXDMAEN LL_I2C_EnableDMAReq_RX
- Parameters:
-
I2Cx I2C Instance.
- Return values:
-
None
Definition at line 570 of file stm32l4xx_ll_i2c.h.
__STATIC_INLINE void LL_I2C_EnableDMAReq_TX | ( | I2C_TypeDef * | I2Cx ) |
Enable DMA transmission requests.
CR1 TXDMAEN LL_I2C_EnableDMAReq_TX
- Parameters:
-
I2Cx I2C Instance.
- Return values:
-
None
Definition at line 537 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. CR1 GCEN LL_I2C_EnableGeneralCall
- Parameters:
-
I2Cx I2C Instance.
- Return values:
-
None
Definition at line 740 of file stm32l4xx_ll_i2c.h.
__STATIC_INLINE void LL_I2C_EnableOwnAddress1 | ( | I2C_TypeDef * | I2Cx ) |
Enable acknowledge on Own Address1 match address.
OAR1 OA1EN LL_I2C_EnableOwnAddress1
- Parameters:
-
I2Cx I2C Instance.
- Return values:
-
None
Definition at line 818 of file stm32l4xx_ll_i2c.h.
__STATIC_INLINE void LL_I2C_EnableOwnAddress2 | ( | I2C_TypeDef * | I2Cx ) |
Enable acknowledge on Own Address2 match address.
OAR2 OA2EN LL_I2C_EnableOwnAddress2
- Parameters:
-
I2Cx I2C Instance.
- Return values:
-
None
Definition at line 874 of file stm32l4xx_ll_i2c.h.
__STATIC_INLINE void LL_I2C_EnableSlaveByteControl | ( | I2C_TypeDef * | I2Cx ) |
Enable hardware byte control in slave mode.
CR1 SBC LL_I2C_EnableSlaveByteControl
- Parameters:
-
I2Cx I2C Instance.
- Return values:
-
None
Definition at line 666 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. CR1 ALERTEN LL_I2C_EnableSMBusAlert
- Parameters:
-
I2Cx I2C Instance.
- Return values:
-
None
Definition at line 1020 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. CR1 PECEN LL_I2C_EnableSMBusPEC
- Parameters:
-
I2Cx I2C Instance.
- Return values:
-
None
Definition at line 1064 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. TIMEOUTR TIMOUTEN LL_I2C_EnableSMBusTimeout
TIMEOUTR TEXTEN LL_I2C_EnableSMBusTimeout
- Parameters:
-
I2Cx I2C Instance. ClockTimeout This parameter can be one of the following values: - LL_I2C_SMBUS_TIMEOUTA
- LL_I2C_SMBUS_TIMEOUTB
- LL_I2C_SMBUS_ALL_TIMEOUT
- Return values:
-
None
Definition at line 1220 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. CR1 WUPEN LL_I2C_EnableWakeUpFromStop
- Parameters:
-
I2Cx I2C Instance.
- Return values:
-
None
Definition at line 702 of file stm32l4xx_ll_i2c.h.
__STATIC_INLINE uint32_t LL_I2C_GetClockHighPeriod | ( | I2C_TypeDef * | I2Cx ) |
Get the SCL high period setting.
TIMINGR SCLH LL_I2C_GetClockHighPeriod
- Parameters:
-
I2Cx I2C Instance.
- Return values:
-
Value between Min_Data=0x00 and Max_Data=0xFF
Definition at line 943 of file stm32l4xx_ll_i2c.h.
__STATIC_INLINE uint32_t LL_I2C_GetClockLowPeriod | ( | I2C_TypeDef * | I2Cx ) |
Get the SCL low period setting.
TIMINGR SCLL LL_I2C_GetClockLowPeriod
- Parameters:
-
I2Cx I2C Instance.
- Return values:
-
Value between Min_Data=0x00 and Max_Data=0xFF
Definition at line 932 of file stm32l4xx_ll_i2c.h.
__STATIC_INLINE uint32_t LL_I2C_GetDataHoldTime | ( | I2C_TypeDef * | I2Cx ) |
Get the SDA hold time.
TIMINGR SDADEL LL_I2C_GetDataHoldTime
- Parameters:
-
I2Cx I2C Instance.
- Return values:
-
Value between Min_Data=0x0 and Max_Data=0xF
Definition at line 954 of file stm32l4xx_ll_i2c.h.
__STATIC_INLINE uint32_t LL_I2C_GetDataSetupTime | ( | I2C_TypeDef * | I2Cx ) |
Get the SDA setup time.
TIMINGR SCLDEL LL_I2C_GetDataSetupTime
- Parameters:
-
I2Cx I2C Instance.
- Return values:
-
Value between Min_Data=0x0 and Max_Data=0xF
Definition at line 965 of file stm32l4xx_ll_i2c.h.
__STATIC_INLINE uint32_t LL_I2C_GetDigitalFilter | ( | I2C_TypeDef * | I2Cx ) |
Get the current Digital Noise Filter configuration.
CR1 DNF LL_I2C_GetDigitalFilter
- Parameters:
-
I2Cx I2C Instance.
- Return values:
-
Value between Min_Data=0x0 and Max_Data=0xF
Definition at line 491 of file stm32l4xx_ll_i2c.h.
__STATIC_INLINE uint32_t LL_I2C_GetMasterAddressingMode | ( | I2C_TypeDef * | I2Cx ) |
Get the Master addressing mode.
CR2 ADD10 LL_I2C_GetMasterAddressingMode
- Parameters:
-
I2Cx I2C Instance.
- Return values:
-
Returned value can be one of the following values: - LL_I2C_ADDRESSING_MODE_7BIT
- LL_I2C_ADDRESSING_MODE_10BIT
Definition at line 791 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. CR1 SMBHEN LL_I2C_GetMode
CR1 SMBDEN LL_I2C_GetMode
- Parameters:
-
I2Cx I2C Instance.
- Return values:
-
Returned value 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 1002 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. TIMEOUTR TIMEOUTA LL_I2C_GetSMBusTimeoutA
- Parameters:
-
I2Cx I2C Instance.
- Return values:
-
Value between Min_Data=0 and Max_Data=0xFFF
Definition at line 1142 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. TIMEOUTR TIDLE LL_I2C_GetSMBusTimeoutAMode
- Parameters:
-
I2Cx I2C Instance.
- Return values:
-
Returned value can be one of the following values: - LL_I2C_SMBUS_TIMEOUTA_MODE_SCL_LOW
- LL_I2C_SMBUS_TIMEOUTA_MODE_SDA_SCL_HIGH
Definition at line 1174 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. TIMEOUTR TIMEOUTB LL_I2C_GetSMBusTimeoutB
- Parameters:
-
I2Cx I2C Instance.
- Return values:
-
Value between Min_Data=0 and Max_Data=0xFFF
Definition at line 1202 of file stm32l4xx_ll_i2c.h.
__STATIC_INLINE uint32_t LL_I2C_GetTimingPrescaler | ( | I2C_TypeDef * | I2Cx ) |
Get the Timing Prescaler setting.
TIMINGR PRESC LL_I2C_GetTimingPrescaler
- Parameters:
-
I2Cx I2C Instance.
- Return values:
-
Value between Min_Data=0x0 and Max_Data=0xF
Definition at line 921 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.
CR1 PE LL_I2C_IsEnabled
- Parameters:
-
I2Cx I2C Instance.
- Return values:
-
State of bit (1 or 0).
Definition at line 444 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.
CR1 ANFOFF LL_I2C_IsEnabledAnalogFilter
- Parameters:
-
I2Cx I2C Instance.
- Return values:
-
State of bit (1 or 0).
Definition at line 526 of file stm32l4xx_ll_i2c.h.
__STATIC_INLINE uint32_t LL_I2C_IsEnabledClockStretching | ( | I2C_TypeDef * | I2Cx ) |
Check if Clock stretching is enabled or disabled.
CR1 NOSTRETCH LL_I2C_IsEnabledClockStretching
- Parameters:
-
I2Cx I2C Instance.
- Return values:
-
State of bit (1 or 0).
Definition at line 655 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.
CR1 RXDMAEN LL_I2C_IsEnabledDMAReq_RX
- Parameters:
-
I2Cx I2C Instance.
- Return values:
-
State of bit (1 or 0).
Definition at line 592 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.
CR1 TXDMAEN LL_I2C_IsEnabledDMAReq_TX
- Parameters:
-
I2Cx I2C Instance.
- Return values:
-
State of bit (1 or 0).
Definition at line 559 of file stm32l4xx_ll_i2c.h.
__STATIC_INLINE uint32_t LL_I2C_IsEnabledGeneralCall | ( | I2C_TypeDef * | I2Cx ) |
Check if General Call is enabled or disabled.
CR1 GCEN LL_I2C_IsEnabledGeneralCall
- Parameters:
-
I2Cx I2C Instance.
- Return values:
-
State of bit (1 or 0).
Definition at line 763 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.
OAR1 OA1EN LL_I2C_IsEnabledOwnAddress1
- Parameters:
-
I2Cx I2C Instance.
- Return values:
-
State of bit (1 or 0).
Definition at line 840 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.
OAR2 OA2EN LL_I2C_IsEnabledOwnAddress2
- Parameters:
-
I2Cx I2C Instance.
- Return values:
-
State of bit (1 or 0).
Definition at line 896 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.
CR1 SBC LL_I2C_IsEnabledSlaveByteControl
- Parameters:
-
I2Cx I2C Instance.
- Return values:
-
State of bit (1 or 0).
Definition at line 688 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. CR1 ALERTEN LL_I2C_IsEnabledSMBusAlert
- Parameters:
-
I2Cx I2C Instance.
- Return values:
-
State of bit (1 or 0).
Definition at line 1051 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. CR1 PECEN LL_I2C_IsEnabledSMBusPEC
- Parameters:
-
I2Cx I2C Instance.
- Return values:
-
State of bit (1 or 0).
Definition at line 1090 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. TIMEOUTR TIMOUTEN LL_I2C_IsEnabledSMBusTimeout
TIMEOUTR TEXTEN LL_I2C_IsEnabledSMBusTimeout
- Parameters:
-
I2Cx I2C Instance. ClockTimeout This parameter can be one of the following values: - LL_I2C_SMBUS_TIMEOUTA
- LL_I2C_SMBUS_TIMEOUTB
- LL_I2C_SMBUS_ALL_TIMEOUT
- Return values:
-
State of bit (1 or 0).
Definition at line 1256 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. CR1 WUPEN LL_I2C_IsEnabledWakeUpFromStop
- Parameters:
-
I2Cx I2C Instance.
- Return values:
-
State of bit (1 or 0).
Definition at line 728 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). CR1 DNF LL_I2C_SetDigitalFilter
- Parameters:
-
I2Cx I2C Instance. DigitalFilter This parameter must be a value between 0x00 (Digital filter disabled) and 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 480 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. CR2 ADD10 LL_I2C_SetMasterAddressingMode
- Parameters:
-
I2Cx I2C Instance. AddressingMode This parameter can be one of the following values: - LL_I2C_ADDRESSING_MODE_7BIT
- LL_I2C_ADDRESSING_MODE_10BIT
- Return values:
-
None
Definition at line 778 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. CR1 SMBHEN LL_I2C_SetMode
CR1 SMBDEN LL_I2C_SetMode
- Parameters:
-
I2Cx I2C Instance. PeripheralMode This 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 984 of file stm32l4xx_ll_i2c.h.
__STATIC_INLINE void LL_I2C_SetOwnAddress1 | ( | I2C_TypeDef * | I2Cx, |
uint32_t | OwnAddress1, | ||
uint32_t | OwnAddrSize | ||
) |
Set the Own Address1.
OAR1 OA1 LL_I2C_SetOwnAddress1
OAR1 OA1MODE LL_I2C_SetOwnAddress1
- Parameters:
-
I2Cx I2C Instance. OwnAddress1 This parameter must be a value between 0 and 0x3FF. OwnAddrSize This parameter can be one of the following values: - LL_I2C_OWNADDRESS1_7BIT
- LL_I2C_OWNADDRESS1_10BIT
- Return values:
-
None
Definition at line 807 of file stm32l4xx_ll_i2c.h.
__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. OAR2 OA2 LL_I2C_SetOwnAddress2
OAR2 OA2MSK LL_I2C_SetOwnAddress2
- Parameters:
-
I2Cx I2C Instance. OwnAddress2 Value between 0 and 0x7F. OwnAddrMask This parameter can be one of the following values: - LL_I2C_OWNADDRESS2_NOMASK
- LL_I2C_OWNADDRESS2_MASK01
- LL_I2C_OWNADDRESS2_MASK02
- LL_I2C_OWNADDRESS2_MASK03
- LL_I2C_OWNADDRESS2_MASK04
- LL_I2C_OWNADDRESS2_MASK05
- LL_I2C_OWNADDRESS2_MASK06
- LL_I2C_OWNADDRESS2_MASK07
- Return values:
-
None
Definition at line 863 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. TIMEOUTR TIMEOUTA LL_I2C_SetSMBusTimeoutA
- Parameters:
-
I2Cx I2C Instance. TimeoutA This parameter must be a value between Min_Data=0 and Max_Data=0xFFF.
- Return values:
-
None
Definition at line 1129 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. TIMEOUTR TIDLE LL_I2C_SetSMBusTimeoutAMode
- Parameters:
-
I2Cx I2C Instance. TimeoutAMode This parameter can be one of the following values: - LL_I2C_SMBUS_TIMEOUTA_MODE_SCL_LOW
- LL_I2C_SMBUS_TIMEOUTA_MODE_SDA_SCL_HIGH
- Return values:
-
None
Definition at line 1159 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. TIMEOUTR TIMEOUTB LL_I2C_SetSMBusTimeoutB
- Parameters:
-
I2Cx I2C Instance. TimeoutB This parameter must be a value between Min_Data=0 and Max_Data=0xFFF.
- Return values:
-
None
Definition at line 1189 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). TIMINGR TIMINGR LL_I2C_SetTiming
- Parameters:
-
I2Cx I2C Instance. Timing This parameter must be a value between 0 and 0xFFFFFFFF.
- Note:
- This parameter is computed with the STM32CubeMX Tool.
- Return values:
-
None
Definition at line 910 of file stm32l4xx_ll_i2c.h.
Generated on Tue Jul 12 2022 17:38:57 by
