/* Checks whether the specified SPI/I2S flag is set or not.  */
FlagStatus SPI_I2S_GetStatus(SPI_Module *SPIx, uint16_t SPI_I2S_FLAG)
/* Checks whether the specified SPI/I2S flag is set or not.  */
FlagStatus SPI_I2S_GetStatus(SPI_Module *SPIx, uint16_t SPI_I2S_FLAG)
{
    FlagStatus bitstatus = RESET;
    assert_param(IS_SPI_PERIPH(SPIx));
    assert_param(IS_SPI_I2S_GET_FLAG(SPI_I2S_FLAG));
    if ((SPIx->STS & SPI_I2S_FLAG) != (uint16_t)RESET)
    {
        bitstatus = SET;
    }
    else
    {
        bitstatus = RESET;
    }
    return bitstatus;
}