config.h 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154
  1. #ifndef __EFSL_CONFIG_H__
  2. #define __EFSL_CONFIG_H__
  3. /* include RT-Thread to import configuration */
  4. #include <rtthread.h>
  5. /* Hardware target
  6. ---------------
  7. * Here you will define for what hardware-endpoint EFSL should be compiled.
  8. * Look in interfaces.h to see what systems are supported, and add your own
  9. * there if you need to write your own driver. Then, define the name you
  10. * selected for your hardware there here. Make sure that you only select one
  11. * device!
  12. */
  13. /*#define HW_ENDPOINT_LINUX*/
  14. /*#define HW_ENDPOINT_ATMEGA128_SD*/
  15. /*#define HW_ENDPOINT_DSP_TI6713_SD*/
  16. #define MULTIPLE_INTERFACE_SUPPORT
  17. /*#define HWIFUNC_INIT(x) lf_init(x)
  18. #define HWIFUNC_READ(x,y,z) lf_readBuf(x,y,z)
  19. #define HWIFUNC_WRITE(x,y,z) lf_writeBuf(x,y,z)
  20. #define HWIFUNC_HEADER interfaces/linuxfile.h */
  21. /* Architecture
  22. ------------
  23. * In this section you should configure how large the default variable
  24. * types in your system are. This is controlled in types.h in the general
  25. * include directory. The selection you make here defines to what the various
  26. * e(s|u)int(8,16,32) types will map.
  27. * For 32 bit Linux : VARSIZE_LINUX32
  28. * For 64 bit Linux : VARSIZE_LINUX64
  29. * For AVR's : VARSIZE_ATMEGA
  30. * For TMS67XX : VARSIZE_TMS67XX
  31. */
  32. #define VARSIZE_LINUX32
  33. /* Memory configuration
  34. --------------------
  35. * Here you must configure wheter your processor can access memory byte
  36. * oriented. All x86 processors can do it, AVR's can do it to. Some DSP
  37. * or other microcontrollers can't. If you have an 8 bit system you're safe.
  38. * If you are really unsure, leave the setting commented out, it will be slower
  39. * but it will work for sure.
  40. */
  41. /* #define BYTE_ALIGNMENT */
  42. /* Cache configuration
  43. -------------------
  44. * Here you must configure how much memory of cache you can/want to use.
  45. * The number you put at IOMAN_NUMBUFFER is multiplied by 512. So 1 means
  46. * 512 bytes cache, 4 means 2048 bytes cache. More is better.
  47. * The number after IOMAN_NUMITERATIONS should be untouched.
  48. * The last field (IOMAN_DO_MEMALLOC) is to tell ioman to allocate it's
  49. * own memory in it's structure, or not. If you choose to do it yourself
  50. * you will have to pass a pointer to the memory as the last argument of
  51. * ioman_init.
  52. */
  53. #define IOMAN_NUMBUFFER 10
  54. #define IOMAN_NUMITERATIONS 3
  55. #define IOMAN_DO_MEMALLOC
  56. /* Cluster pre-allocation
  57. ----------------------
  58. * When writing files, the function that performs the actual write has to
  59. * calculate how many clusters it will need for that request. It then allocates
  60. * that number of new clusters to the file. Since this involves some
  61. * calculations and writing of the FAT, you might find it beneficial to limit
  62. * the number of allocations, and allow fwrite to pre-allocate a number of
  63. * clusters extra. This setting determines how many clusters will be extra
  64. * allocated whenever this is required.
  65. * Take in carefull consideration how large your clustersize is, putting 10 here
  66. * with a clustersize of 32kb means you might waste 320 kb.
  67. * The first option is for preallocating files, the other is used when enlarging
  68. * a directory to accomodate more files
  69. */
  70. #define CLUSTER_PREALLOC_FILE 5
  71. #define CLUSTER_PREALLOC_DIRECTORY 2
  72. /* Endianess configuration
  73. -----------------------
  74. * Here you can configure wheter your architecture is little or big endian. This
  75. * is important since all FAT structures are stored in intel little endian
  76. * order. So if you have a big endian system the library has to convert all
  77. * figures to big endian in order to work.
  78. */
  79. /*#define HOST_BIG_ENDIAN*/
  80. #define HOST_LITTLE_ENDIAN
  81. /* Date and Time support
  82. ---------------------
  83. * Here you can enable or disable date and time support. If you enable
  84. * it you will have to create 6 functions, that are described in the
  85. * EFSL manual. If the functions are not present when linking your
  86. * program with the library you will get unresolved dependencies.
  87. */
  88. /* #define DATE_TIME_SUPPORT */
  89. /* Error reporting support
  90. -----------------------
  91. * When you receive an error in userland, it usually only gives limited
  92. * information (most likely, fail or success). If error detection and
  93. * reporting is important for you, you can enable more detailed error
  94. * reporting here. This is optional, the costs are 1 byte per object,
  95. * and a small increase in code size.
  96. * You can enable error recording for all object, or you can select the
  97. * object manually.
  98. * For full error reporting use FULL_ERROR_SUPPORT
  99. * For only the base-core of the library use BASE_ERROR_SUPPORT
  100. * For IO/Man use ERRSUP_IOMAN
  101. * For Disc use ERRSUP_IOMAN
  102. * For Part use ERRSUP_PARTITION
  103. * For Fs use ERRSUP_FILESYSTEM
  104. * For File use ERRSUP_FILE
  105. */
  106. #define FULL_ERROR_SUPPORT
  107. /*#define BASE_ERROR_SUPPORT*/
  108. /* Debugging configuration
  109. -----------------------
  110. * Here you can configure the debugging behaviour. Debugging is different
  111. * on every platform (see debug.h for more information).
  112. * If your hardware has no means of output (printf) dont define any anything,
  113. * and nothing will happen. For real world use debugging should be turned off.
  114. */
  115. /*#define DEBUG*/
  116. /*#define DO_FUNC_DEBUG*/
  117. /* List options
  118. ------------
  119. * In this section you can configure what kind of data you will get from
  120. * directory listing requests. Please refer to the documentation for
  121. * more information
  122. */
  123. #define LIST_MAXLENFILENAME 12
  124. #endif