Soldered SD Card Arduino Library
1.0.0
Easily read and write files to and form the SD card breakout! A fork of the original SDFat library by Bill Greiman.
Loading...
Searching...
No Matches
SdFatConfig.h
Go to the documentation of this file.
1
29
#ifndef SdFatConfig_h
30
#define SdFatConfig_h
31
#include <stdint.h>
32
#ifdef __AVR__
33
#include <avr/io.h>
34
#endif
// __AVR__
36
#define ENABLE_ARDUINO_FEATURES 1
38
#define ENABLE_ARDUINO_SERIAL 1
40
#define ENABLE_ARDUINO_STRING 1
41
//------------------------------------------------------------------------------
43
#define ENABLE_TEENSY_SDIO_MOD 1
44
//------------------------------------------------------------------------------
46
#define USE_BLOCK_DEVICE_INTERFACE 0
47
//------------------------------------------------------------------------------
48
#if ENABLE_ARDUINO_FEATURES
49
#include "Arduino.h"
50
#ifdef PLATFORM_ID
51
// Only defined if a Particle device.
52
#include "application.h"
53
#endif
// PLATFORM_ID
54
#endif
// ENABLE_ARDUINO_FEATURES
55
//------------------------------------------------------------------------------
60
#define INCLUDE_SDIOS 0
61
//------------------------------------------------------------------------------
66
#define USE_FAT_FILE_FLAG_CONTIGUOUS 1
67
//------------------------------------------------------------------------------
76
#if defined(__AVR__) && FLASHEND < 0X8000
77
// 32K AVR boards.
78
#define SDFAT_FILE_TYPE 1
79
#elif defined(__arm__)
80
// ARM boards usually have plenty of memory
81
#define SDFAT_FILE_TYPE 3
82
#else
// defined(__AVR__) && FLASHEND < 0X8000
83
// All other boards.
84
#define SDFAT_FILE_TYPE 1
85
#endif
// defined(__AVR__) && FLASHEND < 0X8000
86
//------------------------------------------------------------------------------
95
#if defined(__AVR__) && FLASHEND < 0X8000
96
// 32K AVR boards.
97
#define ENABLE_DEDICATED_SPI 1
98
#else
// defined(__AVR__) && FLASHEND < 0X8000
99
// All other boards.
100
#define ENABLE_DEDICATED_SPI 1
101
#endif
// defined(__AVR__) && FLASHEND < 0X8000
102
//------------------------------------------------------------------------------
115
#define SPI_DRIVER_SELECT 0
122
#define USE_SPI_ARRAY_TRANSFER 0
123
//------------------------------------------------------------------------------
137
#define SD_CHIP_SELECT_MODE 0
139
typedef
uint8_t
SdCsPin_t
;
140
//------------------------------------------------------------------------------
144
#define SD_MAX_INIT_RATE_KHZ 400
145
//------------------------------------------------------------------------------
166
#define USE_LONG_FILE_NAMES 1
167
//------------------------------------------------------------------------------
182
#define FS_DEFAULT_DATE FS_DATE(compileYear(), 1, 1)
184
#define FS_DEFAULT_TIME FS_TIME(0, 0, 0)
185
//------------------------------------------------------------------------------
194
#define CHECK_FLASH_PROGRAMMING 0
195
//------------------------------------------------------------------------------
201
#define MAINTAIN_FREE_CLUSTER_COUNT 0
202
//------------------------------------------------------------------------------
212
#define USE_SD_CRC 0
213
//------------------------------------------------------------------------------
218
#if defined(__AVR__)
219
// AVR fcntl.h does not define open flags.
220
#define USE_FCNTL_H 0
221
#elif defined(PLATFORM_ID)
222
// Particle boards - use fcntl.h.
223
#define USE_FCNTL_H 1
224
#elif defined(__arm__)
225
// ARM gcc defines open flags.
226
#define USE_FCNTL_H 1
227
#elif defined(ESP32)
228
#define USE_FCNTL_H 1
229
#else
// defined(__AVR__)
230
#define USE_FCNTL_H 0
231
#endif
// defined(__AVR__)
232
//------------------------------------------------------------------------------
239
#if defined(PLATFORM_ID) || defined(ESP8266)
240
// If Particle device or ESP8266 call yield.
241
#define WDT_YIELD_TIME_MILLIS 100
242
#else
// defined(PLATFORM_ID) || defined(ESP8266)
243
#define WDT_YIELD_TIME_MILLIS 0
244
#endif
// defined(PLATFORM_ID) || defined(ESP8266)
245
//------------------------------------------------------------------------------
250
#define FAT12_SUPPORT 0
251
//------------------------------------------------------------------------------
257
#define DESTRUCTOR_CLOSES_FILE 0
258
//------------------------------------------------------------------------------
276
#define ENDL_CALLS_FLUSH 0
277
//------------------------------------------------------------------------------
282
#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ && (defined(__AVR__) || defined(__ARM_FEATURE_UNALIGNED))
283
#define USE_SIMPLE_LITTLE_ENDIAN 1
284
#else
// __BYTE_ORDER_
285
#define USE_SIMPLE_LITTLE_ENDIAN 0
286
#endif
// __BYTE_ORDER_
287
//------------------------------------------------------------------------------
293
#ifdef __arm__
294
#define USE_SEPARATE_FAT_CACHE 1
295
#else
// __arm__
296
#define USE_SEPARATE_FAT_CACHE 0
297
#endif
// __arm__
298
//------------------------------------------------------------------------------
304
#ifdef __arm__
305
#define USE_EXFAT_BITMAP_CACHE 1
306
#else
// __arm__
307
#define USE_EXFAT_BITMAP_CACHE 0
308
#endif
// __arm__
309
//------------------------------------------------------------------------------
315
#if defined(RAMEND) && RAMEND < 3000
316
#define USE_MULTI_SECTOR_IO 0
317
#else
// RAMEND
318
#define USE_MULTI_SECTOR_IO 1
319
#endif
// RAMEND
320
//------------------------------------------------------------------------------
322
#if defined(__MK64FX512__) || defined(__MK66FX1M0__)
323
// Pseudo pin select for SDIO.
324
#ifndef BUILTIN_SDCARD
325
#define BUILTIN_SDCARD 254
326
#endif
// BUILTIN_SDCARD
327
// SPI for built-in card.
328
#ifndef SDCARD_SPI
329
#define SDCARD_SPI SPI1
330
#define SDCARD_MISO_PIN 59
331
#define SDCARD_MOSI_PIN 61
332
#define SDCARD_SCK_PIN 60
333
#define SDCARD_SS_PIN 62
334
#endif
// SDCARD_SPI
335
#define HAS_SDIO_CLASS 1
336
#endif
// defined(__MK64FX512__) || defined(__MK66FX1M0__)
337
#if defined(__IMXRT1062__)
338
#define HAS_SDIO_CLASS 1
339
#endif
// defined(__IMXRT1062__)
340
//------------------------------------------------------------------------------
344
#if defined(ARDUINO_ARCH_APOLLO3) || defined(__AVR__) || defined(ESP8266) || defined(ESP32) || defined(PLATFORM_ID) || \
345
defined(ARDUINO_SAM_DUE) || defined(__STM32F1__) || defined(__STM32F4__) || \
346
(defined(CORE_TEENSY) && defined(__arm__))
347
#define SD_HAS_CUSTOM_SPI 1
348
#else
// SD_HAS_CUSTOM_SPI
349
// Use standard SPI library.
350
#define SD_HAS_CUSTOM_SPI 0
351
#endif
// SD_HAS_CUSTOM_SPI
352
//------------------------------------------------------------------------------
353
#ifndef HAS_SDIO_CLASS
355
#define HAS_SDIO_CLASS 0
356
#endif
// HAS_SDIO_CLASS
357
#endif
// SdFatConfig_h
SdCsPin_t
uint8_t SdCsPin_t
Definition
SdFatConfig.h:139
src
SdFatConfig.h
Generated on Sun Aug 20 2023 21:57:41 for Soldered SD Card Arduino Library by
1.9.7. Dark theme by
Tilen Majerle
. All rights reserved. Copyright:
Soldered