Add Fat File

download Add Fat File

If you can't read please download the document

description

Add fat file to SD card

Transcript of Add Fat File

//PARTITIONING: /* Volume management table defined by user (required when _MULTI_PARTITION == 1) *//* Initialize a brand-new disk drive mapped to physical drive 0 */DWORD plist[] = {50, 50, 0, 0}; /* Divide drive into two partitions */BYTE work[_MAX_SS];FRESULT res2 = f_fdisk(0, plist, work); /* Divide physical drive 0 */f_mount(LUN_ID_SD_MMC_0_MEM, &fs); /* Register work area to the logical drive 0 */f_mkfs(LUN_ID_SD_MMC_0_MEM, 0, 0); /* Create FAT volume on the logical drive 0. 2nd argument is ignored. */f_mount(LUN_ID_SD_MMC_0_MEM, 0); /* Unregister work area from the logical drive 0 */f_mount(LUN_ID_SD_MMC_1_MEM, &fs2); /* Register a work area to the logical drive 1 */f_mkfs(LUN_ID_SD_MMC_1_MEM, 0, 0); /* Create FAT volume on the logical drive 1. 2nd argument is ignored. */f_mount(LUN_ID_SD_MMC_1_MEM, 0); /* Unregister work area from the logical drive 1 */// END PARTITIONING/** notes **/ -check if segregating fs and fs2 file systems actuall makes a difference