|
38 | 38 | * Set INCLUDE_SDIOS nonzero to include sdios.h in SdFat.h.
|
39 | 39 | * sdios.h provides C++ style IO Streams.
|
40 | 40 | */
|
41 |
| -#define INCLUDE_SDIOS 1 |
| 41 | +#ifndef INCLUDE_SDIOS |
| 42 | + #define INCLUDE_SDIOS 0 |
| 43 | +#endif |
42 | 44 |
|
43 | 45 | //------------------------------------------------------------------------------
|
44 | 46 | /**
|
|
59 | 61 | * * (asterisk)
|
60 | 62 | *
|
61 | 63 | */
|
62 |
| -#define USE_LONG_FILE_NAMES 1 |
| 64 | +#ifndef USE_LONG_FILE_NAMES |
| 65 | + #define USE_LONG_FILE_NAMES 1 |
| 66 | +#endif |
63 | 67 | //------------------------------------------------------------------------------
|
64 | 68 | /**
|
65 | 69 | * If the symbol ENABLE_EXTENDED_TRANSFER_CLASS is nonzero, the class SdFatEX
|
|
69 | 73 | * These classes used extended multi-block SD I/O for better performance.
|
70 | 74 | * the SPI bus may not be shared with other devices in this mode.
|
71 | 75 | */
|
72 |
| -#define ENABLE_EXTENDED_TRANSFER_CLASS 0 |
| 76 | +#ifndef ENABLE_EXTENDED_TRANSFER_CLASS |
| 77 | + #define ENABLE_EXTENDED_TRANSFER_CLASS 0 |
| 78 | +#endif |
73 | 79 | //------------------------------------------------------------------------------
|
74 | 80 | /**
|
75 | 81 | * If the symbol USE_STANDARD_SPI_LIBRARY is zero, an optimized custom SPI
|
|
78 | 84 | * USE_STANDARD_SPI_LIBRARY is two, the SPI port can be selected with the
|
79 | 85 | * constructors SdFat(SPIClass* spiPort) and SdFatEX(SPIClass* spiPort).
|
80 | 86 | */
|
81 |
| -#define USE_STANDARD_SPI_LIBRARY 0 |
| 87 | +#ifndef USE_STANDARD_SPI_LIBRARY |
| 88 | + #define USE_STANDARD_SPI_LIBRARY 0 |
| 89 | +#endif |
82 | 90 | //------------------------------------------------------------------------------
|
83 | 91 | /**
|
84 | 92 | * If the symbol ENABLE_SOFTWARE_SPI_CLASS is nonzero, the class SdFatSoftSpi
|
85 | 93 | * will be defined. If ENABLE_EXTENDED_TRANSFER_CLASS is also nonzero,
|
86 | 94 | * the class SdFatSoftSpiEX will be defined.
|
87 | 95 | */
|
88 |
| -#define ENABLE_SOFTWARE_SPI_CLASS 0 |
| 96 | +#ifndef ENABLE_SOFTWARE_SPI_CLASS |
| 97 | + #define ENABLE_SOFTWARE_SPI_CLASS 0 |
| 98 | +#endif |
89 | 99 | //------------------------------------------------------------------------------
|
90 | 100 | /** If the symbol USE_FCNTL_H is nonzero, open flags for access modes O_RDONLY,
|
91 | 101 | * O_WRONLY, O_RDWR and the open modifiers O_APPEND, O_CREAT, O_EXCL, O_SYNC
|
|
112 | 122 | * Some cards will not sleep in low power mode unless CHECK_FLASH_PROGRAMMING
|
113 | 123 | * is non-zero.
|
114 | 124 | */
|
115 |
| -#define CHECK_FLASH_PROGRAMMING 1 |
| 125 | +#ifndef CHECK_FLASH_PROGRAMMING |
| 126 | + #define CHECK_FLASH_PROGRAMMING 1 |
| 127 | +#endif |
116 | 128 | //------------------------------------------------------------------------------
|
117 | 129 | /**
|
118 | 130 | * Set MAINTAIN_FREE_CLUSTER_COUNT nonzero to keep the count of free clusters
|
119 | 131 | * updated. This will increase the speed of the freeClusterCount() call
|
120 | 132 | * after the first call. Extra flash will be required.
|
121 | 133 | */
|
122 |
| -#define MAINTAIN_FREE_CLUSTER_COUNT 0 |
| 134 | +#ifndef MAINTAIN_FREE_CLUSTER_COUNT |
| 135 | + #define MAINTAIN_FREE_CLUSTER_COUNT 0 |
| 136 | +#endif |
123 | 137 | //------------------------------------------------------------------------------
|
124 | 138 | /**
|
125 | 139 | * To enable SD card CRC checking set USE_SD_CRC nonzero.
|
|
130 | 144 | * Set USE_SD_CRC to 2 to used a larger table driven CRC-CCITT function. This
|
131 | 145 | * function is faster for AVR but may be slower for ARM and other processors.
|
132 | 146 | */
|
133 |
| -#define USE_SD_CRC 0 |
| 147 | +#ifndef USE_SD_CRC |
| 148 | + #define USE_SD_CRC 0 |
| 149 | +#endif |
134 | 150 | //------------------------------------------------------------------------------
|
135 | 151 | /**
|
136 | 152 | * Handle Watchdog Timer for WiFi modules.
|
|
156 | 172 | *
|
157 | 173 | * Causes use of lots of heap in ARM.
|
158 | 174 | */
|
159 |
| -#define DESTRUCTOR_CLOSES_FILE 0 |
| 175 | +#ifndef DESTRUCTOR_CLOSES_FILE |
| 176 | + #define DESTRUCTOR_CLOSES_FILE 0 |
| 177 | +#endif |
160 | 178 | //------------------------------------------------------------------------------
|
161 | 179 | /**
|
162 | 180 | * Call flush for endl if ENDL_CALLS_FLUSH is nonzero
|
|
175 | 193 | * If ENDL_CALLS_FLUSH is zero, you must call flush and/or close to force
|
176 | 194 | * all data to be written to the SD.
|
177 | 195 | */
|
178 |
| -#define ENDL_CALLS_FLUSH 0 |
| 196 | +#ifndef ENDL_CALLS_FLUSH |
| 197 | + #define ENDL_CALLS_FLUSH 0 |
| 198 | +#endif |
179 | 199 | //------------------------------------------------------------------------------
|
180 | 200 | /**
|
181 | 201 | * Set USE_SEPARATE_FAT_CACHE nonzero to use a second 512 byte cache
|
|
0 commit comments