Skip to content

Commit

Permalink
Updated fatfs to version R0.13c.
Browse files Browse the repository at this point in the history
  • Loading branch information
profi200 committed Jan 23, 2019
1 parent c15fe99 commit f442d84
Show file tree
Hide file tree
Showing 10 changed files with 730 additions and 700 deletions.
16 changes: 16 additions & 0 deletions thirdparty/fatfs/00history.txt
Original file line number Diff line number Diff line change
Expand Up @@ -312,3 +312,19 @@ R0.13a (October 14, 2017)
Fixed f_setlabel() rejects some valid characters for exFAT volume. (appeared at R0.12)



R0.13b (April 07, 2018)

Added support for UTF-32 encoding on the API. (FF_LFN_UNICODE = 3)
Added support for Unix style volume ID. (FF_STR_VOLUME_ID = 2)
Fixed accesing any object on the exFAT root directory beyond the cluster boundary can fail. (appeared at R0.12c)
Fixed f_setlabel() does not reject some invalid characters. (appeared at R0.09b)



R0.13c (October 14, 2018)
Supported stdint.h for C99 and later. (integer.h was included in ff.h)
Fixed reading a directory gets infinite loop when the last directory entry is not empty. (appeared at R0.12)
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)
Fixed f_getcwd() cause output buffer overrun when the buffer has a valid drive number. (appeared at R0.13b)

3 changes: 1 addition & 2 deletions thirdparty/fatfs/00readme.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FatFs Module Source Files R0.13a
FatFs Module Source Files R0.13c


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

Expand Down
7 changes: 5 additions & 2 deletions thirdparty/fatfs/diskio.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
/* storage control modules to the FatFs module with a defined API. */
/*-----------------------------------------------------------------------*/

#include "ff.h"
#include "diskio.h" /* FatFs lower layer API */
#include "ff.h" /* Obtains integer types */
#include "diskio.h" /* Declarations of disk functions */
#include "types.h"
#include "arm9/dev.h"

Expand Down Expand Up @@ -116,6 +116,8 @@ DRESULT disk_read (
/* Write Sector(s) */
/*-----------------------------------------------------------------------*/

#if FF_FS_READONLY == 0

DRESULT disk_write (
BYTE pdrv, /* Physical drive nmuber to identify the drive */
const BYTE *buff, /* Data to be written */
Expand Down Expand Up @@ -143,6 +145,7 @@ DRESULT disk_write (
return res;
}

#endif


/*-----------------------------------------------------------------------*/
Expand Down
19 changes: 8 additions & 11 deletions thirdparty/fatfs/diskio.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,13 @@
#ifndef _DISKIO_DEFINED
#define _DISKIO_DEFINED

#define FATFS_DEV_NUM_SD 0
#define FATFS_DEV_NUM_TWL_NAND 1
#define FATFS_DEV_NUM_CTR_NAND 2

#ifdef __cplusplus
extern "C" {
#endif

#include "integer.h"

#define FATFS_DEV_NUM_SD 0
#define FATFS_DEV_NUM_TWL_NAND 1
#define FATFS_DEV_NUM_CTR_NAND 2

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

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

/* Generic command (Not used by FatFs) */
#define CTRL_POWER 5 /* Get/Set power status */
Expand Down
Loading

0 comments on commit f442d84

Please sign in to comment.