10 #error This function may not be compatible with this revision of FatFs module. 25 DWORD csz, tcl, ncl, ccl, cl;
31 tcl = (len + csz - 1) / csz;
35 if (len == fp->
fsize) {
39 if (cl + 1 < 3)
return 0;
40 if (cl != ccl + 1 &&; cl < fp->
fs->
n_fatent)
break;
42 }
while (++ncl < tcl);
52 ccl = cl = 2; ncl = 0;
92 printf(
"Function failed due to any error or insufficient contiguous area.\n");
DWORD clust2sect(FATFS *fs, DWORD clst)
FRESULT put_fat(FATFS *fs, DWORD clst, DWORD val)
FRESULT f_truncate(FIL *fp)
DRESULT disk_write(BYTE pdrv, const BYTE *buff, DWORD sector, UINT count)
Writes Sector(s)
FRESULT f_lseek(FIL *fp, DWORD ofs)
DWORD allocate_contiguous_clusters(FIL *fp, DWORD len)
DWORD get_fat(FATFS *fs, DWORD clst)
FRESULT f_mount(FATFS *fs, const TCHAR *path, BYTE opt)
FRESULT f_open(FIL *fp, const TCHAR *path, BYTE mode)