SD acceleration, display file size in menu (fw side)

This commit is contained in:
ikari
2010-12-04 02:19:36 +01:00
parent f4b88ca792
commit 4bc455f12b
19 changed files with 370 additions and 370 deletions

View File

@@ -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);
}