Skip to content

Commit f442d84

Browse files
committed
Updated fatfs to version R0.13c.
1 parent c15fe99 commit f442d84

File tree

10 files changed

+730
-700
lines changed

10 files changed

+730
-700
lines changed

thirdparty/fatfs/00history.txt

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -312,3 +312,19 @@ R0.13a (October 14, 2017)
312312
Fixed f_setlabel() rejects some valid characters for exFAT volume. (appeared at R0.12)
313313

314314

315+
316+
R0.13b (April 07, 2018)
317+
318+
Added support for UTF-32 encoding on the API. (FF_LFN_UNICODE = 3)
319+
Added support for Unix style volume ID. (FF_STR_VOLUME_ID = 2)
320+
Fixed accesing any object on the exFAT root directory beyond the cluster boundary can fail. (appeared at R0.12c)
321+
Fixed f_setlabel() does not reject some invalid characters. (appeared at R0.09b)
322+
323+
324+
325+
R0.13c (October 14, 2018)
326+
Supported stdint.h for C99 and later. (integer.h was included in ff.h)
327+
Fixed reading a directory gets infinite loop when the last directory entry is not empty. (appeared at R0.12)
328+
Fixed creating a sub-directory in the fragmented sub-directory on the exFAT volume collapses FAT chain of the parent directory. (appeared at R0.12)
329+
Fixed f_getcwd() cause output buffer overrun when the buffer has a valid drive number. (appeared at R0.13b)
330+

thirdparty/fatfs/00readme.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FatFs Module Source Files R0.13a
1+
FatFs Module Source Files R0.13c
22

33

44
FILES
@@ -10,7 +10,6 @@ FILES
1010
ff.h Common include file for FatFs and application module.
1111
diskio.h Common include file for FatFs and disk I/O module.
1212
diskio.c An example of glue function to attach existing disk I/O module to FatFs.
13-
integer.h Integer type definitions for FatFs.
1413
ffunicode.c Optional Unicode utility functions.
1514
ffsystem.c An example of optional O/S related functions.
1615

thirdparty/fatfs/diskio.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
/* storage control modules to the FatFs module with a defined API. */
88
/*-----------------------------------------------------------------------*/
99

10-
#include "ff.h"
11-
#include "diskio.h" /* FatFs lower layer API */
10+
#include "ff.h" /* Obtains integer types */
11+
#include "diskio.h" /* Declarations of disk functions */
1212
#include "types.h"
1313
#include "arm9/dev.h"
1414

@@ -116,6 +116,8 @@ DRESULT disk_read (
116116
/* Write Sector(s) */
117117
/*-----------------------------------------------------------------------*/
118118

119+
#if FF_FS_READONLY == 0
120+
119121
DRESULT disk_write (
120122
BYTE pdrv, /* Physical drive nmuber to identify the drive */
121123
const BYTE *buff, /* Data to be written */
@@ -143,6 +145,7 @@ DRESULT disk_write (
143145
return res;
144146
}
145147

148+
#endif
146149

147150

148151
/*-----------------------------------------------------------------------*/

thirdparty/fatfs/diskio.h

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,13 @@
55
#ifndef _DISKIO_DEFINED
66
#define _DISKIO_DEFINED
77

8-
#define FATFS_DEV_NUM_SD 0
9-
#define FATFS_DEV_NUM_TWL_NAND 1
10-
#define FATFS_DEV_NUM_CTR_NAND 2
11-
128
#ifdef __cplusplus
139
extern "C" {
1410
#endif
1511

16-
#include "integer.h"
17-
12+
#define FATFS_DEV_NUM_SD 0
13+
#define FATFS_DEV_NUM_TWL_NAND 1
14+
#define FATFS_DEV_NUM_CTR_NAND 2
1815

1916
/* Status of Disk Functions */
2017
typedef BYTE DSTATUS;
@@ -50,11 +47,11 @@ DRESULT disk_ioctl (BYTE pdrv, BYTE cmd, void* buff);
5047
/* Command code for disk_ioctrl fucntion */
5148

5249
/* Generic command (Used by FatFs) */
53-
#define CTRL_SYNC 0 /* Complete pending write process (needed at _FS_READONLY == 0) */
54-
#define GET_SECTOR_COUNT 1 /* Get media size (needed at _USE_MKFS == 1) */
55-
#define GET_SECTOR_SIZE 2 /* Get sector size (needed at _MAX_SS != _MIN_SS) */
56-
#define GET_BLOCK_SIZE 3 /* Get erase block size (needed at _USE_MKFS == 1) */
57-
#define CTRL_TRIM 4 /* Inform device that the data on the block of sectors is no longer used (needed at _USE_TRIM == 1) */
50+
#define CTRL_SYNC 0 /* Complete pending write process (needed at FF_FS_READONLY == 0) */
51+
#define GET_SECTOR_COUNT 1 /* Get media size (needed at FF_USE_MKFS == 1) */
52+
#define GET_SECTOR_SIZE 2 /* Get sector size (needed at FF_MAX_SS != FF_MIN_SS) */
53+
#define GET_BLOCK_SIZE 3 /* Get erase block size (needed at FF_USE_MKFS == 1) */
54+
#define CTRL_TRIM 4 /* Inform device that the data on the block of sectors is no longer used (needed at FF_USE_TRIM == 1) */
5855

5956
/* Generic command (Not used by FatFs) */
6057
#define CTRL_POWER 5 /* Get/Set power status */

0 commit comments

Comments
 (0)