Skip to content

Commit

Permalink
Merge pull request ARMmbed#15415 from wdx04/fix_exfat
Browse files Browse the repository at this point in the history
fix compiling errors of FATFileSystem when exFAT was enabled
  • Loading branch information
0xc0170 authored May 5, 2023
2 parents 48a89f1 + 3c17881 commit 952c286
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion storage/filesystem/fat/ChaN/ff.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -537,7 +537,7 @@ static WCHAR LfnBuf[FF_MAX_LFN + 1]; /* LFN working buffer */
#elif FF_USE_LFN == 3 /* LFN enabled with dynamic working buffer on the heap */
#if FF_FS_EXFAT
#define DEF_NAMBUF WCHAR *lfn; /* Pointer to LFN working buffer and directory entry block scratchpad buffer */
#define INIT_NAMBUF(fs) { lfn = ff_memalloc((FF_MAX_LFN+1)*2 + MAXDIRB(FF_MAX_LFN)); if (!lfn) LEAVE_FF(fs, FR_NOT_ENOUGH_CORE); (fs)->lfnbuf = lfn; (fs)->dirbuf = (BYTE*)(lfn+FF_MAX_LFN+1); }
#define INIT_NAMBUF(fs) { lfn = (WCHAR *)(ff_memalloc((FF_MAX_LFN+1)*2 + MAXDIRB(FF_MAX_LFN))); if (!lfn) LEAVE_FF(fs, FR_NOT_ENOUGH_CORE); (fs)->lfnbuf = lfn; (fs)->dirbuf = (BYTE*)(lfn+FF_MAX_LFN+1); }
#define FREE_NAMBUF() ff_memfree(lfn)
#else
#define DEF_NAMBUF WCHAR *lfn; /* Pointer to LFN working buffer */
Expand All @@ -555,6 +555,7 @@ static WCHAR LfnBuf[FF_MAX_LFN + 1]; /* LFN working buffer */




/*--------------------------------*/
/* Code conversion tables */
/*--------------------------------*/
Expand Down

0 comments on commit 952c286

Please sign in to comment.