HAL
__HAL_I2C_GET_FLAG is only used within HAL.
 
Symbols
loading...
Files
loading...

__HAL_I2C_GET_FLAG macro

Checks whether the specified I2C flag is set or not.

Syntax

#define __HAL_I2C_GET_FLAG(__HANDLE__, __FLAG__) ((((uint8_t)((__FLAG__) >> 16U)) == 0x01U) ? \     (((((__HANDLE__)->Instance->SR1) & ((__FLAG__) & I2C_FLAG_MASK)) == ((__FLAG__) & I2C_FLAG_MASK)) ? SET : RESET) : \     (((((__HANDLE__)->Instance->SR2) & ((__FLAG__) & I2C_FLAG_MASK)) == ((__FLAG__) & I2C_FLAG_MASK)) ? SET : RESET))

Arguments

__HANDLE__

specifies the I2C Handle.

__FLAG__

specifies the flag to check. This parameter can be one of the following values: @arg I2C_FLAG_OVR: Overrun/Underrun flag @arg I2C_FLAG_AF: Acknowledge failure flag @arg I2C_FLAG_ARLO: Arbitration lost flag @arg I2C_FLAG_BERR: Bus error flag @arg I2C_FLAG_TXE: Data register empty flag @arg I2C_FLAG_RXNE: Data register not empty flag @arg I2C_FLAG_STOPF: Stop detection flag @arg I2C_FLAG_ADD10: 10-bit header sent flag @arg I2C_FLAG_BTF: Byte transfer finished flag @arg I2C_FLAG_ADDR: Address sent flag Address matched flag @arg I2C_FLAG_SB: Start bit flag @arg I2C_FLAG_DUALF: Dual flag @arg I2C_FLAG_GENCALL: General call header flag @arg I2C_FLAG_TRA: Transmitter/Receiver flag @arg I2C_FLAG_BUSY: Bus busy flag @arg I2C_FLAG_MSL: Master/Slave flag

Return value

The new state of __FLAG__ (TRUE or FALSE).

References

