DSTATUS disk_initialize ( BYTE pdrv /* Physical drive nmuber to identify the drive */ ) { DSTATUS stat; int result; switch (pdrv) { case ATA : result = ATA_disk_initialize(); // translate the reslut code here return stat; case MMC : result = MMC_disk_initialize(); // translate the reslut code here return stat; case USB : result = USB_disk_initialize(); // translate the reslut code here return stat; } return STA_NOINIT; }
DSTATUS disk_initialize ( BYTE pdrv /* Physical drive nmuber (0..) */ ) { #ifndef CONFIG_ALLWINNER DSTATUS stat; int result; switch (pdrv) { case ATA : result = ATA_disk_initialize(); // translate the reslut code here return stat; case MMC : result = MMC_disk_initialize(); // translate the reslut code here return stat; case USB : result = USB_disk_initialize(); // translate the reslut code here return stat; } return STA_NOINIT; #else return 0; #endif }
DSTATUS disk_initialize ( BYTE drv /* Physical drive nmuber (0..) */ ) { DSTATUS stat = STA_NOINIT; int result; PRINT_Log("disk_initialize for disk %x \n\r",drv); switch (drv) { case ATA : //result = ATA_disk_initialize(); // translate the reslut code here return stat; case MMC : result = MMC_disk_initialize(0); // translate the reslut code here stat = RES_OK ; driveAttached = TRUE ; return stat; case USB : result = USB_disk_initialize(); // translate the reslut code here stat = RES_OK ; driveAttached = TRUE ; return stat; } PRINT_Log("disk_initialize return problem"); return STA_NOINIT; }
DSTATUS disk_initialize ( BYTE drv /* Physical drive nmuber (0..) */ ) { DSTATUS result; switch (drv) { case ATA :result = ATA_disk_initialize();return result; case MMC :result = SD_disk_initialize();return result; case USB :result = USB_disk_initialize();return result; } return STA_NOINIT; }
DSTATUS disk_initialize ( BYTE drv /* Physical drive nmuber (0..) */ ) { DSTATUS stat; unsigned char result; switch (drv) { #ifdef PAKAI_ATA case ATA : result = ATA_disk_initialize(); // translate the reslut code here return stat; #endif #ifdef PAKAI_MMC case MMC : result = MMC_disk_initialize(); // translate the reslut code here return stat; #endif #ifdef PAKAI_USB_STORAGE case USB : result = USB_disk_initialize(); // translate the reslut code here return stat; #endif case SDC : result = init_sdc(); // translate the reslut code here return stat; case ROM : return stat; } return STA_NOINIT; }
DSTATUS disk_initialize ( BYTE pdrv /* Physical drive nmuber to identify the drive(设备号) */ ) { DSTATUS stat = 0; int result; #if 0 switch (pdrv) { case ATA : result = ATA_disk_initialize(); // translate the reslut code here return stat; case MMC : result = MMC_disk_initialize(); // translate the reslut code here return stat; case USB : result = USB_disk_initialize(); // translate the reslut code here return stat; } #else result = (g_tFatDrvs[pdrv].DrvInitialize)(); if(0 == result) return stat; // 成功 #endif return STA_NOINIT; }