Преглед на файлове

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

main
PaulStoffregen преди 4 години
родител
ревизия
7144a9aecc
променени са 2 файла, в които са добавени 9 реда и са изтрити 0 реда
  1. +6
    -0
      src/SdFat.h
  2. +3
    -0
      src/SdFatConfig.h

+ 6
- 0
src/SdFat.h Целия файл

@@ -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 Целия файл

@@ -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

Loading…
Отказ
Запис