/* Checks whether the specified SPI interrupt has occurred or not.  */
ITStatus SPI_GetITStatus(SPI_TypeDef *spi, SPI_IT_TypeDef interrupt)
/* Checks whether the specified SPI interrupt has occurred or not.  */
ITStatus SPI_GetITStatus(SPI_TypeDef *spi, SPI_IT_TypeDef interrupt)
{
    return (spi->ISR & interrupt) ? SET : RESET;
}