[270] | 1 | /*---------------------------------------------------------------------------/
|
---|
| 2 | / FatFs - FAT file system module include R0.11a (C)ChaN, 2015
|
---|
| 3 | /----------------------------------------------------------------------------/
|
---|
| 4 | / FatFs module is a free software that opened under license policy of
|
---|
| 5 | / following conditions.
|
---|
| 6 | /
|
---|
| 7 | / Copyright (C) 2015, ChaN, all right reserved.
|
---|
| 8 | /
|
---|
| 9 | / 1. Redistributions of source code must retain the above copyright notice,
|
---|
| 10 | / this condition and the following disclaimer.
|
---|
| 11 | /
|
---|
| 12 | / This software is provided by the copyright holder and contributors "AS IS"
|
---|
| 13 | / and any warranties related to this software are DISCLAIMED.
|
---|
| 14 | / The copyright owner or contributors be NOT LIABLE for any damages caused
|
---|
| 15 | / by use of this software.
|
---|
| 16 | /---------------------------------------------------------------------------*/
|
---|
| 17 |
|
---|
| 18 |
|
---|
| 19 | #ifndef _FATFS
|
---|
| 20 | #define _FATFS 64180 /* Revision ID */
|
---|
| 21 |
|
---|
| 22 | #ifdef __cplusplus
|
---|
| 23 | extern "C" {
|
---|
| 24 | #endif
|
---|
| 25 |
|
---|
| 26 | #include <stdarg.h>
|
---|
| 27 | #include "integer.h" /* Basic integer types */
|
---|
| 28 | #include "ffconf.h" /* FatFs configuration options */
|
---|
| 29 | #include "diskio.h"
|
---|
[434] | 30 | #if _FATFS != FFCONF_DEF
|
---|
[270] | 31 | #error Wrong configuration file (ffconf.h).
|
---|
| 32 | #endif
|
---|
| 33 |
|
---|
| 34 |
|
---|
| 35 |
|
---|
| 36 | /* Definitions of volume management */
|
---|
| 37 |
|
---|
[434] | 38 | #if FF_MULTI_PARTITION /* Multiple partition configuration */
|
---|
[270] | 39 | typedef struct {
|
---|
| 40 | BYTE pd; /* Physical drive number */
|
---|
| 41 | BYTE pt; /* Partition: 0:Auto detect, 1-4:Forced partition) */
|
---|
| 42 | } PARTITION;
|
---|
| 43 | extern PARTITION VolToPart[]; /* Volume - Partition resolution table */
|
---|
| 44 | #define LD2PD(vol) (VolToPart[vol].pd) /* Get physical drive number */
|
---|
| 45 | #define LD2PT(vol) (VolToPart[vol].pt) /* Get partition index */
|
---|
| 46 |
|
---|
| 47 | #else /* Single partition configuration */
|
---|
| 48 | #define LD2PD(vol) (BYTE)(vol) /* Each logical drive is bound to the same physical drive number */
|
---|
| 49 | #define LD2PT(vol) 0 /* Find first valid partition or in SFD */
|
---|
| 50 |
|
---|
| 51 | #endif
|
---|
| 52 |
|
---|
| 53 |
|
---|
| 54 |
|
---|
| 55 | /* Type of path name strings on FatFs API */
|
---|
| 56 |
|
---|
[434] | 57 | #if FF_LFN_UNICODE /* Unicode string */
|
---|
| 58 | #if !FF_USE_LFN
|
---|
| 59 | #error FF_LFN_UNICODE must be 0 at non-LFN cfg.
|
---|
[270] | 60 | #endif
|
---|
| 61 | #ifndef _INC_TCHAR
|
---|
| 62 | typedef WCHAR TCHAR;
|
---|
| 63 | #define _T(x) L ## x
|
---|
| 64 | #define _TEXT(x) L ## x
|
---|
| 65 | #endif
|
---|
| 66 |
|
---|
| 67 | #else /* ANSI/OEM string */
|
---|
| 68 | #ifndef _INC_TCHAR
|
---|
| 69 | typedef char TCHAR;
|
---|
| 70 | #define _T(x) x
|
---|
| 71 | #define _TEXT(x) x
|
---|
| 72 | #endif
|
---|
| 73 |
|
---|
| 74 | #endif
|
---|
| 75 |
|
---|
| 76 |
|
---|
| 77 |
|
---|
| 78 | /* File system object structure (FATFS) */
|
---|
| 79 |
|
---|
| 80 | typedef struct {
|
---|
| 81 | BYTE fs_type; /* FAT sub-type (0:Not mounted) */
|
---|
| 82 | BYTE drv; /* Physical drive number */
|
---|
| 83 | BYTE csize; /* Sectors per cluster (1,2,4...128) */
|
---|
| 84 | BYTE n_fats; /* Number of FAT copies (1 or 2) */
|
---|
| 85 | BYTE wflag; /* win[] flag (b0:dirty) */
|
---|
| 86 | BYTE fsi_flag; /* FSINFO flags (b7:disabled, b0:dirty) */
|
---|
| 87 | WORD id; /* File system mount ID */
|
---|
| 88 | WORD n_rootdir; /* Number of root directory entries (FAT12/16) */
|
---|
[434] | 89 | #if FF_MAX_SS != FF_MIN_SS
|
---|
[270] | 90 | WORD ssize; /* Bytes per sector (512, 1024, 2048 or 4096) */
|
---|
| 91 | #endif
|
---|
[434] | 92 | #if FF_FS_REENTRANT
|
---|
| 93 | FF_SYNC_t sobj; /* Identifier of sync object */
|
---|
[270] | 94 | #endif
|
---|
[434] | 95 | #if !FF_FS_READONLY
|
---|
[270] | 96 | DWORD last_clust; /* Last allocated cluster */
|
---|
| 97 | DWORD free_clust; /* Number of free clusters */
|
---|
| 98 | #endif
|
---|
[434] | 99 | #if FF_FS_RPATH
|
---|
[270] | 100 | DWORD cdir; /* Current directory start cluster (0:root) */
|
---|
| 101 | #endif
|
---|
| 102 | DWORD n_fatent; /* Number of FAT entries, = number of clusters + 2 */
|
---|
| 103 | DWORD fsize; /* Sectors per FAT */
|
---|
| 104 | DWORD volbase; /* Volume start sector */
|
---|
| 105 | DWORD fatbase; /* FAT start sector */
|
---|
| 106 | DWORD dirbase; /* Root directory start sector (FAT32:Cluster#) */
|
---|
| 107 | DWORD database; /* Data start sector */
|
---|
| 108 | DWORD winsect; /* Current sector appearing in the win[] */
|
---|
[434] | 109 | BYTE win[FF_MAX_SS]; /* Disk access window for Directory, FAT (and file data at tiny cfg) */
|
---|
[270] | 110 | } FATFS;
|
---|
| 111 |
|
---|
| 112 |
|
---|
| 113 |
|
---|
| 114 | /* File object structure (FIL) */
|
---|
| 115 |
|
---|
| 116 | typedef struct {
|
---|
| 117 | FATFS* fs; /* Pointer to the related file system object (**do not change order**) */
|
---|
| 118 | WORD id; /* Owner file system mount ID (**do not change order**) */
|
---|
| 119 | BYTE flag; /* Status flags */
|
---|
| 120 | BYTE err; /* Abort flag (error code) */
|
---|
| 121 | DWORD fptr; /* File read/write pointer (Zeroed on file open) */
|
---|
| 122 | DWORD fsize; /* File size */
|
---|
| 123 | DWORD sclust; /* File start cluster (0:no cluster chain, always 0 when fsize is 0) */
|
---|
| 124 | DWORD clust; /* Current cluster of fpter (not valid when fprt is 0) */
|
---|
| 125 | DWORD dsect; /* Sector number appearing in buf[] (0:invalid) */
|
---|
[434] | 126 | #if !FF_FS_READONLY
|
---|
[270] | 127 | DWORD dir_sect; /* Sector number containing the directory entry */
|
---|
| 128 | BYTE* dir_ptr; /* Pointer to the directory entry in the win[] */
|
---|
| 129 | #endif
|
---|
[434] | 130 | #if FF_USE_FASTSEEK
|
---|
[270] | 131 | DWORD* cltbl; /* Pointer to the cluster link map table (Nulled on file open) */
|
---|
| 132 | #endif
|
---|
[434] | 133 | #if FF_FS_LOCK != 0
|
---|
[270] | 134 | UINT lockid; /* File lock ID origin from 1 (index of file semaphore table Files[]) */
|
---|
| 135 | #endif
|
---|
[434] | 136 | #if !FF_FS_TINY
|
---|
| 137 | BYTE buf[FF_MAX_SS]; /* File private data read/write window */
|
---|
[270] | 138 | #endif
|
---|
| 139 | } FIL;
|
---|
| 140 |
|
---|
| 141 |
|
---|
| 142 |
|
---|
[434] | 143 | /* Directory object structure (FATFS_DIR) */
|
---|
[270] | 144 |
|
---|
[279] | 145 | typedef struct __dirstream {
|
---|
[270] | 146 | FATFS* fs; /* Pointer to the owner file system object (**do not change order**) */
|
---|
| 147 | WORD id; /* Owner file system mount ID (**do not change order**) */
|
---|
| 148 | WORD index; /* Current read/write index number */
|
---|
| 149 | DWORD sclust; /* Table start cluster (0:Root dir) */
|
---|
| 150 | DWORD clust; /* Current cluster */
|
---|
| 151 | DWORD sect; /* Current sector */
|
---|
| 152 | BYTE* dir; /* Pointer to the current SFN entry in the win[] */
|
---|
| 153 | BYTE* fn; /* Pointer to the SFN (in/out) {file[8],ext[3],status[1]} */
|
---|
[434] | 154 | #if FF_FS_LOCK != 0
|
---|
[270] | 155 | UINT lockid; /* File lock ID (index of file semaphore table Files[]) */
|
---|
| 156 | #endif
|
---|
[434] | 157 | #if FF_USE_LFN
|
---|
[270] | 158 | WCHAR* lfn; /* Pointer to the LFN working buffer */
|
---|
| 159 | WORD lfn_idx; /* Last matched LFN index number (0xFFFF:No LFN) */
|
---|
| 160 | #endif
|
---|
[434] | 161 | #if FF_USE_FIND
|
---|
[270] | 162 | const TCHAR* pat; /* Pointer to the name matching pattern */
|
---|
| 163 | #endif
|
---|
[434] | 164 | } FATFS_DIR;
|
---|
[270] | 165 |
|
---|
| 166 |
|
---|
| 167 |
|
---|
| 168 | /* File information structure (FILINFO) */
|
---|
| 169 |
|
---|
| 170 | typedef struct {
|
---|
| 171 | DWORD fsize; /* File size */
|
---|
| 172 | WORD fdate; /* Last modified date */
|
---|
| 173 | WORD ftime; /* Last modified time */
|
---|
| 174 | BYTE fattrib; /* Attribute */
|
---|
| 175 | TCHAR fname[13]; /* Short file name (8.3 format) */
|
---|
[434] | 176 | #if FF_USE_LFN
|
---|
[270] | 177 | TCHAR* lfname; /* Pointer to the LFN buffer */
|
---|
| 178 | UINT lfsize; /* Size of LFN buffer in TCHAR */
|
---|
| 179 | #endif
|
---|
| 180 | } FILINFO;
|
---|
| 181 |
|
---|
| 182 |
|
---|
| 183 |
|
---|
| 184 | /* File function return code (FRESULT) */
|
---|
| 185 |
|
---|
| 186 | typedef enum {
|
---|
| 187 | FR_OK = 0, /* (0) Succeeded */
|
---|
| 188 | FR_DISK_ERR, /* (1) A hard error occurred in the low level disk I/O layer */
|
---|
| 189 | FR_INT_ERR, /* (2) Assertion failed */
|
---|
| 190 | FR_NOT_READY, /* (3) The physical drive cannot work */
|
---|
| 191 | FR_NO_FILE, /* (4) Could not find the file */
|
---|
| 192 | FR_NO_PATH, /* (5) Could not find the path */
|
---|
| 193 | FR_INVALID_NAME, /* (6) The path name format is invalid */
|
---|
| 194 | FR_DENIED, /* (7) Access denied due to prohibited access or directory full */
|
---|
| 195 | FR_EXIST, /* (8) Access denied due to prohibited access */
|
---|
| 196 | FR_INVALID_OBJECT, /* (9) The file/directory object is invalid */
|
---|
| 197 | FR_WRITE_PROTECTED, /* (10) The physical drive is write protected */
|
---|
| 198 | FR_INVALID_DRIVE, /* (11) The logical drive number is invalid */
|
---|
| 199 | FR_NOT_ENABLED, /* (12) The volume has no work area */
|
---|
| 200 | FR_NO_FILESYSTEM, /* (13) There is no valid FAT volume */
|
---|
| 201 | FR_MKFS_ABORTED, /* (14) The f_mkfs() aborted due to any parameter error */
|
---|
| 202 | FR_TIMEOUT, /* (15) Could not get a grant to access the volume within defined period */
|
---|
| 203 | FR_LOCKED, /* (16) The operation is rejected according to the file sharing policy */
|
---|
| 204 | FR_NOT_ENOUGH_CORE, /* (17) LFN working buffer could not be allocated */
|
---|
[434] | 205 | FR_TOO_MANY_OPEN_FILES, /* (18) Number of open files > FF_FS_LOCK */
|
---|
[270] | 206 | FR_INVALID_PARAMETER /* (19) Given parameter is invalid */
|
---|
| 207 | } FRESULT;
|
---|
| 208 |
|
---|
| 209 |
|
---|
| 210 |
|
---|
| 211 | /*--------------------------------------------------------------*/
|
---|
| 212 | /* FatFs module application interface */
|
---|
| 213 |
|
---|
| 214 | FRESULT f_open (FIL* fp, const TCHAR* path, BYTE mode); /* Open or create a file */
|
---|
| 215 | FRESULT f_close (FIL* fp); /* Close an open file object */
|
---|
| 216 | FRESULT f_read (FIL* fp, void* buff, UINT btr, UINT* br); /* Read data from a file */
|
---|
| 217 | FRESULT f_write (FIL* fp, const void* buff, UINT btw, UINT* bw); /* Write data to a file */
|
---|
| 218 | FRESULT f_forward (FIL* fp, UINT(*func)(const BYTE*,UINT), UINT btf, UINT* bf); /* Forward data to the stream */
|
---|
| 219 | FRESULT f_lseek (FIL* fp, DWORD ofs); /* Move file pointer of a file object */
|
---|
| 220 | FRESULT f_truncate (FIL* fp); /* Truncate file */
|
---|
| 221 | FRESULT f_sync (FIL* fp); /* Flush cached data of a writing file */
|
---|
[434] | 222 | FRESULT f_opendir (FATFS_DIR* dp, const TCHAR* path); /* Open a directory */
|
---|
| 223 | FRESULT f_closedir (FATFS_DIR* dp); /* Close an open directory */
|
---|
| 224 | FRESULT f_readdir (FATFS_DIR* dp, FILINFO* fno); /* Read a directory item */
|
---|
| 225 | FRESULT f_findfirst (FATFS_DIR* dp, FILINFO* fno, const TCHAR* path, const TCHAR* pattern); /* Find first file */
|
---|
| 226 | FRESULT f_findnext (FATFS_DIR* dp, FILINFO* fno); /* Find next file */
|
---|
[270] | 227 | FRESULT f_mkdir (const TCHAR* path); /* Create a sub directory */
|
---|
| 228 | FRESULT f_unlink (const TCHAR* path); /* Delete an existing file or directory */
|
---|
| 229 | FRESULT f_rename (const TCHAR* path_old, const TCHAR* path_new); /* Rename/Move a file or directory */
|
---|
| 230 | FRESULT f_stat (const TCHAR* path, FILINFO* fno); /* Get file status */
|
---|
| 231 | FRESULT f_chmod (const TCHAR* path, BYTE attr, BYTE mask); /* Change attribute of the file/dir */
|
---|
| 232 | FRESULT f_utime (const TCHAR* path, const FILINFO* fno); /* Change times-tamp of the file/dir */
|
---|
| 233 | FRESULT f_chdir (const TCHAR* path); /* Change current directory */
|
---|
| 234 | FRESULT f_chdrive (const TCHAR* path); /* Change current drive */
|
---|
| 235 | FRESULT f_getcwd (TCHAR* buff, UINT len); /* Get current directory */
|
---|
| 236 | FRESULT f_getfree (const TCHAR* path, DWORD* nclst, FATFS** fatfs); /* Get number of free clusters on the drive */
|
---|
| 237 | FRESULT f_getlabel (const TCHAR* path, TCHAR* label, DWORD* vsn); /* Get volume label */
|
---|
| 238 | FRESULT f_setlabel (const TCHAR* label); /* Set volume label */
|
---|
| 239 | FRESULT f_mount (FATFS* fs, const TCHAR* path, BYTE opt); /* Mount/Unmount a logical drive */
|
---|
| 240 | FRESULT f_mkfs (const TCHAR* path, BYTE sfd, UINT au); /* Create a file system on the volume */
|
---|
| 241 | FRESULT f_fdisk (BYTE pdrv, const DWORD szt[], void* work); /* Divide a physical drive into some partitions */
|
---|
| 242 | int f_putc (TCHAR c, FIL* fp); /* Put a character to the file */
|
---|
| 243 | int f_puts (const TCHAR* str, FIL* cp); /* Put a string to the file */
|
---|
| 244 | int f_vprintf (FIL* fp, const TCHAR* str, va_list arg); /* Put a formatted string to the file */
|
---|
| 245 | int f_printf (FIL* fp, const TCHAR* str, ...); /* Put a formatted string to the file */
|
---|
| 246 | TCHAR* f_gets (TCHAR* buff, int len, FIL* fp); /* Get a string from the file */
|
---|
| 247 |
|
---|
| 248 | #define f_eof(fp) ((int)((fp)->fptr == (fp)->fsize))
|
---|
| 249 | #define f_error(fp) ((fp)->err)
|
---|
| 250 | #define f_tell(fp) ((fp)->fptr)
|
---|
| 251 | #define f_size(fp) ((fp)->fsize)
|
---|
| 252 | #define f_rewind(fp) f_lseek((fp), 0)
|
---|
| 253 | #define f_rewinddir(dp) f_readdir((dp), 0)
|
---|
[279] | 254 | #define f_flush(fp) (FR_OK)
|
---|
[270] | 255 |
|
---|
| 256 | #define F_SEEK_SET 1
|
---|
| 257 | #define F_SEEK_CUR 2
|
---|
| 258 | #define F_SEEK_END 3
|
---|
[279] | 259 | FRESULT f_seek(FIL* fp, DWORD ofs, BYTE mode);
|
---|
[270] | 260 |
|
---|
| 261 | #ifndef EOF
|
---|
| 262 | #define EOF (-1)
|
---|
| 263 | #endif
|
---|
| 264 |
|
---|
| 265 |
|
---|
| 266 |
|
---|
| 267 |
|
---|
| 268 | /*--------------------------------------------------------------*/
|
---|
| 269 | /* Additional user defined functions */
|
---|
| 270 |
|
---|
| 271 | /* RTC function */
|
---|
[434] | 272 | #if !FF_FS_READONLY && !FF_FS_NORTC
|
---|
[270] | 273 | DWORD get_fattime (void);
|
---|
| 274 | #endif
|
---|
| 275 |
|
---|
| 276 | /* Unicode support functions */
|
---|
[434] | 277 | #if FF_USE_LFN /* Unicode - OEM code conversion */
|
---|
[270] | 278 | WCHAR ff_convert (WCHAR chr, UINT dir); /* OEM-Unicode bidirectional conversion */
|
---|
| 279 | WCHAR ff_wtoupper (WCHAR chr); /* Unicode upper-case conversion */
|
---|
[434] | 280 | #if FF_USE_LFN == 3 /* Memory functions */
|
---|
[270] | 281 | void* ff_memalloc (UINT msize); /* Allocate memory block */
|
---|
| 282 | void ff_memfree (void* mblock); /* Free memory block */
|
---|
| 283 | #endif
|
---|
| 284 | #endif
|
---|
| 285 |
|
---|
| 286 | /* Sync functions */
|
---|
[434] | 287 | #if FF_FS_REENTRANT
|
---|
| 288 | int ff_cre_syncobj (BYTE vol, FF_SYNC_t* sobj); /* Create a sync object */
|
---|
| 289 | int ff_req_grant (FF_SYNC_t sobj); /* Lock sync object */
|
---|
| 290 | void ff_rel_grant (FF_SYNC_t sobj); /* Unlock sync object */
|
---|
| 291 | int ff_del_syncobj (FF_SYNC_t sobj); /* Delete a sync object */
|
---|
[270] | 292 | #endif
|
---|
| 293 |
|
---|
| 294 |
|
---|
| 295 |
|
---|
| 296 |
|
---|
| 297 | /*--------------------------------------------------------------*/
|
---|
| 298 | /* Flags and offset address */
|
---|
| 299 |
|
---|
| 300 |
|
---|
| 301 | /* File access control and file status flags (FIL.flag) */
|
---|
| 302 |
|
---|
| 303 | #define FA_READ 0x01
|
---|
| 304 | #define FA_OPEN_EXISTING 0x00
|
---|
| 305 |
|
---|
[434] | 306 | #if !FF_FS_READONLY
|
---|
[270] | 307 | #define FA_WRITE 0x02
|
---|
| 308 | #define FA_CREATE_NEW 0x04
|
---|
| 309 | #define FA_CREATE_ALWAYS 0x08
|
---|
| 310 | #define FA_OPEN_ALWAYS 0x10
|
---|
[435] | 311 | #define FA_OPEN_APPEND 0x30
|
---|
[434] | 312 | #define FA_MODIFIED 0x20
|
---|
| 313 | #define FA_DIRTY 0x40
|
---|
[270] | 314 | #endif
|
---|
| 315 |
|
---|
| 316 |
|
---|
| 317 | /* FAT sub type (FATFS.fs_type) */
|
---|
| 318 |
|
---|
| 319 | #define FS_FAT12 1
|
---|
| 320 | #define FS_FAT16 2
|
---|
| 321 | #define FS_FAT32 3
|
---|
| 322 |
|
---|
| 323 |
|
---|
| 324 | /* File attribute bits for directory entry */
|
---|
| 325 |
|
---|
| 326 | #define AM_RDO 0x01 /* Read only */
|
---|
| 327 | #define AM_HID 0x02 /* Hidden */
|
---|
| 328 | #define AM_SYS 0x04 /* System */
|
---|
| 329 | #define AM_VOL 0x08 /* Volume label */
|
---|
| 330 | #define AM_LFN 0x0F /* LFN entry */
|
---|
| 331 | #define AM_DIR 0x10 /* Directory */
|
---|
| 332 | #define AM_ARC 0x20 /* Archive */
|
---|
| 333 | #define AM_MASK 0x3F /* Mask of defined bits */
|
---|
| 334 |
|
---|
| 335 |
|
---|
| 336 | /* Fast seek feature */
|
---|
| 337 | #define CREATE_LINKMAP 0xFFFFFFFF
|
---|
| 338 |
|
---|
| 339 |
|
---|
| 340 |
|
---|
| 341 | /*--------------------------------*/
|
---|
| 342 | /* Multi-byte word access macros */
|
---|
| 343 |
|
---|
[434] | 344 | #if FF_WORD_ACCESS == 1 /* Enable word access to the FAT structure */
|
---|
[270] | 345 | #define LD_WORD(ptr) (WORD)(*(WORD*)(BYTE*)(ptr))
|
---|
| 346 | #define LD_DWORD(ptr) (DWORD)(*(DWORD*)(BYTE*)(ptr))
|
---|
| 347 | #define ST_WORD(ptr,val) *(WORD*)(BYTE*)(ptr)=(WORD)(val)
|
---|
| 348 | #define ST_DWORD(ptr,val) *(DWORD*)(BYTE*)(ptr)=(DWORD)(val)
|
---|
| 349 | #else /* Use byte-by-byte access to the FAT structure */
|
---|
| 350 | #define LD_WORD(ptr) (WORD)(((WORD)*((BYTE*)(ptr)+1)<<8)|(WORD)*(BYTE*)(ptr))
|
---|
| 351 | #define LD_DWORD(ptr) (DWORD)(((DWORD)*((BYTE*)(ptr)+3)<<24)|((DWORD)*((BYTE*)(ptr)+2)<<16)|((WORD)*((BYTE*)(ptr)+1)<<8)|*(BYTE*)(ptr))
|
---|
| 352 | #define ST_WORD(ptr,val) *(BYTE*)(ptr)=(BYTE)(val); *((BYTE*)(ptr)+1)=(BYTE)((WORD)(val)>>8)
|
---|
| 353 | #define ST_DWORD(ptr,val) *(BYTE*)(ptr)=(BYTE)(val); *((BYTE*)(ptr)+1)=(BYTE)((WORD)(val)>>8); *((BYTE*)(ptr)+2)=(BYTE)((DWORD)(val)>>16); *((BYTE*)(ptr)+3)=(BYTE)((DWORD)(val)>>24)
|
---|
| 354 | #endif
|
---|
| 355 |
|
---|
| 356 | #ifdef __cplusplus
|
---|
| 357 | }
|
---|
| 358 | #endif
|
---|
| 359 |
|
---|
| 360 | #endif /* _FATFS */
|
---|