/* Deinitializes the SPIx peripheral registers to their default reset values (Affects also the I2Ss).  */
void SPI_I2S_DeInit(SPI_Module *SPIx)
/* Deinitializes the SPIx peripheral registers to their default reset values (Affects also the I2Ss).  */
void SPI_I2S_DeInit(SPI_Module *SPIx)
{
    assert_param(IS_SPI_PERIPH(SPIx));
    if (SPIx == SPI1)
    {
        RCC_EnableAPB2PeriphReset(RCC_APB2_PERIPH_SPI1, ENABLE);
        RCC_EnableAPB2PeriphReset(RCC_APB2_PERIPH_SPI1, DISABLE);
    }
    else if (SPIx == SPI2)
    {
        RCC_EnableAPB2PeriphReset(RCC_APB2_PERIPH_SPI2, ENABLE);
        RCC_EnableAPB2PeriphReset(RCC_APB2_PERIPH_SPI2, DISABLE);
    }
}