/* Checks whether the specified SPI flag is set or not.  */
FlagStatus SPI_GetFlagStatus(SPI_TypeDef *SPIx, SPI_FLAG_TypeDef SPI_FLAG)
/* Checks whether the specified SPI flag is set or not.  */
FlagStatus SPI_GetFlagStatus(SPI_TypeDef *SPIx, SPI_FLAG_TypeDef SPI_FLAG)
{
  FlagStatus status = RESET;
  assert_param(IS_SPI_FLAG(SPI_FLAG));
  if ((SPIx->SR & (uint8_t)SPI_FLAG) != (uint8_t)RESET)
  {
    status = SET;
  }
  else
  {
    status = RESET;
  }
  return status;
}