Przeglądaj źródła

Default for ARM and avoid "File" conflict with FS.h

main
PaulStoffregen 4 lat temu
rodzic
commit
7144a9aecc
2 zmienionych plików z 9 dodań i 0 usunięć
  1. +6
    -0
      src/SdFat.h
  2. +3
    -0
      src/SdFatConfig.h

+ 6
- 0
src/SdFat.h Wyświetl plik

@@ -397,16 +397,22 @@ class SdFs : public SdBase<FsVolume> {
/** Select type for SdFat. */
typedef SdFat32 SdFat;
/** Select type for File. */
#if !defined(__has_include) || !__has_include(<FS.h>)
typedef File32 File;
#endif
/** Select type for SdBaseFile. */
typedef FatFile SdBaseFile;
#elif SDFAT_FILE_TYPE == 2
typedef SdExFat SdFat;
#if !defined(__has_include) || !__has_include(<FS.h>)
typedef ExFile File;
#endif
typedef ExFatFile SdBaseFile;
#elif SDFAT_FILE_TYPE == 3
typedef SdFs SdFat;
#if !defined(__has_include) || !__has_include(<FS.h>)
typedef FsFile File;
#endif
typedef FsBaseFile SdBaseFile;
#else // SDFAT_FILE_TYPE
#error Invalid SDFAT_FILE_TYPE

+ 3
- 0
src/SdFatConfig.h Wyświetl plik

@@ -73,6 +73,9 @@
#if defined(__AVR__) && FLASHEND < 0X8000
// 32K AVR boards.
#define SDFAT_FILE_TYPE 1
#elif defined(__arm__)
// ARM boards usually have plenty of memory
#define SDFAT_FILE_TYPE 3
#else // defined(__AVR__) && FLASHEND < 0X8000
// All other boards.
#define SDFAT_FILE_TYPE 1

Ładowanie…
Anuluj
Zapisz