Updated get_fattime to use rtc and provide a date/time. This has been an annoying missing feature.

Dependents:   IoTGateway_Basic y_XBeeTest_5_read CameraC1098_picture LifeCam ... more

Committer:
SomeRandomBloke
Date:
Mon Apr 02 22:06:35 2012 +0000
Revision:
1:5baba5d5b728
Parent:
0:93acdd9f65f4

        

Who changed what in which revision?

UserRevisionLine numberNew contents of line
SomeRandomBloke 0:93acdd9f65f4 1 /*---------------------------------------------------------------------------/
SomeRandomBloke 0:93acdd9f65f4 2 / FatFs - FAT file system module configuration file R0.09 (C)ChaN, 2011
SomeRandomBloke 0:93acdd9f65f4 3 /----------------------------------------------------------------------------/
SomeRandomBloke 0:93acdd9f65f4 4 /
SomeRandomBloke 0:93acdd9f65f4 5 / CAUTION! Do not forget to make clean the project after any changes to
SomeRandomBloke 0:93acdd9f65f4 6 / the configuration options.
SomeRandomBloke 0:93acdd9f65f4 7 /
SomeRandomBloke 0:93acdd9f65f4 8 /----------------------------------------------------------------------------*/
SomeRandomBloke 0:93acdd9f65f4 9 #ifndef _FFCONF
SomeRandomBloke 1:5baba5d5b728 10 #define _FFCONF 6502 /* Revision ID */
SomeRandomBloke 0:93acdd9f65f4 11
SomeRandomBloke 0:93acdd9f65f4 12
SomeRandomBloke 0:93acdd9f65f4 13 /*---------------------------------------------------------------------------/
SomeRandomBloke 0:93acdd9f65f4 14 / Functions and Buffer Configurations
SomeRandomBloke 0:93acdd9f65f4 15 /----------------------------------------------------------------------------*/
SomeRandomBloke 0:93acdd9f65f4 16
SomeRandomBloke 1:5baba5d5b728 17 #define _FS_TINY 1 /* 0:Normal or 1:Tiny */
SomeRandomBloke 0:93acdd9f65f4 18 /* When _FS_TINY is set to 1, FatFs uses the sector buffer in the file system
SomeRandomBloke 0:93acdd9f65f4 19 / object instead of the sector buffer in the individual file object for file
SomeRandomBloke 0:93acdd9f65f4 20 / data transfer. This reduces memory consumption 512 bytes each file object. */
SomeRandomBloke 0:93acdd9f65f4 21
SomeRandomBloke 0:93acdd9f65f4 22
SomeRandomBloke 1:5baba5d5b728 23 #define _FS_READONLY 0 /* 0:Read/Write or 1:Read only */
SomeRandomBloke 0:93acdd9f65f4 24 /* Setting _FS_READONLY to 1 defines read only configuration. This removes
SomeRandomBloke 0:93acdd9f65f4 25 / writing functions, f_write, f_sync, f_unlink, f_mkdir, f_chmod, f_rename,
SomeRandomBloke 0:93acdd9f65f4 26 / f_truncate and useless f_getfree. */
SomeRandomBloke 0:93acdd9f65f4 27
SomeRandomBloke 0:93acdd9f65f4 28
SomeRandomBloke 1:5baba5d5b728 29 #define _FS_MINIMIZE 0 /* 0 to 3 */
SomeRandomBloke 0:93acdd9f65f4 30 /* The _FS_MINIMIZE option defines minimization level to remove some functions.
SomeRandomBloke 0:93acdd9f65f4 31 /
SomeRandomBloke 0:93acdd9f65f4 32 / 0: Full function.
SomeRandomBloke 0:93acdd9f65f4 33 / 1: f_stat, f_getfree, f_unlink, f_mkdir, f_chmod, f_truncate and f_rename
SomeRandomBloke 0:93acdd9f65f4 34 / are removed.
SomeRandomBloke 0:93acdd9f65f4 35 / 2: f_opendir and f_readdir are removed in addition to 1.
SomeRandomBloke 0:93acdd9f65f4 36 / 3: f_lseek is removed in addition to 2. */
SomeRandomBloke 0:93acdd9f65f4 37
SomeRandomBloke 0:93acdd9f65f4 38
SomeRandomBloke 1:5baba5d5b728 39 #define _USE_STRFUNC 0 /* 0:Disable or 1-2:Enable */
SomeRandomBloke 0:93acdd9f65f4 40 /* To enable string functions, set _USE_STRFUNC to 1 or 2. */
SomeRandomBloke 0:93acdd9f65f4 41
SomeRandomBloke 0:93acdd9f65f4 42
SomeRandomBloke 1:5baba5d5b728 43 #define _USE_MKFS 1 /* 0:Disable or 1:Enable */
SomeRandomBloke 0:93acdd9f65f4 44 /* To enable f_mkfs function, set _USE_MKFS to 1 and set _FS_READONLY to 0 */
SomeRandomBloke 0:93acdd9f65f4 45
SomeRandomBloke 0:93acdd9f65f4 46
SomeRandomBloke 1:5baba5d5b728 47 #define _USE_FORWARD 0 /* 0:Disable or 1:Enable */
SomeRandomBloke 0:93acdd9f65f4 48 /* To enable f_forward function, set _USE_FORWARD to 1 and set _FS_TINY to 1. */
SomeRandomBloke 0:93acdd9f65f4 49
SomeRandomBloke 0:93acdd9f65f4 50
SomeRandomBloke 1:5baba5d5b728 51 #define _USE_FASTSEEK 0 /* 0:Disable or 1:Enable */
SomeRandomBloke 0:93acdd9f65f4 52 /* To enable fast seek feature, set _USE_FASTSEEK to 1. */
SomeRandomBloke 0:93acdd9f65f4 53
SomeRandomBloke 0:93acdd9f65f4 54
SomeRandomBloke 0:93acdd9f65f4 55
SomeRandomBloke 0:93acdd9f65f4 56 /*---------------------------------------------------------------------------/
SomeRandomBloke 0:93acdd9f65f4 57 / Locale and Namespace Configurations
SomeRandomBloke 0:93acdd9f65f4 58 /----------------------------------------------------------------------------*/
SomeRandomBloke 0:93acdd9f65f4 59
SomeRandomBloke 1:5baba5d5b728 60 #define _CODE_PAGE 858
SomeRandomBloke 0:93acdd9f65f4 61 /* The _CODE_PAGE specifies the OEM code page to be used on the target system.
SomeRandomBloke 0:93acdd9f65f4 62 / Incorrect setting of the code page can cause a file open failure.
SomeRandomBloke 0:93acdd9f65f4 63 /
SomeRandomBloke 0:93acdd9f65f4 64 / 932 - Japanese Shift-JIS (DBCS, OEM, Windows)
SomeRandomBloke 0:93acdd9f65f4 65 / 936 - Simplified Chinese GBK (DBCS, OEM, Windows)
SomeRandomBloke 0:93acdd9f65f4 66 / 949 - Korean (DBCS, OEM, Windows)
SomeRandomBloke 0:93acdd9f65f4 67 / 950 - Traditional Chinese Big5 (DBCS, OEM, Windows)
SomeRandomBloke 0:93acdd9f65f4 68 / 1250 - Central Europe (Windows)
SomeRandomBloke 0:93acdd9f65f4 69 / 1251 - Cyrillic (Windows)
SomeRandomBloke 0:93acdd9f65f4 70 / 1252 - Latin 1 (Windows)
SomeRandomBloke 0:93acdd9f65f4 71 / 1253 - Greek (Windows)
SomeRandomBloke 0:93acdd9f65f4 72 / 1254 - Turkish (Windows)
SomeRandomBloke 0:93acdd9f65f4 73 / 1255 - Hebrew (Windows)
SomeRandomBloke 0:93acdd9f65f4 74 / 1256 - Arabic (Windows)
SomeRandomBloke 0:93acdd9f65f4 75 / 1257 - Baltic (Windows)
SomeRandomBloke 0:93acdd9f65f4 76 / 1258 - Vietnam (OEM, Windows)
SomeRandomBloke 0:93acdd9f65f4 77 / 437 - U.S. (OEM)
SomeRandomBloke 0:93acdd9f65f4 78 / 720 - Arabic (OEM)
SomeRandomBloke 0:93acdd9f65f4 79 / 737 - Greek (OEM)
SomeRandomBloke 0:93acdd9f65f4 80 / 775 - Baltic (OEM)
SomeRandomBloke 0:93acdd9f65f4 81 / 850 - Multilingual Latin 1 (OEM)
SomeRandomBloke 0:93acdd9f65f4 82 / 858 - Multilingual Latin 1 + Euro (OEM)
SomeRandomBloke 0:93acdd9f65f4 83 / 852 - Latin 2 (OEM)
SomeRandomBloke 0:93acdd9f65f4 84 / 855 - Cyrillic (OEM)
SomeRandomBloke 0:93acdd9f65f4 85 / 866 - Russian (OEM)
SomeRandomBloke 0:93acdd9f65f4 86 / 857 - Turkish (OEM)
SomeRandomBloke 0:93acdd9f65f4 87 / 862 - Hebrew (OEM)
SomeRandomBloke 0:93acdd9f65f4 88 / 874 - Thai (OEM, Windows)
SomeRandomBloke 1:5baba5d5b728 89 / 1 - ASCII only (Valid for non LFN cfg.)
SomeRandomBloke 0:93acdd9f65f4 90 */
SomeRandomBloke 0:93acdd9f65f4 91
SomeRandomBloke 0:93acdd9f65f4 92
SomeRandomBloke 1:5baba5d5b728 93 #define _USE_LFN 1 /* 0 to 3 */
SomeRandomBloke 1:5baba5d5b728 94 #define _MAX_LFN 255 /* Maximum LFN length to handle (12 to 255) */
SomeRandomBloke 0:93acdd9f65f4 95 /* The _USE_LFN option switches the LFN support.
SomeRandomBloke 0:93acdd9f65f4 96 /
SomeRandomBloke 0:93acdd9f65f4 97 / 0: Disable LFN feature. _MAX_LFN and _LFN_UNICODE have no effect.
SomeRandomBloke 0:93acdd9f65f4 98 / 1: Enable LFN with static working buffer on the BSS. Always NOT reentrant.
SomeRandomBloke 0:93acdd9f65f4 99 / 2: Enable LFN with dynamic working buffer on the STACK.
SomeRandomBloke 0:93acdd9f65f4 100 / 3: Enable LFN with dynamic working buffer on the HEAP.
SomeRandomBloke 0:93acdd9f65f4 101 /
SomeRandomBloke 0:93acdd9f65f4 102 / The LFN working buffer occupies (_MAX_LFN + 1) * 2 bytes. To enable LFN,
SomeRandomBloke 0:93acdd9f65f4 103 / Unicode handling functions ff_convert() and ff_wtoupper() must be added
SomeRandomBloke 0:93acdd9f65f4 104 / to the project. When enable to use heap, memory control functions
SomeRandomBloke 0:93acdd9f65f4 105 / ff_memalloc() and ff_memfree() must be added to the project. */
SomeRandomBloke 0:93acdd9f65f4 106
SomeRandomBloke 0:93acdd9f65f4 107
SomeRandomBloke 1:5baba5d5b728 108 #define _LFN_UNICODE 0 /* 0:ANSI/OEM or 1:Unicode */
SomeRandomBloke 0:93acdd9f65f4 109 /* To switch the character code set on FatFs API to Unicode,
SomeRandomBloke 0:93acdd9f65f4 110 / enable LFN feature and set _LFN_UNICODE to 1. */
SomeRandomBloke 0:93acdd9f65f4 111
SomeRandomBloke 0:93acdd9f65f4 112
SomeRandomBloke 1:5baba5d5b728 113 #define _FS_RPATH 0 /* 0 to 2 */
SomeRandomBloke 0:93acdd9f65f4 114 /* The _FS_RPATH option configures relative path feature.
SomeRandomBloke 0:93acdd9f65f4 115 /
SomeRandomBloke 0:93acdd9f65f4 116 / 0: Disable relative path feature and remove related functions.
SomeRandomBloke 0:93acdd9f65f4 117 / 1: Enable relative path. f_chdrive() and f_chdir() are available.
SomeRandomBloke 0:93acdd9f65f4 118 / 2: f_getcwd() is available in addition to 1.
SomeRandomBloke 0:93acdd9f65f4 119 /
SomeRandomBloke 0:93acdd9f65f4 120 / Note that output of the f_readdir fnction is affected by this option. */
SomeRandomBloke 0:93acdd9f65f4 121
SomeRandomBloke 0:93acdd9f65f4 122
SomeRandomBloke 0:93acdd9f65f4 123
SomeRandomBloke 0:93acdd9f65f4 124 /*---------------------------------------------------------------------------/
SomeRandomBloke 0:93acdd9f65f4 125 / Physical Drive Configurations
SomeRandomBloke 0:93acdd9f65f4 126 /----------------------------------------------------------------------------*/
SomeRandomBloke 0:93acdd9f65f4 127
SomeRandomBloke 1:5baba5d5b728 128 #define _VOLUMES 4
SomeRandomBloke 0:93acdd9f65f4 129 /* Number of volumes (logical drives) to be used. */
SomeRandomBloke 0:93acdd9f65f4 130
SomeRandomBloke 0:93acdd9f65f4 131
SomeRandomBloke 1:5baba5d5b728 132 #define _MAX_SS 512 /* 512, 1024, 2048 or 4096 */
SomeRandomBloke 0:93acdd9f65f4 133 /* Maximum sector size to be handled.
SomeRandomBloke 0:93acdd9f65f4 134 / Always set 512 for memory card and hard disk but a larger value may be
SomeRandomBloke 0:93acdd9f65f4 135 / required for on-board flash memory, floppy disk and optical disk.
SomeRandomBloke 0:93acdd9f65f4 136 / When _MAX_SS is larger than 512, it configures FatFs to variable sector size
SomeRandomBloke 0:93acdd9f65f4 137 / and GET_SECTOR_SIZE command must be implememted to the disk_ioctl function. */
SomeRandomBloke 0:93acdd9f65f4 138
SomeRandomBloke 0:93acdd9f65f4 139
SomeRandomBloke 1:5baba5d5b728 140 #define _MULTI_PARTITION 0 /* 0:Single partition, 1/2:Enable multiple partition */
SomeRandomBloke 0:93acdd9f65f4 141 /* When set to 0, each volume is bound to the same physical drive number and
SomeRandomBloke 0:93acdd9f65f4 142 / it can mount only first primaly partition. When it is set to 1, each volume
SomeRandomBloke 0:93acdd9f65f4 143 / is tied to the partitions listed in VolToPart[]. */
SomeRandomBloke 0:93acdd9f65f4 144
SomeRandomBloke 0:93acdd9f65f4 145
SomeRandomBloke 1:5baba5d5b728 146 #define _USE_ERASE 0 /* 0:Disable or 1:Enable */
SomeRandomBloke 0:93acdd9f65f4 147 /* To enable sector erase feature, set _USE_ERASE to 1. CTRL_ERASE_SECTOR command
SomeRandomBloke 0:93acdd9f65f4 148 / should be added to the disk_ioctl functio. */
SomeRandomBloke 0:93acdd9f65f4 149
SomeRandomBloke 0:93acdd9f65f4 150
SomeRandomBloke 0:93acdd9f65f4 151
SomeRandomBloke 0:93acdd9f65f4 152 /*---------------------------------------------------------------------------/
SomeRandomBloke 0:93acdd9f65f4 153 / System Configurations
SomeRandomBloke 0:93acdd9f65f4 154 /----------------------------------------------------------------------------*/
SomeRandomBloke 0:93acdd9f65f4 155
SomeRandomBloke 1:5baba5d5b728 156 #define _WORD_ACCESS 0 /* 0 or 1 */
SomeRandomBloke 0:93acdd9f65f4 157 /* Set 0 first and it is always compatible with all platforms. The _WORD_ACCESS
SomeRandomBloke 0:93acdd9f65f4 158 / option defines which access method is used to the word data on the FAT volume.
SomeRandomBloke 0:93acdd9f65f4 159 /
SomeRandomBloke 0:93acdd9f65f4 160 / 0: Byte-by-byte access.
SomeRandomBloke 0:93acdd9f65f4 161 / 1: Word access. Do not choose this unless following condition is met.
SomeRandomBloke 0:93acdd9f65f4 162 /
SomeRandomBloke 0:93acdd9f65f4 163 / When the byte order on the memory is big-endian or address miss-aligned word
SomeRandomBloke 0:93acdd9f65f4 164 / access results incorrect behavior, the _WORD_ACCESS must be set to 0.
SomeRandomBloke 0:93acdd9f65f4 165 / If it is not the case, the value can also be set to 1 to improve the
SomeRandomBloke 0:93acdd9f65f4 166 / performance and code size.
SomeRandomBloke 0:93acdd9f65f4 167 */
SomeRandomBloke 0:93acdd9f65f4 168
SomeRandomBloke 0:93acdd9f65f4 169
SomeRandomBloke 0:93acdd9f65f4 170 /* A header file that defines sync object types on the O/S, such as
SomeRandomBloke 0:93acdd9f65f4 171 / windows.h, ucos_ii.h and semphr.h, must be included prior to ff.h. */
SomeRandomBloke 0:93acdd9f65f4 172
SomeRandomBloke 1:5baba5d5b728 173 #define _FS_REENTRANT 0 /* 0:Disable or 1:Enable */
SomeRandomBloke 1:5baba5d5b728 174 #define _FS_TIMEOUT 1000 /* Timeout period in unit of time ticks */
SomeRandomBloke 1:5baba5d5b728 175 #define _SYNC_t HANDLE /* O/S dependent type of sync object. e.g. HANDLE, OS_EVENT*, ID and etc.. */
SomeRandomBloke 0:93acdd9f65f4 176
SomeRandomBloke 0:93acdd9f65f4 177 /* The _FS_REENTRANT option switches the reentrancy (thread safe) of the FatFs module.
SomeRandomBloke 0:93acdd9f65f4 178 /
SomeRandomBloke 0:93acdd9f65f4 179 / 0: Disable reentrancy. _SYNC_t and _FS_TIMEOUT have no effect.
SomeRandomBloke 0:93acdd9f65f4 180 / 1: Enable reentrancy. Also user provided synchronization handlers,
SomeRandomBloke 0:93acdd9f65f4 181 / ff_req_grant, ff_rel_grant, ff_del_syncobj and ff_cre_syncobj
SomeRandomBloke 0:93acdd9f65f4 182 / function must be added to the project. */
SomeRandomBloke 0:93acdd9f65f4 183
SomeRandomBloke 0:93acdd9f65f4 184
SomeRandomBloke 1:5baba5d5b728 185 #define _FS_SHARE 0 /* 0:Disable or >=1:Enable */
SomeRandomBloke 0:93acdd9f65f4 186 /* To enable file shareing feature, set _FS_SHARE to 1 or greater. The value
SomeRandomBloke 0:93acdd9f65f4 187 defines how many files can be opened simultaneously. */
SomeRandomBloke 0:93acdd9f65f4 188
SomeRandomBloke 0:93acdd9f65f4 189
SomeRandomBloke 0:93acdd9f65f4 190 #endif /* _FFCONFIG */