Skip to content
This repository has been archived by the owner on Aug 17, 2019. It is now read-only.

Commit

Permalink
Update FatFS
Browse files Browse the repository at this point in the history
  • Loading branch information
mid-kid committed Apr 19, 2016
1 parent ec40102 commit 5245c7b
Show file tree
Hide file tree
Showing 12 changed files with 3,585 additions and 1,864 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,73 +3,98 @@
----------------------------------------------------------------------------

R0.00 (February 26, 2006)

Prototype.



R0.01 (April 29, 2006)

First stable version.



R0.02 (June 01, 2006)

Added FAT12 support.
Removed unbuffered mode.
Fixed a problem on small (<32M) partition.



R0.02a (June 10, 2006)

Added a configuration option (_FS_MINIMUM).



R0.03 (September 22, 2006)

Added f_rename().
Changed option _FS_MINIMUM to _FS_MINIMIZE.



R0.03a (December 11, 2006)

Improved cluster scan algorithm to write files fast.
Fixed f_mkdir() creates incorrect directory on FAT32.



R0.04 (February 04, 2007)

Added f_mkfs().
Supported multiple drive system.
Changed some interfaces for multiple drive system.
Changed f_mountdrv() to f_mount().



R0.04a (April 01, 2007)

Supported multiple partitions on a physical drive.
Added a capability of extending file size to f_lseek().
Added minimization level 3.
Fixed an endian sensitive code in f_mkfs().



R0.04b (May 05, 2007)

Added a configuration option _USE_NTFLAG.
Added FSINFO support.
Fixed DBCS name can result FR_INVALID_NAME.
Fixed short seek (<= csize) collapses the file object.



R0.05 (August 25, 2007)

Changed arguments of f_read(), f_write() and f_mkfs().
Fixed f_mkfs() on FAT32 creates incorrect FSINFO.
Fixed f_mkdir() on FAT32 creates incorrect directory.



R0.05a (February 03, 2008)

Added f_truncate() and f_utime().
Fixed off by one error at FAT sub-type determination.
Fixed btr in f_read() can be mistruncated.
Fixed cached sector is not flushed when create and close without write.



R0.06 (April 01, 2008)

Added fputc(), fputs(), fprintf() and fgets().
Improved performance of f_lseek() on moving to the same or following cluster.



R0.07 (April 01, 2009)

Merged Tiny-FatFs as a configuration option. (_FS_TINY)
Added long file name feature. (_USE_LFN)
Added multiple code page feature. (_CODE_PAGE)
Expand All @@ -80,28 +105,36 @@ R0.07 (April 01, 2009)
Renamed string functions to avoid name collision.



R0.07a (April 14, 2009)

Septemberarated out OS dependent code on reentrant cfg.
Added multiple sector size feature.



R0.07c (June 21, 2009)

Fixed f_unlink() can return FR_OK on error.
Fixed wrong cache control in f_lseek().
Added relative path feature.
Added f_chdir() and f_chdrive().
Added proper case conversion to extended character.



R0.07e (November 03, 2009)

Septemberarated out configuration options from ff.h to ffconf.h.
Fixed f_unlink() fails to remove a sub-directory on _FS_RPATH.
Fixed name matching error on the 13 character boundary.
Added a configuration option, _LFN_UNICODE.
Changed f_readdir() to return the SFN with always upper case on non-LFN cfg.



R0.08 (May 15, 2010)

Added a memory configuration option. (_USE_LFN = 3)
Added file lock feature. (_FS_SHARE)
Added fast seek feature. (_USE_FASTSEEK)
Expand All @@ -110,36 +143,48 @@ R0.08 (May 15, 2010)
String functions support UTF-8 encoding files on Unicode cfg.



R0.08a (August 16, 2010)

Added f_getcwd(). (_FS_RPATH = 2)
Added sector erase feature. (_USE_ERASE)
Moved file lock semaphore table from fs object to the bss.
Fixed f_mkfs() creates wrong FAT32 volume.



R0.08b (January 15, 2011)

Fast seek feature is also applied to f_read() and f_write().
f_lseek() reports required table size on creating CLMP.
Extended format syntax of f_printf().
Ignores duplicated directory separators in given path name.



R0.09 (September 06, 2011)

f_mkfs() supports multiple partition to complete the multiple partition feature.
Added f_fdisk().



R0.09a (August 27, 2012)

Changed f_open() and f_opendir() reject null object pointer to avoid crash.
Changed option name _FS_SHARE to _FS_LOCK.
Fixed assertion failure due to OS/2 EA on FAT12/16 volume.



R0.09b (January 24, 2013)

Added f_setlabel() and f_getlabel().



R0.10 (October 02, 2013)

Added selection of character encoding on the file. (_STRF_ENCODE)
Added f_closedir().
Added forced full FAT scan for f_getfree(). (_FS_NOFSINFO)
Expand All @@ -148,10 +193,12 @@ R0.10 (October 02, 2013)
Improved write throughput of f_puts() and f_printf().
Changed argument of f_chdrive(), f_mkfs(), disk_read() and disk_write().
Fixed f_write() can be truncated when the file size is close to 4GB.
Fixed f_open(), f_mkdir() and f_setlabel() can return incorrect error code.
Fixed f_open(), f_mkdir() and f_setlabel() can return incorrect value on error.



R0.10a (January 15, 2014)

Added arbitrary strings as drive number in the path name. (_STR_VOLUME_ID)
Added a configuration option of minimum sector size. (_MIN_SS)
2nd argument of f_rename() can have a drive number and it will be ignored.
Expand All @@ -161,20 +208,47 @@ R0.10a (January 15, 2014)
Fixed creation of an entry with LFN fails on too many SFN collisions. (appeared at R0.07)



