IJFW - IchigoJamのBASICプログラムをメモリカード(MMCまたは互換カード)に保存したり読み出したりできるプログラム。メモリカードにファームウェアのファイルを置くだけで、電源ON時に自動的に書き換える機能も搭載(一応こちらがメイン)。LPC1114FN28専用。
ffconf.h
00001 /*---------------------------------------------------------------------------/ 00002 / FatFs - FAT file system module configuration file R0.11a (C)ChaN, 2015 00003 /---------------------------------------------------------------------------*/ 00004 00005 #define _FFCONF 64180 /* Revision ID */ 00006 00007 /*---------------------------------------------------------------------------/ 00008 / Function Configurations 00009 /---------------------------------------------------------------------------*/ 00010 00011 #define _FS_READONLY 0 00012 /* This option switches read-only configuration. (0:Read/Write or 1:Read-only) 00013 / Read-only configuration removes writing API functions, f_write(), f_sync(), 00014 / f_unlink(), f_mkdir(), f_chmod(), f_rename(), f_truncate(), f_getfree() 00015 / and optional writing functions as well. */ 00016 00017 00018 #define _FS_MINIMIZE 0 00019 /* This option defines minimization level to remove some basic API functions. 00020 / 00021 / 0: All basic functions are enabled. 00022 / 1: f_stat(), f_getfree(), f_unlink(), f_mkdir(), f_chmod(), f_utime(), 00023 / f_truncate() and f_rename() function are removed. 00024 / 2: f_opendir(), f_readdir() and f_closedir() are removed in addition to 1. 00025 / 3: f_lseek() function is removed in addition to 2. */ 00026 00027 00028 #define _USE_STRFUNC 1 00029 /* This option switches string functions, f_gets(), f_putc(), f_puts() and 00030 / f_printf(). 00031 / 00032 / 0: Disable string functions. 00033 / 1: Enable without LF-CRLF conversion. 00034 / 2: Enable with LF-CRLF conversion. */ 00035 00036 00037 #define _USE_FIND 0 00038 /* This option switches filtered directory read feature and related functions, 00039 / f_findfirst() and f_findnext(). (0:Disable or 1:Enable) */ 00040 00041 00042 #define _USE_MKFS 0 00043 /* This option switches f_mkfs() function. (0:Disable or 1:Enable) */ 00044 00045 00046 #define _USE_FASTSEEK 0 00047 /* This option switches fast seek feature. (0:Disable or 1:Enable) */ 00048 00049 00050 #define _USE_LABEL 0 00051 /* This option switches volume label functions, f_getlabel() and f_setlabel(). 00052 / (0:Disable or 1:Enable) */ 00053 00054 00055 #define _USE_FORWARD 0 00056 /* This option switches f_forward() function. (0:Disable or 1:Enable) 00057 / To enable it, also _FS_TINY need to be set to 1. */ 00058 00059 00060 /*---------------------------------------------------------------------------/ 00061 / Locale and Namespace Configurations 00062 /---------------------------------------------------------------------------*/ 00063 00064 #define _CODE_PAGE 1 00065 /* This option specifies the OEM code page to be used on the target system. 00066 / Incorrect setting of the code page can cause a file open failure. 00067 / 00068 / 1 - ASCII (No extended character. Non-LFN cfg. only) 00069 / 437 - U.S. 00070 / 720 - Arabic 00071 / 737 - Greek 00072 / 771 - KBL 00073 / 775 - Baltic 00074 / 850 - Latin 1 00075 / 852 - Latin 2 00076 / 855 - Cyrillic 00077 / 857 - Turkish 00078 / 860 - Portuguese 00079 / 861 - Icelandic 00080 / 862 - Hebrew 00081 / 863 - Canadian French 00082 / 864 - Arabic 00083 / 865 - Nordic 00084 / 866 - Russian 00085 / 869 - Greek 2 00086 / 932 - Japanese (DBCS) 00087 / 936 - Simplified Chinese (DBCS) 00088 / 949 - Korean (DBCS) 00089 / 950 - Traditional Chinese (DBCS) 00090 */ 00091 00092 00093 #define _USE_LFN 0 00094 #define _MAX_LFN 255 00095 /* The _USE_LFN option switches the LFN feature. 00096 / 00097 / 0: Disable LFN feature. _MAX_LFN has no effect. 00098 / 1: Enable LFN with static working buffer on the BSS. Always NOT thread-safe. 00099 / 2: Enable LFN with dynamic working buffer on the STACK. 00100 / 3: Enable LFN with dynamic working buffer on the HEAP. 00101 / 00102 / When enable the LFN feature, Unicode handling functions (option/unicode.c) must 00103 / be added to the project. The LFN working buffer occupies (_MAX_LFN + 1) * 2 bytes. 00104 / When use stack for the working buffer, take care on stack overflow. When use heap 00105 / memory for the working buffer, memory management functions, ff_memalloc() and 00106 / ff_memfree(), must be added to the project. */ 00107 00108 00109 #define _LFN_UNICODE 0 00110 /* This option switches character encoding on the API. (0:ANSI/OEM or 1:Unicode) 00111 / To use Unicode string for the path name, enable LFN feature and set _LFN_UNICODE 00112 / to 1. This option also affects behavior of string I/O functions. */ 00113 00114 00115 #define _STRF_ENCODE 3 00116 /* When _LFN_UNICODE is 1, this option selects the character encoding on the file to 00117 / be read/written via string I/O functions, f_gets(), f_putc(), f_puts and f_printf(). 00118 / 00119 / 0: ANSI/OEM 00120 / 1: UTF-16LE 00121 / 2: UTF-16BE 00122 / 3: UTF-8 00123 / 00124 / When _LFN_UNICODE is 0, this option has no effect. */ 00125 00126 00127 #define _FS_RPATH 1 00128 /* This option configures relative path feature. 00129 / 00130 / 0: Disable relative path feature and remove related functions. 00131 / 1: Enable relative path feature. f_chdir() and f_chdrive() are available. 00132 / 2: f_getcwd() function is available in addition to 1. 00133 / 00134 / Note that directory items read via f_readdir() are affected by this option. */ 00135 00136 00137 /*---------------------------------------------------------------------------/ 00138 / Drive/Volume Configurations 00139 /---------------------------------------------------------------------------*/ 00140 00141 #define _VOLUMES 1 00142 /* Number of volumes (logical drives) to be used. */ 00143 00144 00145 #define _STR_VOLUME_ID 0 00146 #define _VOLUME_STRS "RAM","NAND","CF","SD1","SD2","USB1","USB2","USB3" 00147 /* _STR_VOLUME_ID option switches string volume ID feature. 00148 / When _STR_VOLUME_ID is set to 1, also pre-defined strings can be used as drive 00149 / number in the path name. _VOLUME_STRS defines the drive ID strings for each 00150 / logical drives. Number of items must be equal to _VOLUMES. Valid characters for 00151 / the drive ID strings are: A-Z and 0-9. */ 00152 00153 00154 #define _MULTI_PARTITION 0 00155 /* This option switches multi-partition feature. By default (0), each logical drive 00156 / number is bound to the same physical drive number and only an FAT volume found on 00157 / the physical drive will be mounted. When multi-partition feature is enabled (1), 00158 / each logical drive number is bound to arbitrary physical drive and partition 00159 / listed in the VolToPart[]. Also f_fdisk() funciton will be available. */ 00160 00161 00162 #define _MIN_SS 512 00163 #define _MAX_SS 512 00164 /* These options configure the range of sector size to be supported. (512, 1024, 00165 / 2048 or 4096) Always set both 512 for most systems, all type of memory cards and 00166 / harddisk. But a larger value may be required for on-board flash memory and some 00167 / type of optical media. When _MAX_SS is larger than _MIN_SS, FatFs is configured 00168 / to variable sector size and GET_SECTOR_SIZE command must be implemented to the 00169 / disk_ioctl() function. */ 00170 00171 00172 #define _USE_TRIM 0 00173 /* This option switches ATA-TRIM feature. (0:Disable or 1:Enable) 00174 / To enable Trim feature, also CTRL_TRIM command should be implemented to the 00175 / disk_ioctl() function. */ 00176 00177 00178 #define _FS_NOFSINFO 0 00179 /* If you need to know correct free space on the FAT32 volume, set bit 0 of this 00180 / option, and f_getfree() function at first time after volume mount will force 00181 / a full FAT scan. Bit 1 controls the use of last allocated cluster number. 00182 / 00183 / bit0=0: Use free cluster count in the FSINFO if available. 00184 / bit0=1: Do not trust free cluster count in the FSINFO. 00185 / bit1=0: Use last allocated cluster number in the FSINFO if available. 00186 / bit1=1: Do not trust last allocated cluster number in the FSINFO. 00187 */ 00188 00189 00190 00191 /*---------------------------------------------------------------------------/ 00192 / System Configurations 00193 /---------------------------------------------------------------------------*/ 00194 00195 #define _FS_TINY 0 00196 /* This option switches tiny buffer configuration. (0:Normal or 1:Tiny) 00197 / At the tiny configuration, size of the file object (FIL) is reduced _MAX_SS 00198 / bytes. Instead of private sector buffer eliminated from the file object, 00199 / common sector buffer in the file system object (FATFS) is used for the file 00200 / data transfer. */ 00201 00202 00203 #define _FS_NORTC 1 00204 #define _NORTC_MON 1 00205 #define _NORTC_MDAY 1 00206 #define _NORTC_YEAR 2015 00207 /* The _FS_NORTC option switches timestamp feature. If the system does not have 00208 / an RTC function or valid timestamp is not needed, set _FS_NORTC to 1 to disable 00209 / the timestamp feature. All objects modified by FatFs will have a fixed timestamp 00210 / defined by _NORTC_MON, _NORTC_MDAY and _NORTC_YEAR. 00211 / When timestamp feature is enabled (_FS_NORTC == 0), get_fattime() function need 00212 / to be added to the project to read current time form RTC. _NORTC_MON, 00213 / _NORTC_MDAY and _NORTC_YEAR have no effect. 00214 / These options have no effect at read-only configuration (_FS_READONLY == 1). */ 00215 00216 00217 #define _FS_LOCK 0 00218 /* The _FS_LOCK option switches file lock feature to control duplicated file open 00219 / and illegal operation to open objects. This option must be 0 when _FS_READONLY 00220 / is 1. 00221 / 00222 / 0: Disable file lock feature. To avoid volume corruption, application program 00223 / should avoid illegal open, remove and rename to the open objects. 00224 / >0: Enable file lock feature. The value defines how many files/sub-directories 00225 / can be opened simultaneously under file lock control. Note that the file 00226 / lock feature is independent of re-entrancy. */ 00227 00228 00229 #define _FS_REENTRANT 0 00230 #define _FS_TIMEOUT 1000 00231 #define _SYNC_t HANDLE 00232 /* The _FS_REENTRANT option switches the re-entrancy (thread safe) of the FatFs 00233 / module itself. Note that regardless of this option, file access to different 00234 / volume is always re-entrant and volume control functions, f_mount(), f_mkfs() 00235 / and f_fdisk() function, are always not re-entrant. Only file/directory access 00236 / to the same volume is under control of this feature. 00237 / 00238 / 0: Disable re-entrancy. _FS_TIMEOUT and _SYNC_t have no effect. 00239 / 1: Enable re-entrancy. Also user provided synchronization handlers, 00240 / ff_req_grant(), ff_rel_grant(), ff_del_syncobj() and ff_cre_syncobj() 00241 / function, must be added to the project. Samples are available in 00242 / option/syscall.c. 00243 / 00244 / The _FS_TIMEOUT defines timeout period in unit of time tick. 00245 / The _SYNC_t defines O/S dependent sync object type. e.g. HANDLE, ID, OS_EVENT*, 00246 / SemaphoreHandle_t and etc.. A header file for O/S definitions needs to be 00247 / included somewhere in the scope of ff.c. */ 00248 00249 00250 #define _WORD_ACCESS 0 00251 /* The _WORD_ACCESS option is an only platform dependent option. It defines 00252 / which access method is used to the word data on the FAT volume. 00253 / 00254 / 0: Byte-by-byte access. Always compatible with all platforms. 00255 / 1: Word access. Do not choose this unless under both the following conditions. 00256 / 00257 / * Address misaligned memory access is always allowed to ALL instructions. 00258 / * Byte order on the memory is little-endian. 00259 / 00260 / If it is the case, _WORD_ACCESS can also be set to 1 to reduce code size. 00261 / Following table shows allowable settings of some type of processors. 00262 / 00263 / ARM7TDMI 0 *2 ColdFire 0 *1 V850E 0 *2 00264 / Cortex-M3 0 *3 Z80 0/1 V850ES 0/1 00265 / Cortex-M0 0 *2 x86 0/1 TLCS-870 0/1 00266 / AVR 0/1 RX600(LE) 0/1 TLCS-900 0/1 00267 / AVR32 0 *1 RL78 0 *2 R32C 0 *2 00268 / PIC18 0/1 SH-2 0 *1 M16C 0/1 00269 / PIC24 0 *2 H8S 0 *1 MSP430 0 *2 00270 / PIC32 0 *1 H8/300H 0 *1 8051 0/1 00271 / 00272 / *1:Big-endian. 00273 / *2:Unaligned memory access is not supported. 00274 / *3:Some compilers generate LDM/STM for mem_cpy function. 00275 */ 00276
Generated on Sat Jul 16 2022 19:47:26 by 1.7.2