Keyboard firmwares for Atmel AVR and Cortex-M
Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

ffconf.h 7.7KB

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