Merge pull request #1128 from gregdavill/fatfs-alignment-fix

software.fatfs: Align fatfs sector buffers
This commit is contained in:
enjoy-digital 2021-12-10 21:54:34 +01:00 committed by GitHub
commit 649c45e962
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -172,7 +172,7 @@ typedef struct {
LBA_t bitbase; /* Allocation bitmap base sector */ LBA_t bitbase; /* Allocation bitmap base sector */
#endif #endif
LBA_t winsect; /* Current sector appearing in the win[] */ LBA_t winsect; /* Current sector appearing in the win[] */
BYTE win[FF_MAX_SS]; /* Disk access window for Directory, FAT (and file data at tiny cfg) */ BYTE win[FF_MAX_SS] __attribute__ ((aligned (4))); /* Disk access window for Directory, FAT (and file data at tiny cfg) */
} FATFS; } FATFS;
@ -217,7 +217,7 @@ typedef struct {
DWORD* cltbl; /* Pointer to the cluster link map table (nulled on open, set by application) */ DWORD* cltbl; /* Pointer to the cluster link map table (nulled on open, set by application) */
#endif #endif
#if !FF_FS_TINY #if !FF_FS_TINY
BYTE buf[FF_MAX_SS]; /* File private data read/write window */ BYTE buf[FF_MAX_SS] __attribute__ ((aligned (4))); /* File private data read/write window */
#endif #endif
} FIL; } FIL;