software.fatfs: Align fatfs sector buffers

This commit is contained in:
Greg Davill 2021-12-10 17:11:08 +10:30
parent 230ba5f7ba
commit 416886c723

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;