Code for autonomous ground vehicle, Data Bus, 3rd place winner in 2012 Sparkfun AVC.

Dependencies:   Watchdog mbed Schedule SimpleFilter LSM303DLM PinDetect DebounceIn Servo

Committer:
shimniok
Date:
Wed Jun 20 14:57:48 2012 +0000
Revision:
0:826c6171fc1b
Updated documentation

Who changed what in which revision?

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