diff options
| author | Hierophect <hierophect@gmail.com> | 2019-12-12 12:47:48 -0500 |
|---|---|---|
| committer | Hierophect <hierophect@gmail.com> | 2019-12-12 12:47:48 -0500 |
| commit | 39f3063ed4a79cc5b9b0dcd17c45ef285b343a02 (patch) | |
| tree | d4572014e0ab1c61c34fafdabf68c490b8571289 /lib | |
| parent | 885a1415d0b9b223ce8f77ea4e4d773c2eb28a5c (diff) | |
| parent | b220befef80018c9d0a280a98597e96cd5350808 (diff) | |
Merge remote-tracking branch 'upstream/master' into update-tusb
Diffstat (limited to 'lib')
| m--------- | lib/mp3 | 0 | ||||
| -rw-r--r-- | lib/oofatfs/ff.c | 6 | ||||
| -rw-r--r-- | lib/oofatfs/ffconf.h | 6 |
3 files changed, 11 insertions, 1 deletions
diff --git a/lib/mp3 b/lib/mp3 new file mode 160000 +Subproject 2a3cc7873b5c642d4bb60043dc14d2555e3377a diff --git a/lib/oofatfs/ff.c b/lib/oofatfs/ff.c index b0984756b..71bd19702 100644 --- a/lib/oofatfs/ff.c +++ b/lib/oofatfs/ff.c @@ -3382,7 +3382,11 @@ FRESULT f_read ( if (!sect) ABORT(fs, FR_INT_ERR); sect += csect; cc = btr / SS(fs); /* When remaining bytes >= sector size, */ - if (cc) { /* Read maximum contiguous sectors directly */ + if (cc +#if _FS_DISK_READ_ALIGNED + && (((int)rbuff & 3) == 0) +#endif + ) {/* Read maximum contiguous sectors directly */ if (csect + cc > fs->csize) { /* Clip at cluster boundary */ cc = fs->csize - csect; } diff --git a/lib/oofatfs/ffconf.h b/lib/oofatfs/ffconf.h index 214311b4c..a3795fa3f 100644 --- a/lib/oofatfs/ffconf.h +++ b/lib/oofatfs/ffconf.h @@ -343,6 +343,12 @@ / SemaphoreHandle_t and etc.. A header file for O/S definitions needs to be / included somewhere in the scope of ff.h. */ +// Set to nonzero if buffers passed to disk_read have a word alignment +// restriction +#ifndef _FS_DISK_READ_ALIGNED +#define _FS_DISK_READ_ALIGNED 0 +#endif + /* #include <windows.h> // O/S definitions */ |
