DSTATUS disk_status ( BYTE pdrv /* Physical drive nmuber to identify the drive */ ) { DSTATUS stat; int result; switch (pdrv) { case DEV_RAM : result = RAM_disk_status(); // translate the reslut code here return stat; case DEV_MMC : result = MMC_disk_status(); // translate the reslut code here return stat; case DEB_USB : result = USB_disk_status(); // translate the reslut code here return stat; } return STA_NOINIT; }
DSTATUS disk_status ( BYTE drv /* Physical drive nmuber (0..) */ ) { if (drv == RAM) return RAM_disk_status(); if (drv == MMC) return MMC_disk_status(); return STA_NOINIT; }