__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).