Files
IoTManager/include/EspFileSystem.h

49 lines
1.0 KiB
C
Raw Normal View History

#pragma once
#include "Global.h"
#ifdef ESP32
2022-09-15 14:02:24 +02:00
#if USE_LITTLEFS
#include <LITTLEFS.h>
#define FileFS LittleFS
#define FS_NAME "LittleFS_32"
#define CONFIG_LITTLEFS_SPIFFS_COMPAT 1
2022-09-15 14:02:24 +02:00
#else
#include <SPIFFS.h>
extern FS* filesystem;
#define FileFS SPIFFS
2022-09-15 14:02:24 +02:00
#define FS_NAME "SPIFFS_32"
#endif
#endif
#ifdef ESP8266
#if USE_LITTLEFS
#include "LittleFS.h"
extern FS LittleFS;
using littlefs_impl::LittleFSConfig;
extern FS* filesystem;
#define FileFS LittleFS
2022-09-15 14:02:24 +02:00
#define FS_NAME "LittleFS_8266"
#define FILE_READ "r"
#define FILE_WRITE "w"
#define FILE_APPEND "a"
#else
extern FS* filesystem;
#define FileFS SPIFFS
2022-09-15 14:02:24 +02:00
#define FS_NAME "SPIFFS_8266"
#endif
#endif
extern bool fileSystemInit();
extern void globalVarsSync();
extern String getParamsJson();
2022-02-12 03:09:57 +01:00
extern void syncSettingsFlashJson();
extern const String getChipId();
extern void setChipId();
extern const String getUniqueId(const char* name);
extern uint32_t ESP_getChipId(void);
extern uint32_t ESP_getFlashChipId(void);
extern const String getMacAddress();
extern const String getWebVersion();