SD acceleration, display file size in menu (fw side)
This commit is contained in:
6
src/ff.c
6
src/ff.c
@@ -2175,8 +2175,12 @@ FRESULT f_read (
|
||||
if (csect + cc > fp->fs->csize) /* Clip at cluster boundary */
|
||||
cc = fp->fs->csize - csect;
|
||||
/* XXX OFFLOAD GOES HERE */
|
||||
if (ff_sd_offload) {
|
||||
sd_offload = 1;
|
||||
}
|
||||
if (disk_read(fp->fs->drv, rbuff, sect, (BYTE)cc) != RES_OK)
|
||||
ABORT(fp->fs, FR_DISK_ERR);
|
||||
sd_offload = 0;
|
||||
#if !_FS_READONLY && _FS_MINIMIZE <= 2 /* Replace one of the read sectors with cached data if it contains a dirty sector */
|
||||
#if _FS_TINY
|
||||
if (fp->fs->wflag && fp->fs->winsect - sect < cc)
|
||||
@@ -2214,7 +2218,7 @@ FRESULT f_read (
|
||||
mem_cpy(rbuff, &fp->buf[fp->fptr % SS(fp->fs)], rcnt); /* Pick partial sector */
|
||||
#endif
|
||||
}
|
||||
|
||||
ff_sd_offload = 0;
|
||||
LEAVE_FF(fp->fs, FR_OK);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user