| Example |
/* MCI Device Driver Control Block */
MCI_DRV mci0_drv = {
Init,
UnInit,
Delay,
BusMode,
BusWidth,
BusSpeed,
Command,
ReadBlock,
WriteBlock,
NULL,
CheckMedia /* Can be NULL if not existing */
};
/* Set MCI Bus width. */
static BOOL BusWidth (U32 width) {
switch (width) {
case 1:
MCI_CLOCK &= ~0x0800;
return (__TRUE);
case 4:
MCI_CLOCK |= 0x0800;
return (__TRUE);
}
return (__FALSE);
}
|