forked from sadken/TZXDuino
-
Notifications
You must be signed in to change notification settings - Fork 0
/
SdCardSetup.h
44 lines (40 loc) · 1019 Bytes
/
SdCardSetup.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
/**
* File types for SdFat, File, SdFile, SdBaseFile, fstream,
* ifstream, and ofstream.
*
* Set SD_FILE_TYPE to:
*
* 1 for FAT16/FAT32, 2 for exFAT, 3 for FAT16/FAT32 and exFAT.
*/
#include "SdFat.h"
#include "userconfig.h"
#ifndef SD_INCLUDE_EXFAT_SUPPORT
#if defined(__AVR__) && FLASHEND < 0X8000
// FAT16/FAT32 only, for low-memory boards
#define SD_INCLUDE_EXFAT_SUPPORT 0
#else // defined(__AVR__) && FLASHEND < 0X8000
#define SD_INCLUDE_EXFAT_SUPPORT 1
#endif // defined(__AVR__) && FLASHEND < 0X8000
#endif
#ifndef SD_FAT_TYPE
#if SD_INCLUDE_EXFAT_SUPPORT == 0
#define SD_FAT_TYPE 1
#else
#define SD_FAT_TYPE 3
#endif
#endif
#if SD_FAT_TYPE == 0
typedef SdFat SDTYPE;
typedef File FILETYPE;
#elif SD_FAT_TYPE == 1
typedef SdFat32 SDTYPE;
typedef File32 FILETYPE;
#elif SD_FAT_TYPE == 2
typedef SdExFat SDTYPE;
typedef ExFile FILETYPE;
#elif SD_FAT_TYPE == 3
typedef SdFs SDTYPE;
typedef FsFile FILETYPE;
#else // SD_FAT_TYPE
#error invalid SD_FAT_TYPE
#endif // SD_FAT_TYPE