/* Checks whether the specified SPI/I2S interrupt has occurred or not.  */
ITStatus SPI_I2S_GetITStatus(SPI_TypeDef *SPIx, uint8_t SPI_I2S_IT)
/* Checks whether the specified SPI/I2S interrupt has occurred or not.  */
ITStatus SPI_I2S_GetITStatus(SPI_TypeDef *SPIx, uint8_t SPI_I2S_IT)
{
  ITStatus bitstatus = RESET;
  uint16_t itpos = 0, itmask = 0, enablestatus = 0;
  assert_param(IS_SPI_ALL_PERIPH(SPIx));
  assert_param(IS_SPI_I2S_GET_IT(SPI_I2S_IT));
  itpos = 0x01 << (SPI_I2S_IT & 0x0F);
  itmask = SPI_I2S_IT >> 4;
  itmask = 0x01 << itmask;
  enablestatus = (SPIx->CR2 & itmask) ;
  if (((SPIx->SR & itpos) != (uint16_t)RESET) && enablestatus)
  {
    bitstatus = SET;
  }
  else
  {
    bitstatus = RESET;
  }
  return bitstatus;
}