/* Checks whether the specified SPI/I2S interrupt has occurred or not.  */
INTStatus SPI_I2S_GetIntStatus(SPI_Module *SPIx, uint8_t SPI_I2S_IT)
/* Checks whether the specified SPI/I2S interrupt has occurred or not.  */
INTStatus SPI_I2S_GetIntStatus(SPI_Module *SPIx, uint8_t SPI_I2S_IT)
{
    INTStatus bitstatus = RESET;
    uint16_t itpos = 0, itmask = 0, enablestatus = 0;
    assert_param(IS_SPI_PERIPH(SPIx));
    assert_param(IS_SPI_I2S_GET_INT(SPI_I2S_IT));
    itpos = 0x01 << (SPI_I2S_IT & 0x0F);
    itmask = SPI_I2S_IT >> 4;
    itmask = 0x01 << itmask;
    enablestatus = (SPIx->CTRL2 & itmask);
    if (((SPIx->STS & itpos) != (uint16_t)RESET) && enablestatus)
    {
        bitstatus = SET;
    }
    else
    {
        bitstatus = RESET;
    }
    return bitstatus;
}