| Description | The function UnInit de-initializes the SPI serial interface. It is invoked by the function funinit. Use the function at run-time to disable the embedded Flash or SD Card. Afterwards, invoke only the function finit to re-initialize the drive. The function is part of the SPI Driver. The prototype is defined in the file File_Config.h. Developers must customize the function. |
| Example |
/* SPI Device Driver Control Block */
SPI_DRV spi0_drv = {
Init,
UnInit,
Send,
SendBuf,
RecBuf,
BusSpeed,
SetSS,
CheckMedia
};
/* Return SSP interface to default state. */
static BOOL UnInit (void) {
IODIR0 &= ~(1<<20);
PINSEL1 &= ~0x000003FC;
SSPCR1 = 0x0000;
SSPCR0 = 0x0000;
SSPCPSR = 0x00;
return (__TRUE);
}
|