/* Enables or disables the specified SPI peripheral (in I2S mode).  */
void I2S_Cmd(SPI_TypeDef *SPIx, FunctionalState NewState)
/* Enables or disables the specified SPI peripheral (in I2S mode).  */
void I2S_Cmd(SPI_TypeDef *SPIx, FunctionalState NewState)
{
    assert_param(IS_SPI_1_PERIPH(SPIx));
    assert_param(IS_FUNCTIONAL_STATE(NewState));
    if (NewState != DISABLE)
    {
        SPIx->I2SCFGR |= SPI_I2SCFGR_I2SE;
    }
    else
    {
        SPIx->I2SCFGR &= (uint16_t)~((uint16_t)SPI_I2SCFGR_I2SE);
    }
}