/* Deinitializes the SPI peripheral registers to their default reset values.  */
void SPI_DeInit(SPI_TypeDef *SPIx)
/* Deinitializes the SPI peripheral registers to their default reset values.  */
void SPI_DeInit(SPI_TypeDef *SPIx)
{
  SPIx->CR1    = SPI_CR1_RESET_VALUE;
  SPIx->CR2    = SPI_CR2_RESET_VALUE;
  SPIx->CR3    = SPI_CR3_RESET_VALUE;
  SPIx->SR     = SPI_SR_RESET_VALUE;
  SPIx->CRCPR  = SPI_CRCPR_RESET_VALUE;
}