-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathFileSystemType.h
More file actions
executable file
·51 lines (44 loc) · 1.15 KB
/
FileSystemType.h
File metadata and controls
executable file
·51 lines (44 loc) · 1.15 KB
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
45
46
47
48
49
50
51
#pragma once
#ifdef HAS_RNS
// CBA This header file was required to break-out defined and includes here that could
// not be include in FileSystem.h due to conlficts with SPIFFS in Console.h
#include "Boards.h"
#define FS_TYPE_SPIFFS 0
#define FS_TYPE_LITTLEFS 1
#define FS_TYPE_INTERNALFS 2
#define FS_TYPE_FLASHFS 3
#if MCU_VARIANT == MCU_ESP32
#if defined(USE_FLASHFS)
#define FS_TYPE FS_TYPE_FLASHFS
#else
//#define FS_TYPE FS_TYPE_SPIFFS
#define FS_TYPE FS_TYPE_LITTLEFS
#endif
#elif MCU_VARIANT == MCU_NRF52
#if defined(USE_FLASHFS)
#define FS_TYPE FS_TYPE_FLASHFS
#else
#define FS_TYPE FS_TYPE_INTERNALFS
#endif
#else
#define FS_TYPE FS_TYPE_SPIFFS
#endif
#if FS_TYPE == FS_TYPE_SPIFFS
#include <SPIFFS.h>
#define FS SPIFFS
#elif FS_TYPE == FS_TYPE_LITTLEFS
#include <LittleFS.h>
#define FS LittleFS
#elif FS_TYPE == FS_TYPE_INTERNALFS
#include <InternalFileSystem.h>
#define FS InternalFS
using namespace Adafruit_LittleFS_Namespace;
#elif FS_TYPE == FS_TYPE_FLASHFS
#include <Cached_SPIFlash.h>
#include <FlashFileSystem.h>
#define FS FlashFS
using namespace Adafruit_LittleFS_Namespace;
#else
#error "FileSystem type not specified"
#endif
#endif