/* Deinitialize SPI to the default state (reset value).  */
void SPI_DeInit(SPI_Type *pSPI)
/* Deinitialize SPI to the default state (reset value).  */
void SPI_DeInit(SPI_Type *pSPI)
{  
    int16 i;
    pSPI->C1 = SPI_C1_DEFAULT;
    pSPI->C2 = SPI_C2_DEFAULT;
    pSPI->BR = SPI_BR_DEFAULT;
    pSPI->M  = SPI_M_DEFAULT;
    for(i = 0; i<100; i++);
}