Adaptation of the official mbed FATFileSystem repository to allow more than one file system volume
Dependents: DMSupport DMSupport DMSupport
Fork of DM_FATFileSystem by
Diff: ChaN/ff.cpp
- Revision:
- 6:4b97221ac12e
- Parent:
- 4:3ff2606d5713
diff -r e9018c2396af -r 4b97221ac12e ChaN/ff.cpp --- a/ChaN/ff.cpp Fri Oct 10 07:11:28 2014 +0000 +++ b/ChaN/ff.cpp Tue Dec 02 15:09:28 2014 +0000 @@ -502,7 +502,7 @@ #elif _USE_LFN == 3 /* LFN feature with dynamic working buffer on the heap */ #define DEF_NAMEBUF BYTE sfn[12]; WCHAR *lfn -#define INIT_BUF(dobj) { lfn = ff_memalloc((_MAX_LFN + 1) * 2); \ +#define INIT_BUF(dobj) { lfn = (WCHAR *)ff_memalloc((_MAX_LFN + 1) * 2); \ if (!lfn) LEAVE_FF((dobj).fs, FR_NOT_ENOUGH_CORE); \ (dobj).lfn = lfn; (dobj).fn = sfn; } #define FREE_BUF() ff_memfree(lfn) @@ -609,7 +609,7 @@ static FRESULT chk_lock ( /* Check if the file can be accessed */ - DIR* dj, /* Directory object pointing the file to be checked */ + FATFS_DIR* dj, /* Directory object pointing the file to be checked */ int acc /* Desired access (0:Read, 1:Write, 2:Delete/Rename) */ ) { @@ -645,7 +645,7 @@ static UINT inc_lock ( /* Increment file open counter and returns its index (0:int error) */ - DIR* dj, /* Directory object pointing the file to register or increment */ + FATFS_DIR* dj, /* Directory object pointing the file to register or increment */ int acc /* Desired access mode (0:Read, !0:Write) */ ) {