LocationText
stm32f4xx_hal_i2c.h:475
#define __HAL_I2C_GET_FLAG(__HANDLE__, __FLAG__) ((((uint8_t)((__FLAG__) >> 16U)) == 0x01U) ? \
stm32f4xx_hal_i2c.c:962
if (__HAL_I2C_GET_FLAG(hi2c, I2C_FLAG_TXE) != RESET)
stm32f4xx_hal_i2c.c:1124
if ((__HAL_I2C_GET_FLAG(hi2c, I2C_FLAG_BTF) == SET) && (hi2c->XferSize != 0U))
stm32f4xx_hal_i2c.c:1383
if (__HAL_I2C_GET_FLAG(hi2c, I2C_FLAG_BTF) == SET)
stm32f4xx_hal_i2c.c:1509
if ((__HAL_I2C_GET_FLAG(hi2c, I2C_FLAG_BTF) == SET) && (hi2c->XferSize != 0U))
stm32f4xx_hal_i2c.c:1626
if ((__HAL_I2C_GET_FLAG(hi2c, I2C_FLAG_BTF) == SET) && (hi2c->XferSize != 0U))
stm32f4xx_hal_i2c.c:1700
while (__HAL_I2C_GET_FLAG(hi2c, I2C_FLAG_BUSY) != RESET);
stm32f4xx_hal_i2c.c:1777
while (__HAL_I2C_GET_FLAG(hi2c, I2C_FLAG_BUSY) != RESET);
stm32f4xx_hal_i2c.c:1984
while (__HAL_I2C_GET_FLAG(hi2c, I2C_FLAG_BUSY) != RESET);
stm32f4xx_hal_i2c.c:2139
while (__HAL_I2C_GET_FLAG(hi2c, I2C_FLAG_BUSY) != RESET);
stm32f4xx_hal_i2c.c:2571
if ((__HAL_I2C_GET_FLAG(hi2c, I2C_FLAG_BTF) == SET) && (hi2c->XferSize != 0U))
stm32f4xx_hal_i2c.c:2832
if (__HAL_I2C_GET_FLAG(hi2c, I2C_FLAG_BTF) == SET)
stm32f4xx_hal_i2c.c:2902
while (__HAL_I2C_GET_FLAG(hi2c, I2C_FLAG_BUSY) != RESET);
stm32f4xx_hal_i2c.c:2987
while (__HAL_I2C_GET_FLAG(hi2c, I2C_FLAG_BUSY) != RESET);
stm32f4xx_hal_i2c.c:3082
while (__HAL_I2C_GET_FLAG(hi2c, I2C_FLAG_BUSY) != RESET);
stm32f4xx_hal_i2c.c:3263
while (__HAL_I2C_GET_FLAG(hi2c, I2C_FLAG_BUSY) != RESET);
stm32f4xx_hal_i2c.c:3487
tmp1 = __HAL_I2C_GET_FLAG(hi2c, I2C_FLAG_ADDR);
stm32f4xx_hal_i2c.c:3488
tmp2 = __HAL_I2C_GET_FLAG(hi2c, I2C_FLAG_AF);
stm32f4xx_hal_i2c.c:3495
tmp1 = __HAL_I2C_GET_FLAG(hi2c, I2C_FLAG_ADDR);
stm32f4xx_hal_i2c.c:3496
tmp2 = __HAL_I2C_GET_FLAG(hi2c, I2C_FLAG_AF);
stm32f4xx_hal_i2c.c:3502
if (__HAL_I2C_GET_FLAG(hi2c, I2C_FLAG_ADDR) == SET)
stm32f4xx_hal_i2c.c:3596
while (__HAL_I2C_GET_FLAG(hi2c, I2C_FLAG_BUSY) != RESET);
stm32f4xx_hal_i2c.c:3692
while (__HAL_I2C_GET_FLAG(hi2c, I2C_FLAG_BUSY) != RESET);
stm32f4xx_hal_i2c.c:3872
while (__HAL_I2C_GET_FLAG(hi2c, I2C_FLAG_BUSY) != RESET);
stm32f4xx_hal_i2c.c:3994
while (__HAL_I2C_GET_FLAG(hi2c, I2C_FLAG_BUSY) != RESET);
stm32f4xx_hal_i2c.c:4732
if ((__HAL_I2C_GET_FLAG(hi2c, I2C_FLAG_BUSY) != RESET) && ((CurrentMode == HAL_I2C_MODE_MASTER) ||
stm32f4xx_hal_i2c.c:6252
if (__HAL_I2C_GET_FLAG(hi2c, I2C_FLAG_BTF) == SET)
stm32f4xx_hal_i2c.c:6265
if (__HAL_I2C_GET_FLAG(hi2c, I2C_FLAG_RXNE) == SET)
stm32f4xx_hal_i2c.c:6473
if (__HAL_I2C_GET_FLAG(hi2c, I2C_FLAG_RXNE) == SET)
stm32f4xx_hal_i2c.c:6498
if (__HAL_I2C_GET_FLAG(hi2c, I2C_FLAG_RXNE) == SET)
stm32f4xx_hal_i2c.c:6520
if (__HAL_I2C_GET_FLAG(hi2c, I2C_FLAG_RXNE) == SET)
stm32f4xx_hal_i2c.c:7228
while (__HAL_I2C_GET_FLAG(hi2c, Flag) == Status)
stm32f4xx_hal_i2c.c:7235
if ((__HAL_I2C_GET_FLAG(hi2c, Flag) == Status))
stm32f4xx_hal_i2c.c:7264
while (__HAL_I2C_GET_FLAG(hi2c, Flag) == RESET)
stm32f4xx_hal_i2c.c:7266
if (__HAL_I2C_GET_FLAG(hi2c, I2C_FLAG_AF) == SET)
stm32f4xx_hal_i2c.c:7290
if ((__HAL_I2C_GET_FLAG(hi2c, Flag) == RESET))
stm32f4xx_hal_i2c.c:7318
while (__HAL_I2C_GET_FLAG(hi2c, I2C_FLAG_TXE) == RESET)
stm32f4xx_hal_i2c.c:7331
if ((__HAL_I2C_GET_FLAG(hi2c, I2C_FLAG_TXE) == RESET))
stm32f4xx_hal_i2c.c:7359
while (__HAL_I2C_GET_FLAG(hi2c, I2C_FLAG_BTF) == RESET)
stm32f4xx_hal_i2c.c:7372
if ((__HAL_I2C_GET_FLAG(hi2c, I2C_FLAG_BTF) == RESET))
stm32f4xx_hal_i2c.c:7400
while (__HAL_I2C_GET_FLAG(hi2c, I2C_FLAG_STOPF) == RESET)
stm32f4xx_hal_i2c.c:7411
if ((__HAL_I2C_GET_FLAG(hi2c, I2C_FLAG_STOPF) == RESET))
stm32f4xx_hal_i2c.c:7466
while (__HAL_I2C_GET_FLAG(hi2c, I2C_FLAG_RXNE) == RESET)
stm32f4xx_hal_i2c.c:7469
if (__HAL_I2C_GET_FLAG(hi2c, I2C_FLAG_STOPF) == SET)
stm32f4xx_hal_i2c.c:7488
if ((__HAL_I2C_GET_FLAG(hi2c, I2C_FLAG_RXNE) == RESET))
stm32f4xx_hal_i2c.c:7513
if (__HAL_I2C_GET_FLAG(hi2c, I2C_FLAG_AF) == SET)