R0.10b (May 19, 2014)

Fixed a hard error in the disk I/O layer can collapse the directory entry.
Fixed LFN entry is not deleted on delete/rename an object with lossy converted SFN. (appeared at R0.07)



R0.10c (November 09, 2014)

Added a configuration option for the platforms without RTC. (_FS_NORTC)
Changed option name _USE_ERASE to _USE_TRIM.
Fixed volume label created by Mac OS X cannot be retrieved with f_getlabel(). (appeared at R0.09b)
Fixed a potential problem of FAT access that can appear on disk error.
Fixed null pointer dereference on attempting to delete the root direcotry. (appeared at R0.08)



R0.11 (February 09, 2015)

Added f_findfirst(), f_findnext() and f_findclose(). (_USE_FIND)
Fixed f_unlink() does not remove cluster chain of the file. (appeared at R0.10c)
Fixed _FS_NORTC option does not work properly. (appeared at R0.10c)



R0.11a (September 05, 2015)

Fixed wrong media change can lead a deadlock at thread-safe configuration.
Added code page 771, 860, 861, 863, 864, 865 and 869. (_CODE_PAGE)
Removed some code pages actually not exist on the standard systems. (_CODE_PAGE)
Fixed errors in the case conversion teble of code page 437 and 850 (ff.c).
Fixed errors in the case conversion teble of Unicode (cc*.c).



R0.12 (April 12, 2016)

Added support of exFAT file system. (_FS_EXFAT)
Added f_expand(). (_USE_EXPAND)
Changed some members in FINFO structure and behavior of f_readdir().
Added an option _USE_CHMOD and removed an option _WORD_ACCESS.
Fixed errors in the case conversion teble of Unicode (cc*.c).

2 changes: 1 addition & 1 deletion source/payload/fatfs/00readme.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FatFs Module Source Files R0.11
FatFs Module Source Files R0.12


FILES
Expand Down
23 changes: 10 additions & 13 deletions source/payload/fatfs/diskio.c
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
/*-----------------------------------------------------------------------*/
/* Low level disk I/O module skeleton for FatFs (C)ChaN, 2014 */
/* Low level disk I/O module skeleton for FatFs (C)ChaN, 2016 */
/*-----------------------------------------------------------------------*/
/* If a working storage control module is available, it should be */
/* If a working storage control module is available, it should be */
/* attached to the FatFs via a glue function rather than modifying it. */
/* This is an example of glue functions to attach various exsisting */
/* storage control modules to the FatFs module with a defined API. */
/* This is an example of glue functions to attach various exsisting */
/* storage control modules to the FatFs module with a defined API. */
/*-----------------------------------------------------------------------*/

#include "diskio.h" /* FatFs lower layer API */
#include "sdmmc/sdmmc.h"


/*-----------------------------------------------------------------------*/
/* Get Drive Status */
/* Get Drive Status */
/*-----------------------------------------------------------------------*/

DSTATUS disk_status (
Expand All @@ -26,7 +26,7 @@ DSTATUS disk_status (


/*-----------------------------------------------------------------------*/
/* Inidialize a Drive */
/* Inidialize a Drive */
/*-----------------------------------------------------------------------*/

DSTATUS disk_initialize (
Expand All @@ -41,7 +41,7 @@ DSTATUS disk_initialize (


/*-----------------------------------------------------------------------*/
/* Read Sector(s) */
/* Read Sector(s) */
/*-----------------------------------------------------------------------*/

DRESULT disk_read (
Expand All @@ -62,10 +62,9 @@ DRESULT disk_read (


/*-----------------------------------------------------------------------*/
/* Write Sector(s) */
/* Write Sector(s) */
/*-----------------------------------------------------------------------*/

#if _USE_WRITE
DRESULT disk_write (
__attribute__((unused))
BYTE pdrv, /* Physical drive nmuber to identify the drive */
Expand All @@ -80,15 +79,13 @@ DRESULT disk_write (

return RES_OK;
}
#endif



/*-----------------------------------------------------------------------*/
/* Miscellaneous Functions */
/* Miscellaneous Functions */
/*-----------------------------------------------------------------------*/

#if _USE_IOCTL
DRESULT disk_ioctl (
__attribute__((unused))
BYTE pdrv, /* Physical drive nmuber (0..) */
Expand All @@ -100,4 +97,4 @@ DRESULT disk_ioctl (
{
return RES_PARERR;
}
#endif

6 changes: 3 additions & 3 deletions source/payload/fatfs/diskio.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@
extern "C" {
#endif

#define _USE_WRITE 1 /* 1: Enable disk_write function */
#define _USE_IOCTL 1 /* 1: Enable disk_ioctl fucntion */

#include "integer.h"


Expand Down Expand Up @@ -67,6 +64,9 @@ DRESULT disk_ioctl (BYTE pdrv, BYTE cmd, void* buff);
#define MMC_GET_CID 12 /* Get CID */
#define MMC_GET_OCR 13 /* Get OCR */
#define MMC_GET_SDSTAT 14 /* Get SD status */
#define ISDIO_READ 55 /* Read data form SD iSDIO register */
#define ISDIO_WRITE 56 /* Write data to SD iSDIO register */
#define ISDIO_MRITE 57 /* Masked write data to SD iSDIO register */

/* ATA/CF specific ioctl command */
#define ATA_GET_REV 20 /* Get F/W revision */
Expand Down
Loading

0 comments on commit 5245c7b

Please sign in to comment.