예제 #1
0
파일: diskio.c 프로젝트: Aorjoa/bootloader
DSTATUS disk_status (
	BYTE pdrv		/* Physical drive nmuber (0..) */
)
{
#ifndef CONFIG_ALLWINNER
	DSTATUS stat;
	int result;

	switch (pdrv) {
	case ATA :
		result = ATA_disk_status();

		// translate the reslut code here

		return stat;

	case MMC :
		result = MMC_disk_status();

		// translate the reslut code here

		return stat;

	case USB :
		result = USB_disk_status();

		// translate the reslut code here

		return stat;
	}
	return STA_NOINIT;
#else
	return 0;
#endif
}
예제 #2
0
DSTATUS disk_status (
	BYTE pdrv		/* Physical drive nmuber to identify the drive */
)
{
	DSTATUS stat;
	int result;

	switch (pdrv) {
	case ATA :
		result = ATA_disk_status();

		// translate the reslut code here

		return stat;

	case MMC :
		result = MMC_disk_status();

		// translate the reslut code here

		return stat;

	case USB :
		result = USB_disk_status();

		// translate the reslut code here

		return stat;
	}
	return STA_NOINIT;
}
예제 #3
0
파일: diskio.c 프로젝트: shentqlf/myboot
DSTATUS disk_status (
	              BYTE drv		/* Physical drive nmuber (0..) */
                    )
{
  DSTATUS result;
   
  switch (drv) 
  {
    case ATA :result = ATA_disk_status();return result;
    case MMC :result = SD_disk_status();return result;
    case USB :result = USB_disk_status();return result;
  }
  return STA_NOINIT;
}
예제 #4
0
파일: diskio.c 프로젝트: djyos/djyos
DSTATUS disk_status (
    BYTE pdrv       /* Physical drive nmuber to identify the drive */
)
{
	DSTATUS stat = 0;
	int result;
#if 0
	switch (pdrv) {
	case ATA :
		result = ATA_disk_status();

        // translate the reslut code here

		return stat;

    case MMC :
        result = MMC_disk_status();

        // translate the reslut code here

        	return stat;

    case USB :
        result = USB_disk_status();

        // translate the reslut code here

		return stat;
    }
#else
    result = (g_tFatDrvs[pdrv].DrvStatus)();
    if(0 == result)
		return 0; // 成功
#endif
    return STA_NOINIT;
}