Beispiel #1
0
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;
}
Beispiel #2
0
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
}
Beispiel #3
0
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;
}
Beispiel #4
0
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;
}
Beispiel #5
0
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;
}