DRESULT disk_ioctl ( BYTE pdrv, /* Physical drive nmuber (0..) */ BYTE cmd, /* Control code */ void *buff /* Buffer to send/receive control data */ ) { DRESULT res; int result; switch (pdrv) { case ATA : // Process of the command for the ATA drive result = ATA_disk_ioctl(cmd, buff); return res; case MMC : // Process of the command for the MMC/SD card return MMC_disk_ioctl(pdrv, cmd, buff); case USB : // Process of the command the USB drive result = USB_disk_ioctl(cmd, buff); return res; } return RES_PARERR; }
DRESULT disk_ioctl ( BYTE drv, /* Physical drive nmuber (0..) */ BYTE ctrl, /* Control code */ void *buff /* Buffer to send/receive control data */ ) { DRESULT res; int result; switch (drv) { #ifdef PAKAI_ATA case ATA : // pre-process here result = ATA_disk_ioctl(ctrl, buff); // post-process here return res; #endif #ifdef PAKAI_MMC case MMC : // pre-process here result = MMC_disk_ioctl(ctrl, buff); // post-process here return res; #endif #ifdef PAKAI_USB_STORAGE case USB : // pre-process here result = USB_disk_ioctl(ctrl, buff); // post-process here return res; #endif case SDC : return res; case ROM : return res; } return RES_PARERR; }
DRESULT disk_ioctl ( BYTE drv, /* Physical drive nmuber (0..) */ BYTE ctrl, /* Control code */ void *buff /* Buffer to send/receive control data */ ) { DRESULT result; switch (drv) { case ATA :result = ATA_disk_ioctl(ctrl, buff);return result; case MMC :result = MMC_disk_ioctl(ctrl, buff);return result; case USB :result = USB_disk_ioctl(ctrl, buff);return result; } return RES_PARERR; }
DRESULT disk_ioctl ( BYTE pdrv, /* Physical drive nmuber (0..) */ BYTE cmd, /* Control code */ void *buff /* Buffer to send/receive control data */ ) { #ifndef CONFIG_ALLWINNER DRESULT res; int result; switch (pdrv) { case ATA : // pre-process here result = ATA_disk_ioctl(cmd, buff); // post-process here return res; case MMC : // pre-process here result = MMC_disk_ioctl(cmd, buff); // post-process here return res; case USB : // pre-process here result = USB_disk_ioctl(cmd, buff); // post-process here return res; } return RES_PARERR; #else return RES_OK; #endif }
DRESULT disk_ioctl ( BYTE drv, /* Physical drive nmuber (0..) */ BYTE ctrl, /* Control code */ void *buff /* Buffer to send/receive control data */ ) { DRESULT res; switch (drv) { case ATA : // pre-process here //result = ATA_disk_ioctl(ctrl, buff); // post-process here return res; case MMC : // pre-process here //result = MMC_disk_ioctl(ctrl, buff); res = MMC_disk_ioctl ( 0, /* Physical drive number (0) */ ctrl, /* Control code */ buff /* Buffer to send/receive control data */ ); // post-process here return res; case USB : // pre-process here res = USB_disk_ioctl(ctrl, buff); // post-process here return res; } return RES_PARERR; }