/* Checks whether the specified SPI interrupt has occurred or not.  */
ITStatus SPI_GetITStatus(SPI_TypeDef *SPIx, uint8_t SPI_IT)
/* Checks whether the specified SPI interrupt has occurred or not.  */
ITStatus SPI_GetITStatus(SPI_TypeDef *SPIx, uint8_t SPI_IT)
{
    ITStatus bitstatus = RESET;
    assert_param(IS_SPI_ALL_PERIPH(SPIx));
    assert_param(IS_SPI_GET_IT(SPI_IT));
    if ((SPIx->INTSTAT & SPI_IT) != (uint16_t)RESET)
    {
        bitstatus = SET;
    }
    else
    {
        bitstatus = RESET;
    }
    return bitstatus;
}