Beispiel #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;
}
Beispiel #2
0
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
}
Beispiel #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;
}
Beispiel #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;
}
Beispiel #5
0
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;
}
Beispiel #6
0
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;


}
Beispiel #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;

}
Beispiel #8
0
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;
}