STM32L4xx_HAL_Driver  1.14.0

Functions

__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_TXIS (I2C_TypeDef *I2Cx)
 Indicate the status of Transmit interrupt flag. 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_ADDR (I2C_TypeDef *I2Cx)
 Indicate the status of Address matched flag (slave mode). More...
 
__STATIC_INLINE uint32_t LL_I2C_IsActiveFlag_NACK (I2C_TypeDef *I2Cx)
 Indicate the status of Not Acknowledge received flag. More...
 
__STATIC_INLINE uint32_t LL_I2C_IsActiveFlag_STOP (I2C_TypeDef *I2Cx)
 Indicate the status of Stop detection flag. More...
 
__STATIC_INLINE uint32_t LL_I2C_IsActiveFlag_TC (I2C_TypeDef *I2Cx)
 Indicate the status of Transfer complete flag (master mode). More...
 
__STATIC_INLINE uint32_t LL_I2C_IsActiveFlag_TCR (I2C_TypeDef *I2Cx)
 Indicate the status of Transfer complete flag (master 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 (slave mode). 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 void LL_I2C_ClearFlag_ADDR (I2C_TypeDef *I2Cx)
 Clear Address Matched flag. ICR ADDRCF LL_I2C_ClearFlag_ADDR. More...
 
__STATIC_INLINE void LL_I2C_ClearFlag_NACK (I2C_TypeDef *I2Cx)
 Clear Not Acknowledge flag. ICR NACKCF LL_I2C_ClearFlag_NACK. More...
 
__STATIC_INLINE void LL_I2C_ClearFlag_STOP (I2C_TypeDef *I2Cx)
 Clear Stop detection flag. ICR STOPCF LL_I2C_ClearFlag_STOP. More...
 
__STATIC_INLINE void LL_I2C_ClearFlag_TXE (I2C_TypeDef *I2Cx)
 Clear Transmit data register empty flag (TXE). More...
 
__STATIC_INLINE void LL_I2C_ClearFlag_BERR (I2C_TypeDef *I2Cx)
 Clear Bus error flag. ICR BERRCF LL_I2C_ClearFlag_BERR. More...
 
__STATIC_INLINE void LL_I2C_ClearFlag_ARLO (I2C_TypeDef *I2Cx)
 Clear Arbitration lost flag. ICR ARLOCF LL_I2C_ClearFlag_ARLO. More...
 
__STATIC_INLINE void LL_I2C_ClearFlag_OVR (I2C_TypeDef *I2Cx)
 Clear Overrun/Underrun flag. ICR OVRCF LL_I2C_ClearFlag_OVR. More...
 
__STATIC_INLINE void LL_I2C_ClearSMBusFlag_PECERR (I2C_TypeDef *I2Cx)
 Clear SMBus PEC error flag. 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...
 

Detailed Description

Function Documentation

◆ LL_I2C_ClearFlag_ADDR()

__STATIC_INLINE void LL_I2C_ClearFlag_ADDR ( I2C_TypeDef *  I2Cx)

Clear Address Matched flag. ICR ADDRCF LL_I2C_ClearFlag_ADDR.

Parameters
I2CxI2C Instance.
Return values
None

Definition at line 1711 of file stm32l4xx_ll_i2c.h.

1712 {
1713  SET_BIT(I2Cx->ICR, I2C_ICR_ADDRCF);
1714 }

◆ LL_I2C_ClearFlag_ARLO()

__STATIC_INLINE void LL_I2C_ClearFlag_ARLO ( I2C_TypeDef *  I2Cx)

Clear Arbitration lost flag. ICR ARLOCF LL_I2C_ClearFlag_ARLO.

Parameters
I2CxI2C Instance.
Return values
None

Definition at line 1767 of file stm32l4xx_ll_i2c.h.

1768 {
1769  SET_BIT(I2Cx->ICR, I2C_ICR_ARLOCF);
1770 }

◆ LL_I2C_ClearFlag_BERR()

__STATIC_INLINE void LL_I2C_ClearFlag_BERR ( I2C_TypeDef *  I2Cx)

Clear Bus error flag. ICR BERRCF LL_I2C_ClearFlag_BERR.

Parameters
I2CxI2C Instance.
Return values
None

Definition at line 1756 of file stm32l4xx_ll_i2c.h.

1757 {
1758  SET_BIT(I2Cx->ICR, I2C_ICR_BERRCF);
1759 }

◆ LL_I2C_ClearFlag_NACK()

__STATIC_INLINE void LL_I2C_ClearFlag_NACK ( I2C_TypeDef *  I2Cx)

Clear Not Acknowledge flag. ICR NACKCF LL_I2C_ClearFlag_NACK.

Parameters
I2CxI2C Instance.
Return values
None

Definition at line 1722 of file stm32l4xx_ll_i2c.h.

1723 {
1724  SET_BIT(I2Cx->ICR, I2C_ICR_NACKCF);
1725 }

◆ LL_I2C_ClearFlag_OVR()

__STATIC_INLINE void LL_I2C_ClearFlag_OVR ( I2C_TypeDef *  I2Cx)

Clear Overrun/Underrun flag. ICR OVRCF LL_I2C_ClearFlag_OVR.

Parameters
I2CxI2C Instance.
Return values
None

Definition at line 1778 of file stm32l4xx_ll_i2c.h.

1779 {
1780  SET_BIT(I2Cx->ICR, I2C_ICR_OVRCF);
1781 }

◆ LL_I2C_ClearFlag_STOP()

__STATIC_INLINE void LL_I2C_ClearFlag_STOP ( I2C_TypeDef *  I2Cx)

Clear Stop detection flag. ICR STOPCF LL_I2C_ClearFlag_STOP.

Parameters
I2CxI2C Instance.
Return values
None

Definition at line 1733 of file stm32l4xx_ll_i2c.h.

1734 {
1735  SET_BIT(I2Cx->ICR, I2C_ICR_STOPCF);
1736 }

◆ LL_I2C_ClearFlag_TXE()

__STATIC_INLINE void LL_I2C_ClearFlag_TXE ( I2C_TypeDef *  I2Cx)

Clear Transmit data register empty flag (TXE).

Note
This bit can be clear by software in order to flush the transmit data register (TXDR). ISR TXE LL_I2C_ClearFlag_TXE
Parameters
I2CxI2C Instance.
Return values
None

Definition at line 1745 of file stm32l4xx_ll_i2c.h.

1746 {
1747  WRITE_REG(I2Cx->ISR, I2C_ISR_TXE);
1748 }

◆ LL_I2C_ClearSMBusFlag_ALERT()

__STATIC_INLINE void LL_I2C_ClearSMBusFlag_ALERT ( I2C_TypeDef *  I2Cx)

Clear SMBus Alert flag.

Note
Macro IS_SMBUS_ALL_INSTANCE(I2Cx) can be used to check whether or not SMBus feature is supported by the I2Cx Instance. ICR ALERTCF LL_I2C_ClearSMBusFlag_ALERT
Parameters
I2CxI2C Instance.
Return values
None

Definition at line 1817 of file stm32l4xx_ll_i2c.h.

1818 {
1819  SET_BIT(I2Cx->ICR, I2C_ICR_ALERTCF);
1820 }

◆ LL_I2C_ClearSMBusFlag_PECERR()

__STATIC_INLINE void LL_I2C_ClearSMBusFlag_PECERR ( I2C_TypeDef *  I2Cx)

Clear SMBus PEC error flag.

Note
Macro IS_SMBUS_ALL_INSTANCE(I2Cx) can be used to check whether or not SMBus feature is supported by the I2Cx Instance. ICR PECCF LL_I2C_ClearSMBusFlag_PECERR
Parameters
I2CxI2C Instance.
Return values
None

Definition at line 1791 of file stm32l4xx_ll_i2c.h.

1792 {
1793  SET_BIT(I2Cx->ICR, I2C_ICR_PECCF);
1794 }

◆ LL_I2C_ClearSMBusFlag_TIMEOUT()

__STATIC_INLINE void LL_I2C_ClearSMBusFlag_TIMEOUT ( I2C_TypeDef *  I2Cx)

Clear SMBus Timeout detection flag.

Note
Macro IS_SMBUS_ALL_INSTANCE(I2Cx) can be used to check whether or not SMBus feature is supported by the I2Cx Instance. ICR TIMOUTCF LL_I2C_ClearSMBusFlag_TIMEOUT
Parameters
I2CxI2C Instance.
Return values
None

Definition at line 1804 of file stm32l4xx_ll_i2c.h.

1805 {
1806  SET_BIT(I2Cx->ICR, I2C_ICR_TIMOUTCF);
1807 }

◆ LL_I2C_IsActiveFlag_ADDR()

__STATIC_INLINE uint32_t LL_I2C_IsActiveFlag_ADDR ( I2C_TypeDef *  I2Cx)

Indicate the status of Address matched flag (slave mode).

Note
RESET: Clear default value. SET: When the received slave address matched with one of the enabled slave address. ISR ADDR LL_I2C_IsActiveFlag_ADDR
Parameters
I2CxI2C Instance.
Return values
Stateof bit (1 or 0).

Definition at line 1550 of file stm32l4xx_ll_i2c.h.

1551 {
1552  return ((READ_BIT(I2Cx->ISR, I2C_ISR_ADDR) == (I2C_ISR_ADDR)) ? 1UL : 0UL);
1553 }

◆ LL_I2C_IsActiveFlag_ARLO()

__STATIC_INLINE uint32_t LL_I2C_IsActiveFlag_ARLO ( I2C_TypeDef *  I2Cx)

Indicate the status of Arbitration lost flag.

Note
RESET: Clear default value. SET: When arbitration lost. ISR ARLO LL_I2C_IsActiveFlag_ARLO
Parameters
I2CxI2C Instance.
Return values
Stateof bit (1 or 0).

Definition at line 1628 of file stm32l4xx_ll_i2c.h.

1629 {
1630  return ((READ_BIT(I2Cx->ISR, I2C_ISR_ARLO) == (I2C_ISR_ARLO)) ? 1UL : 0UL);
1631 }

◆ LL_I2C_IsActiveFlag_BERR()

__STATIC_INLINE uint32_t LL_I2C_IsActiveFlag_BERR ( I2C_TypeDef *  I2Cx)

Indicate the status of Bus error flag.

Note
RESET: Clear default value. SET: When a misplaced Start or Stop condition is detected. ISR BERR LL_I2C_IsActiveFlag_BERR
Parameters
I2CxI2C Instance.
Return values
Stateof bit (1 or 0).

Definition at line 1615 of file stm32l4xx_ll_i2c.h.

1616 {
1617  return ((READ_BIT(I2Cx->ISR, I2C_ISR_BERR) == (I2C_ISR_BERR)) ? 1UL : 0UL);
1618 }

◆ LL_I2C_IsActiveFlag_BUSY()

__STATIC_INLINE uint32_t LL_I2C_IsActiveFlag_BUSY ( I2C_TypeDef *  I2Cx)

Indicate the status of Bus Busy flag.

Note
RESET: Clear default value. SET: When a Start condition is detected. ISR BUSY LL_I2C_IsActiveFlag_BUSY
Parameters
I2CxI2C Instance.
Return values
Stateof bit (1 or 0).

Definition at line 1700 of file stm32l4xx_ll_i2c.h.

1701 {
1702  return ((READ_BIT(I2Cx->ISR, I2C_ISR_BUSY) == (I2C_ISR_BUSY)) ? 1UL : 0UL);
1703 }

◆ LL_I2C_IsActiveFlag_NACK()

__STATIC_INLINE uint32_t LL_I2C_IsActiveFlag_NACK ( I2C_TypeDef *  I2Cx)

Indicate the status of Not Acknowledge received flag.

Note
RESET: Clear default value. SET: When a NACK is received after a byte transmission. ISR NACKF LL_I2C_IsActiveFlag_NACK
Parameters
I2CxI2C Instance.
Return values
Stateof bit (1 or 0).

Definition at line 1563 of file stm32l4xx_ll_i2c.h.

1564 {
1565  return ((READ_BIT(I2Cx->ISR, I2C_ISR_NACKF) == (I2C_ISR_NACKF)) ? 1UL : 0UL);
1566 }

◆ LL_I2C_IsActiveFlag_OVR()

__STATIC_INLINE uint32_t LL_I2C_IsActiveFlag_OVR ( I2C_TypeDef *  I2Cx)

Indicate the status of Overrun/Underrun flag (slave mode).

Note
RESET: Clear default value. SET: When an overrun/underrun error occurs (Clock Stretching Disabled). ISR OVR LL_I2C_IsActiveFlag_OVR
Parameters
I2CxI2C Instance.
Return values
Stateof bit (1 or 0).

Definition at line 1641 of file stm32l4xx_ll_i2c.h.

1642 {
1643  return ((READ_BIT(I2Cx->ISR, I2C_ISR_OVR) == (I2C_ISR_OVR)) ? 1UL : 0UL);
1644 }

◆ LL_I2C_IsActiveFlag_RXNE()

__STATIC_INLINE uint32_t LL_I2C_IsActiveFlag_RXNE ( I2C_TypeDef *  I2Cx)

Indicate the status of Receive data register not empty flag.

Note
RESET: When Receive data register is read. SET: When the received data is copied in Receive data register. ISR RXNE LL_I2C_IsActiveFlag_RXNE
Parameters
I2CxI2C Instance.
Return values
Stateof bit (1 or 0).

Definition at line 1537 of file stm32l4xx_ll_i2c.h.

1538 {
1539  return ((READ_BIT(I2Cx->ISR, I2C_ISR_RXNE) == (I2C_ISR_RXNE)) ? 1UL : 0UL);
1540 }

◆ LL_I2C_IsActiveFlag_STOP()

__STATIC_INLINE uint32_t LL_I2C_IsActiveFlag_STOP ( I2C_TypeDef *  I2Cx)

Indicate the status of Stop detection flag.

Note
RESET: Clear default value. SET: When a Stop condition is detected. ISR STOPF LL_I2C_IsActiveFlag_STOP
Parameters
I2CxI2C Instance.
Return values
Stateof bit (1 or 0).

Definition at line 1576 of file stm32l4xx_ll_i2c.h.

1577 {
1578  return ((READ_BIT(I2Cx->ISR, I2C_ISR_STOPF) == (I2C_ISR_STOPF)) ? 1UL : 0UL);
1579 }

◆ LL_I2C_IsActiveFlag_TC()

__STATIC_INLINE uint32_t LL_I2C_IsActiveFlag_TC ( I2C_TypeDef *  I2Cx)

Indicate the status of Transfer complete flag (master mode).

Note
RESET: Clear default value. SET: When RELOAD=0, AUTOEND=0 and NBYTES date have been transferred. ISR TC LL_I2C_IsActiveFlag_TC
Parameters
I2CxI2C Instance.
Return values
Stateof bit (1 or 0).

Definition at line 1589 of file stm32l4xx_ll_i2c.h.

1590 {
1591  return ((READ_BIT(I2Cx->ISR, I2C_ISR_TC) == (I2C_ISR_TC)) ? 1UL : 0UL);
1592 }

◆ LL_I2C_IsActiveFlag_TCR()

__STATIC_INLINE uint32_t LL_I2C_IsActiveFlag_TCR ( I2C_TypeDef *  I2Cx)

Indicate the status of Transfer complete flag (master mode).

Note
RESET: Clear default value. SET: When RELOAD=1 and NBYTES date have been transferred. ISR TCR LL_I2C_IsActiveFlag_TCR
Parameters
I2CxI2C Instance.
Return values
Stateof bit (1 or 0).

Definition at line 1602 of file stm32l4xx_ll_i2c.h.

1603 {
1604  return ((READ_BIT(I2Cx->ISR, I2C_ISR_TCR) == (I2C_ISR_TCR)) ? 1UL : 0UL);
1605 }

◆ LL_I2C_IsActiveFlag_TXE()

__STATIC_INLINE uint32_t LL_I2C_IsActiveFlag_TXE ( I2C_TypeDef *  I2Cx)

Indicate the status of Transmit data register empty flag.

Note
RESET: When next data is written in Transmit data register. SET: When Transmit data register is empty. ISR TXE LL_I2C_IsActiveFlag_TXE
Parameters
I2CxI2C Instance.
Return values
Stateof bit (1 or 0).

Definition at line 1511 of file stm32l4xx_ll_i2c.h.

1512 {
1513  return ((READ_BIT(I2Cx->ISR, I2C_ISR_TXE) == (I2C_ISR_TXE)) ? 1UL : 0UL);
1514 }

◆ LL_I2C_IsActiveFlag_TXIS()

__STATIC_INLINE uint32_t LL_I2C_IsActiveFlag_TXIS ( I2C_TypeDef *  I2Cx)

Indicate the status of Transmit interrupt flag.

Note
RESET: When next data is written in Transmit data register. SET: When Transmit data register is empty. ISR TXIS LL_I2C_IsActiveFlag_TXIS
Parameters
I2CxI2C Instance.
Return values
Stateof bit (1 or 0).

Definition at line 1524 of file stm32l4xx_ll_i2c.h.

1525 {
1526  return ((READ_BIT(I2Cx->ISR, I2C_ISR_TXIS) == (I2C_ISR_TXIS)) ? 1UL : 0UL);
1527 }

◆ LL_I2C_IsActiveSMBusFlag_ALERT()

__STATIC_INLINE uint32_t LL_I2C_IsActiveSMBusFlag_ALERT ( I2C_TypeDef *  I2Cx)

Indicate the status of SMBus alert flag.

Note
Macro IS_SMBUS_ALL_INSTANCE(I2Cx) can be used to check whether or not SMBus feature is supported by the I2Cx Instance.
RESET: Clear default value. SET: When SMBus host configuration, SMBus alert enabled and a falling edge event occurs on SMBA pin. ISR ALERT LL_I2C_IsActiveSMBusFlag_ALERT
Parameters
I2CxI2C Instance.
Return values
Stateof bit (1 or 0).

Definition at line 1687 of file stm32l4xx_ll_i2c.h.

1688 {
1689  return ((READ_BIT(I2Cx->ISR, I2C_ISR_ALERT) == (I2C_ISR_ALERT)) ? 1UL : 0UL);
1690 }

◆ LL_I2C_IsActiveSMBusFlag_PECERR()

__STATIC_INLINE uint32_t LL_I2C_IsActiveSMBusFlag_PECERR ( I2C_TypeDef *  I2Cx)

Indicate the status of SMBus PEC error flag in reception.

Note
Macro IS_SMBUS_ALL_INSTANCE(I2Cx) can be used to check whether or not SMBus feature is supported by the I2Cx Instance.
RESET: Clear default value. SET: When the received PEC does not match with the PEC register content. ISR PECERR LL_I2C_IsActiveSMBusFlag_PECERR
Parameters
I2CxI2C Instance.
Return values
Stateof bit (1 or 0).

Definition at line 1656 of file stm32l4xx_ll_i2c.h.

1657 {
1658  return ((READ_BIT(I2Cx->ISR, I2C_ISR_PECERR) == (I2C_ISR_PECERR)) ? 1UL : 0UL);
1659 }

◆ LL_I2C_IsActiveSMBusFlag_TIMEOUT()

__STATIC_INLINE uint32_t LL_I2C_IsActiveSMBusFlag_TIMEOUT ( I2C_TypeDef *  I2Cx)

Indicate the status of SMBus Timeout detection flag.

Note
Macro IS_SMBUS_ALL_INSTANCE(I2Cx) can be used to check whether or not SMBus feature is supported by the I2Cx Instance.
RESET: Clear default value. SET: When a timeout or extended clock timeout occurs. ISR TIMEOUT LL_I2C_IsActiveSMBusFlag_TIMEOUT
Parameters
I2CxI2C Instance.
Return values
Stateof bit (1 or 0).

Definition at line 1671 of file stm32l4xx_ll_i2c.h.

1672 {
1673  return ((READ_BIT(I2Cx->ISR, I2C_ISR_TIMEOUT) == (I2C_ISR_TIMEOUT)) ? 1UL : 0UL);
1674 }