Satellite Observers Workbench. NOT yet complete, just published for forum posters to \"cherry pick\" pieces of code as requiered as an example.

Dependencies:   mbed

Committer:
AjK
Date:
Mon Oct 11 10:34:55 2010 +0000
Revision:
0:0a841b89d614
Totally Alpha quality as this project isn\t completed. Just publishing it as it answers many questions asked in the forums

Who changed what in which revision?

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