| Description | The function UnInit deinitializes the MCI controller. The function is part of the MCI Driver. The prototype is defined in the file File_Config.h. Developers must customize the function. UnInit is invoked by the function funinit. Use UnInit at run-time to disable the device. After calling this function, only invoke the function finit for re-initializing the drive. |
| Example |
/* MCI Device Driver Control Block */
MCI_DRV mci0_drv = {
Init,
UnInit,
Delay,
BusMode,
BusWidth,
BusSpeed,
Command,
ReadBlock,
WriteBlock,
NULL,
CheckMedia
};
/* Reset the MCI peripheral to default state. */
static BOOL UnInit (void) {
MCI_POWER = 0x00; /* Power down, switch off VCC for the Flash Card. */
MCI_COMMAND = 0; /* Clear all pending interrupts. */
MCI_DATA_CTRL = 0;
MCI_CLEAR = 0x7FF;
PINSEL1 &= ~0x00003FC0; /* Disable MCI pins. */
PINSEL4 &= ~0x0FC00000;
PCONP &= ~0x10000000; /* Power Down the MCI controller. */
return (__TRUE);
}
|