diff options
| author | Scott Shawcroft <scott@adafruit.com> | 2019-12-10 13:55:25 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-12-10 13:55:25 -0800 |
| commit | 024ba978ec909d39d411a74b443d2ffa20250fa6 (patch) | |
| tree | 49173f5aee00bffed722c437f3b6361e485aedde /lib/oofatfs | |
| parent | 387ab6c87eac8481934a7ffc4a96395fe5f34747 (diff) | |
| parent | a08d9e6d8e0059c8aa59feadd7b94d95d691e273 (diff) | |
Merge pull request #2337 from jepler/mp35.0.0-beta.1
Add MP3 playback
Diffstat (limited to 'lib/oofatfs')
| -rw-r--r-- | lib/oofatfs/ff.c | 6 | ||||
| -rw-r--r-- | lib/oofatfs/ffconf.h | 6 |
2 files changed, 11 insertions, 1 deletions
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 */ |
