Update updater to newest fatfs and enable exfat support
This commit is contained in:
parent
8cd47aeed5
commit
ef534746f8
@ -231,7 +231,7 @@
|
|||||||
/ buffer in the filesystem object (FATFS) is used for the file data transfer. */
|
/ buffer in the filesystem object (FATFS) is used for the file data transfer. */
|
||||||
|
|
||||||
|
|
||||||
#define FF_FS_EXFAT 0
|
#define FF_FS_EXFAT 1
|
||||||
/* This option switches support for exFAT filesystem. (0:Disable or 1:Enable)
|
/* This option switches support for exFAT filesystem. (0:Disable or 1:Enable)
|
||||||
/ To enable exFAT, also LFN needs to be enabled. (FF_USE_LFN >= 1)
|
/ To enable exFAT, also LFN needs to be enabled. (FF_USE_LFN >= 1)
|
||||||
/ Note that enabling exFAT discards ANSI C (C89) compatibility. */
|
/ Note that enabling exFAT discards ANSI C (C89) compatibility. */
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -1,8 +1,8 @@
|
|||||||
/*----------------------------------------------------------------------------/
|
/*----------------------------------------------------------------------------/
|
||||||
/ FatFs - Generic FAT Filesystem module R0.14 /
|
/ FatFs - Generic FAT Filesystem module R0.14b /
|
||||||
/-----------------------------------------------------------------------------/
|
/-----------------------------------------------------------------------------/
|
||||||
/
|
/
|
||||||
/ Copyright (C) 2019, ChaN, all right reserved.
|
/ Copyright (C) 2021, ChaN, all right reserved.
|
||||||
/
|
/
|
||||||
/ FatFs module is an open source software. Redistribution and use of FatFs in
|
/ FatFs module is an open source software. Redistribution and use of FatFs in
|
||||||
/ source and binary forms, with or without modification, are permitted provided
|
/ source and binary forms, with or without modification, are permitted provided
|
||||||
@ -20,7 +20,7 @@
|
|||||||
|
|
||||||
|
|
||||||
#ifndef FF_DEFINED
|
#ifndef FF_DEFINED
|
||||||
#define FF_DEFINED 86606 /* Revision ID */
|
#define FF_DEFINED 86631 /* Revision ID */
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
@ -35,10 +35,14 @@ extern "C" {
|
|||||||
|
|
||||||
/* Integer types used for FatFs API */
|
/* Integer types used for FatFs API */
|
||||||
|
|
||||||
#if defined(_WIN32) /* Main development platform */
|
#if defined(_WIN32) /* Windows VC++ (for development only) */
|
||||||
#define FF_INTDEF 2
|
#define FF_INTDEF 2
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
typedef unsigned __int64 QWORD;
|
typedef unsigned __int64 QWORD;
|
||||||
|
#include <float.h>
|
||||||
|
#define isnan(v) _isnan(v)
|
||||||
|
#define isinf(v) (!_finite(v))
|
||||||
|
|
||||||
#elif (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || defined(__cplusplus) /* C99 or later */
|
#elif (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || defined(__cplusplus) /* C99 or later */
|
||||||
#define FF_INTDEF 2
|
#define FF_INTDEF 2
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
@ -48,6 +52,7 @@ typedef uint16_t WORD; /* 16-bit unsigned integer */
|
|||||||
typedef uint32_t DWORD; /* 32-bit unsigned integer */
|
typedef uint32_t DWORD; /* 32-bit unsigned integer */
|
||||||
typedef uint64_t QWORD; /* 64-bit unsigned integer */
|
typedef uint64_t QWORD; /* 64-bit unsigned integer */
|
||||||
typedef WORD WCHAR; /* UTF-16 character type */
|
typedef WORD WCHAR; /* UTF-16 character type */
|
||||||
|
|
||||||
#else /* Earlier than C99 */
|
#else /* Earlier than C99 */
|
||||||
#define FF_INTDEF 1
|
#define FF_INTDEF 1
|
||||||
typedef unsigned int UINT; /* int must be 16-bit or 32-bit */
|
typedef unsigned int UINT; /* int must be 16-bit or 32-bit */
|
||||||
@ -58,28 +63,29 @@ typedef WORD WCHAR; /* UTF-16 character type */
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/* Definitions of volume management */
|
/* Type of file size and LBA variables */
|
||||||
|
|
||||||
#if FF_MULTI_PARTITION /* Multiple partition configuration */
|
#if FF_FS_EXFAT
|
||||||
typedef struct {
|
#if FF_INTDEF != 2
|
||||||
BYTE pd; /* Physical drive number */
|
#error exFAT feature wants C99 or later
|
||||||
BYTE pt; /* Partition: 0:Auto detect, 1-4:Forced partition) */
|
|
||||||
} PARTITION;
|
|
||||||
extern PARTITION VolToPart[]; /* Volume - Partition mapping table */
|
|
||||||
#endif
|
#endif
|
||||||
|
typedef QWORD FSIZE_t;
|
||||||
#if FF_STR_VOLUME_ID
|
#if FF_LBA64
|
||||||
#ifndef FF_VOLUME_STRS
|
typedef QWORD LBA_t;
|
||||||
extern const char* VolumeStr[FF_VOLUMES]; /* User defied volume ID */
|
#else
|
||||||
|
typedef DWORD LBA_t;
|
||||||
#endif
|
#endif
|
||||||
|
#else
|
||||||
|
#if FF_LBA64
|
||||||
|
#error exFAT needs to be enabled when enable 64-bit LBA
|
||||||
|
#endif
|
||||||
|
typedef DWORD FSIZE_t;
|
||||||
|
typedef DWORD LBA_t;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* Type of path name strings on FatFs API */
|
/* Type of path name strings on FatFs API (TCHAR) */
|
||||||
|
|
||||||
#ifndef _INC_TCHAR
|
|
||||||
#define _INC_TCHAR
|
|
||||||
|
|
||||||
#if FF_USE_LFN && FF_LFN_UNICODE == 1 /* Unicode in UTF-16 encoding */
|
#if FF_USE_LFN && FF_LFN_UNICODE == 1 /* Unicode in UTF-16 encoding */
|
||||||
typedef WCHAR TCHAR;
|
typedef WCHAR TCHAR;
|
||||||
@ -101,28 +107,22 @@ typedef char TCHAR;
|
|||||||
#define _TEXT(x) x
|
#define _TEXT(x) x
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
|
/* Definitions of volume management */
|
||||||
|
|
||||||
/* Type of file size and LBA variables */
|
#if FF_MULTI_PARTITION /* Multiple partition configuration */
|
||||||
|
typedef struct {
|
||||||
|
BYTE pd; /* Physical drive number */
|
||||||
|
BYTE pt; /* Partition: 0:Auto detect, 1-4:Forced partition) */
|
||||||
|
} PARTITION;
|
||||||
|
extern PARTITION VolToPart[]; /* Volume - Partition mapping table */
|
||||||
|
#endif
|
||||||
|
|
||||||
#if FF_FS_EXFAT
|
#if FF_STR_VOLUME_ID
|
||||||
#if FF_INTDEF != 2
|
#ifndef FF_VOLUME_STRS
|
||||||
#error exFAT feature wants C99 or later
|
extern const char* VolumeStr[FF_VOLUMES]; /* User defied volume ID */
|
||||||
#endif
|
#endif
|
||||||
typedef QWORD FSIZE_t;
|
|
||||||
#if FF_LBA64
|
|
||||||
typedef QWORD LBA_t;
|
|
||||||
#else
|
|
||||||
typedef DWORD LBA_t;
|
|
||||||
#endif
|
|
||||||
#else
|
|
||||||
#if FF_LBA64
|
|
||||||
#error exFAT needs to be enabled when enable 64-bit LBA
|
|
||||||
#endif
|
|
||||||
typedef DWORD FSIZE_t;
|
|
||||||
typedef DWORD LBA_t;
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
@ -345,10 +345,6 @@ TCHAR* f_gets (TCHAR* buff, int len, FIL* fp); /* Get a string from the fil
|
|||||||
#define f_rmdir(path) f_unlink(path)
|
#define f_rmdir(path) f_unlink(path)
|
||||||
#define f_unmount(path) f_mount(0, path, 0)
|
#define f_unmount(path) f_mount(0, path, 0)
|
||||||
|
|
||||||
#ifndef EOF
|
|
||||||
#define EOF (-1)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
/ FatFs Functional Configurations
|
/ FatFs Functional Configurations
|
||||||
/---------------------------------------------------------------------------*/
|
/---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#define FFCONF_DEF 86606 /* Revision ID */
|
#define FFCONF_DEF 86631 /* Revision ID */
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------/
|
/*---------------------------------------------------------------------------/
|
||||||
/ Function Configurations
|
/ Function Configurations
|
||||||
@ -25,15 +25,7 @@
|
|||||||
/ 3: f_lseek() function is removed in addition to 2. */
|
/ 3: f_lseek() function is removed in addition to 2. */
|
||||||
|
|
||||||
|
|
||||||
#define FF_USE_STRFUNC 1
|
#define FF_USE_FIND 1
|
||||||
/* This option switches string functions, f_gets(), f_putc(), f_puts() and f_printf().
|
|
||||||
/
|
|
||||||
/ 0: Disable string functions.
|
|
||||||
/ 1: Enable without LF-CRLF conversion.
|
|
||||||
/ 2: Enable with LF-CRLF conversion. */
|
|
||||||
|
|
||||||
|
|
||||||
#define FF_USE_FIND 0
|
|
||||||
/* This option switches filtered directory read functions, f_findfirst() and
|
/* This option switches filtered directory read functions, f_findfirst() and
|
||||||
/ f_findnext(). (0:Disable, 1:Enable 2:Enable with matching altname[] too) */
|
/ f_findnext(). (0:Disable, 1:Enable 2:Enable with matching altname[] too) */
|
||||||
|
|
||||||
@ -64,6 +56,30 @@
|
|||||||
/* This option switches f_forward() function. (0:Disable or 1:Enable) */
|
/* This option switches f_forward() function. (0:Disable or 1:Enable) */
|
||||||
|
|
||||||
|
|
||||||
|
#define FF_USE_STRFUNC 1
|
||||||
|
#define FF_PRINT_LLI 0
|
||||||
|
#define FF_PRINT_FLOAT 0
|
||||||
|
#define FF_STRF_ENCODE 0
|
||||||
|
/* FF_USE_STRFUNC switches string functions, f_gets(), f_putc(), f_puts() and
|
||||||
|
/ f_printf().
|
||||||
|
/
|
||||||
|
/ 0: Disable. FF_PRINT_LLI, FF_PRINT_FLOAT and FF_STRF_ENCODE have no effect.
|
||||||
|
/ 1: Enable without LF-CRLF conversion.
|
||||||
|
/ 2: Enable with LF-CRLF conversion.
|
||||||
|
/
|
||||||
|
/ FF_PRINT_LLI = 1 makes f_printf() support long long argument and FF_PRINT_FLOAT = 1/2
|
||||||
|
makes f_printf() support floating point argument. These features want C99 or later.
|
||||||
|
/ When FF_LFN_UNICODE >= 1 with LFN enabled, string functions convert the character
|
||||||
|
/ encoding in it. FF_STRF_ENCODE selects assumption of character encoding ON THE FILE
|
||||||
|
/ to be read/written via those functions.
|
||||||
|
/
|
||||||
|
/ 0: ANSI/OEM in current CP
|
||||||
|
/ 1: Unicode in UTF-16LE
|
||||||
|
/ 2: Unicode in UTF-16BE
|
||||||
|
/ 3: Unicode in UTF-8
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------/
|
/*---------------------------------------------------------------------------/
|
||||||
/ Locale and Namespace Configurations
|
/ Locale and Namespace Configurations
|
||||||
/---------------------------------------------------------------------------*/
|
/---------------------------------------------------------------------------*/
|
||||||
@ -137,19 +153,6 @@
|
|||||||
/ on character encoding. When LFN is not enabled, these options have no effect. */
|
/ on character encoding. When LFN is not enabled, these options have no effect. */
|
||||||
|
|
||||||
|
|
||||||
#define FF_STRF_ENCODE 3
|
|
||||||
/* When FF_LFN_UNICODE >= 1 with LFN enabled, string I/O functions, f_gets(),
|
|
||||||
/ f_putc(), f_puts and f_printf() convert the character encoding in it.
|
|
||||||
/ This option selects assumption of character encoding ON THE FILE to be
|
|
||||||
/ read/written via those functions.
|
|
||||||
/
|
|
||||||
/ 0: ANSI/OEM in current CP
|
|
||||||
/ 1: Unicode in UTF-16LE
|
|
||||||
/ 2: Unicode in UTF-16BE
|
|
||||||
/ 3: Unicode in UTF-8
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
#define FF_FS_RPATH 0
|
#define FF_FS_RPATH 0
|
||||||
/* This option configures support for relative path.
|
/* This option configures support for relative path.
|
||||||
/
|
/
|
||||||
@ -194,7 +197,7 @@
|
|||||||
#define FF_MAX_SS 512
|
#define FF_MAX_SS 512
|
||||||
/* This set of options configures the range of sector size to be supported. (512,
|
/* This set of options configures the range of sector size to be supported. (512,
|
||||||
/ 1024, 2048 or 4096) Always set both 512 for most systems, generic memory card and
|
/ 1024, 2048 or 4096) Always set both 512 for most systems, generic memory card and
|
||||||
/ harddisk. But a larger value may be required for on-board flash memory and some
|
/ harddisk, but a larger value may be required for on-board flash memory and some
|
||||||
/ type of optical media. When FF_MAX_SS is larger than FF_MIN_SS, FatFs is configured
|
/ type of optical media. When FF_MAX_SS is larger than FF_MIN_SS, FatFs is configured
|
||||||
/ for variable sector size mode and disk_ioctl() function needs to implement
|
/ for variable sector size mode and disk_ioctl() function needs to implement
|
||||||
/ GET_SECTOR_SIZE command. */
|
/ GET_SECTOR_SIZE command. */
|
||||||
@ -205,8 +208,8 @@
|
|||||||
/ To enable the 64-bit LBA, also exFAT needs to be enabled. (FF_FS_EXFAT == 1) */
|
/ To enable the 64-bit LBA, also exFAT needs to be enabled. (FF_FS_EXFAT == 1) */
|
||||||
|
|
||||||
|
|
||||||
#define FF_MIN_GPT 0x100000000
|
#define FF_MIN_GPT 0x10000000
|
||||||
/* Minimum number of sectors to switch GPT format to create partition in f_mkfs and
|
/* Minimum number of sectors to switch GPT as partitioning format in f_mkfs and
|
||||||
/ f_fdisk function. 0x100000000 max. This option has no effect when FF_LBA64 == 0. */
|
/ f_fdisk function. 0x100000000 max. This option has no effect when FF_LBA64 == 0. */
|
||||||
|
|
||||||
|
|
||||||
@ -228,7 +231,7 @@
|
|||||||
/ buffer in the filesystem object (FATFS) is used for the file data transfer. */
|
/ buffer in the filesystem object (FATFS) is used for the file data transfer. */
|
||||||
|
|
||||||
|
|
||||||
#define FF_FS_EXFAT 0
|
#define FF_FS_EXFAT 1
|
||||||
/* This option switches support for exFAT filesystem. (0:Disable or 1:Enable)
|
/* This option switches support for exFAT filesystem. (0:Disable or 1:Enable)
|
||||||
/ To enable exFAT, also LFN needs to be enabled. (FF_USE_LFN >= 1)
|
/ To enable exFAT, also LFN needs to be enabled. (FF_USE_LFN >= 1)
|
||||||
/ Note that enabling exFAT discards ANSI C (C89) compatibility. */
|
/ Note that enabling exFAT discards ANSI C (C89) compatibility. */
|
||||||
@ -237,7 +240,7 @@
|
|||||||
#define FF_FS_NORTC 0
|
#define FF_FS_NORTC 0
|
||||||
#define FF_NORTC_MON 1
|
#define FF_NORTC_MON 1
|
||||||
#define FF_NORTC_MDAY 1
|
#define FF_NORTC_MDAY 1
|
||||||
#define FF_NORTC_YEAR 2019
|
#define FF_NORTC_YEAR 2020
|
||||||
/* The option FF_FS_NORTC switches timestamp functiton. If the system does not have
|
/* The option FF_FS_NORTC switches timestamp functiton. If the system does not have
|
||||||
/ any RTC function or valid timestamp is not needed, set FF_FS_NORTC = 1 to disable
|
/ any RTC function or valid timestamp is not needed, set FF_FS_NORTC = 1 to disable
|
||||||
/ the timestamp function. Every object modified by FatFs will have a fixed timestamp
|
/ the timestamp function. Every object modified by FatFs will have a fixed timestamp
|
||||||
|
Loading…
Reference in New Issue
Block a user