예제 #1
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;
}
예제 #2
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
}
예제 #3
0
DSTATUS disk_status (
	BYTE drv		/* Physical drive nmuber (0..) */
)
{
	DSTATUS stat = STA_NOINIT ;
	int result;

	switch (drv) {
	case ATA :
		//result = ATA_disk_status();
		// translate the reslut code here

		return stat;

	case MMC :
		stat = MMC_disk_status(0);
		// translate the reslut code here

		return stat;

	case USB :
		stat = USB_disk_status();
		// translate the reslut code here

		return stat;
	}
	return STA_NOINIT;
}
예제 #4
0
DSTATUS disk_status(BYTE drv /* Physical drive number (0..) */
)
{
	DSTATUS stat;
	int result;

	(void) result;

	switch (drv)
	{
	case ATA:
		// result = ATA_disk_status();
		stat = STA_NOINIT;
		// translate the result code here

		return stat;

	case MMC:
		stat = MMC_disk_status();
		return stat;

	case USB:
#if ( WITH_USB_MS == 1 )
		stat = usb_status;
#else
		stat = STA_NOINIT;
#endif
		return stat;
	}

	return STA_NOINIT;
}
예제 #5
0
파일: diskio.c 프로젝트: b-/gnuboy64
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;
}
예제 #6
0
파일: diskio.c 프로젝트: nsaspook/cpanel
DSTATUS disk_status(
	BYTE pdrv /* Physical drive nmuber (0..) */
	)
{
	int result;


	result = MMC_disk_status();
//	sprintf(error_string, "\r\n disk_status error %i ", result);
//	if (result) SpiStringWrite(error_string);
	// translate the result code here

	return result;


}
예제 #7
0
DSTATUS disk_status (
	BYTE drv		/* Physical drive nmuber (0..) */
)
{
	DSTATUS stat = 0;
	int result;


	result = MMC_disk_status();
	// translate the reslut code here
	if (result == MMC_INIT_YES) {
	  stat &= ~STA_NOINIT; // clear noinit
	} else {
	  stat |= STA_NOINIT; 
	}

	return stat;

}
예제 #8
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;
}