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

__HAL_SPI_GET_FLAG macro

Check whether the specified SPI flag is set or not.

Syntax

#define __HAL_SPI_GET_FLAG(__HANDLE__, __FLAG__) ((((__HANDLE__)->Instance->SR) & (__FLAG__)) == (__FLAG__))

Arguments

__HANDLE__

specifies the SPI Handle. This parameter can be SPI where x: 1, 2, or 3 to select the SPI peripheral.

__FLAG__

specifies the flag to check. This parameter can be one of the following values: @arg SPI_FLAG_RXNE: Receive buffer not empty flag @arg SPI_FLAG_TXE: Transmit buffer empty flag @arg SPI_FLAG_CRCERR: CRC error flag @arg SPI_FLAG_MODF: Mode fault flag @arg SPI_FLAG_OVR: Overrun flag @arg SPI_FLAG_BSY: Busy flag @arg SPI_FLAG_FRE: Frame format error flag

Return value

The new state of __FLAG__ (TRUE or FALSE).

References

LocationText
stm32f4xx_hal_spi.h:402
#define __HAL_SPI_GET_FLAG(__HANDLE__, __FLAG__) ((((__HANDLE__)->Instance->SR) & (__FLAG__)) == (__FLAG__))
stm32f4xx_hal_spi.c:847
if (__HAL_SPI_GET_FLAG(hspi, SPI_FLAG_TXE))
stm32f4xx_hal_spi.c:877
if (__HAL_SPI_GET_FLAG(hspi, SPI_FLAG_TXE))
stm32f4xx_hal_spi.c:1018
if (__HAL_SPI_GET_FLAG(hspi, SPI_FLAG_RXNE))
stm32f4xx_hal_spi.c:1043
if (__HAL_SPI_GET_FLAG(hspi, SPI_FLAG_RXNE))
stm32f4xx_hal_spi.c:1111
if (__HAL_SPI_GET_FLAG(hspi, SPI_FLAG_CRCERR))
stm32f4xx_hal_spi.c:1239
if ((__HAL_SPI_GET_FLAG(hspi, SPI_FLAG_TXE)) && (hspi->TxXferCount > 0U) && (txallowed == 1U))
stm32f4xx_hal_spi.c:1257
if ((__HAL_SPI_GET_FLAG(hspi, SPI_FLAG_RXNE)) && (hspi->RxXferCount > 0U))
stm32f4xx_hal_spi.c:1293
if ((__HAL_SPI_GET_FLAG(hspi, SPI_FLAG_TXE)) && (hspi->TxXferCount > 0U) && (txallowed == 1U))
stm32f4xx_hal_spi.c:1311
if ((__HAL_SPI_GET_FLAG(hspi, SPI_FLAG_RXNE)) && (hspi->RxXferCount > 0U))
stm32f4xx_hal_spi.c:1347
if (__HAL_SPI_GET_FLAG(hspi, SPI_FLAG_CRCERR))
stm32f4xx_hal_spi.c:2822
if (__HAL_SPI_GET_FLAG(hspi, SPI_FLAG_CRCERR))
stm32f4xx_hal_spi.c:2902
if (__HAL_SPI_GET_FLAG(hspi, SPI_FLAG_CRCERR))
stm32f4xx_hal_spi.c:3530
while ((__HAL_SPI_GET_FLAG(hspi, Flag) ? SET : RESET) != State)
stm32f4xx_hal_spi.c:3668
} while (__HAL_SPI_GET_FLAG(hspi, SPI_FLAG_BSY) != RESET);
stm32f4xx_hal_spi.c:3716
if (__HAL_SPI_GET_FLAG(hspi, SPI_FLAG_CRCERR) != RESET)
stm32f4xx_hal_spi.c:3795
if (__HAL_SPI_GET_FLAG(hspi, SPI_FLAG_CRCERR) != RESET)