/* Checks whether the specified SPI/I2S flag is set or not.  */
uint8_t SPI_I2S_ReadStatusFlag(SPI_T *spi, SPI_FLAG_T flag)
/* Checks whether the specified SPI/I2S flag is set or not.  */
uint8_t SPI_I2S_ReadStatusFlag(SPI_T *spi, SPI_FLAG_T flag)
{
    return (spi->STS & flag) ? SET : RESET;
}