SD Card Interface class. Log raw data bytes to memory addresses of your choice, or format the card and use the FAT file system to write files.

Dependencies:   mbed

Committer:
Blaze513
Date:
Sat Aug 07 18:32:30 2010 +0000
Revision:
1:94c648931f84
Child:
3:210eb67b260c

        

Who changed what in which revision?

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