Skip to content

Commit 9e5f21b

Browse files
committed
Update FatFs from R0.13a to R0.14b by manual migration Mbed-OS modification in R0.13a to R0.14b
Since a lot of fixed from upstream (0.13b, 0.13c, 0.14, 0.14a and 0.14b) @see http://elm-chan.org/fsw/ff/updates.txt
1 parent cecc47b commit 9e5f21b

File tree

6 files changed

+1977
-1444
lines changed

6 files changed

+1977
-1444
lines changed

storage/filesystem/fat/ChaN/diskio.h

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*-----------------------------------------------------------------------/
2-
/ Low level disk interface modlue include file (C)ChaN, 2014 /
2+
/ Low level disk interface modlue include file (C)ChaN, 2019 /
33
/-----------------------------------------------------------------------*/
44

55
#ifndef _DISKIO_DEFINED
@@ -9,9 +9,6 @@
99
extern "C" {
1010
#endif
1111

12-
#include "integer.h"
13-
14-
1512
/* Status of Disk Functions */
1613
typedef BYTE DSTATUS;
1714

@@ -31,8 +28,8 @@ typedef enum {
3128

3229
DSTATUS disk_initialize (BYTE pdrv);
3330
DSTATUS disk_status (BYTE pdrv);
34-
DRESULT disk_read (BYTE pdrv, BYTE* buff, DWORD sector, UINT count);
35-
DRESULT disk_write (BYTE pdrv, const BYTE* buff, DWORD sector, UINT count);
31+
DRESULT disk_read (BYTE pdrv, BYTE* buff, LBA_t sector, UINT count);
32+
DRESULT disk_write (BYTE pdrv, const BYTE* buff, LBA_t sector, UINT count);
3633
DRESULT disk_ioctl (BYTE pdrv, BYTE cmd, void* buff);
3734

3835

@@ -46,11 +43,11 @@ DRESULT disk_ioctl (BYTE pdrv, BYTE cmd, void* buff);
4643
/* Command code for disk_ioctrl fucntion */
4744

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

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

0 commit comments

Comments
 (0)