2021-12-22 14:49:25 +01:00
|
|
|
#pragma once
|
|
|
|
|
#include "Global.h"
|
2021-12-23 17:48:01 +01:00
|
|
|
#ifdef ESP32
|
2022-09-15 14:02:24 +02:00
|
|
|
#if USE_LITTLEFS
|
|
|
|
|
#include <LITTLEFS.h>
|
|
|
|
|
#define FileFS LittleFS
|
|
|
|
|
#define FS_NAME "LittleFS_32"
|
2022-09-16 01:52:04 +02:00
|
|
|
#define CONFIG_LITTLEFS_SPIFFS_COMPAT 1
|
2022-09-15 14:02:24 +02:00
|
|
|
#else
|
2021-12-23 17:48:01 +01:00
|
|
|
#include <SPIFFS.h>
|
|
|
|
|
extern FS* filesystem;
|
|
|
|
|
#define FileFS SPIFFS
|
2022-09-15 14:02:24 +02:00
|
|
|
#define FS_NAME "SPIFFS_32"
|
|
|
|
|
#endif
|
2021-12-23 17:48:01 +01:00
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#ifdef ESP8266
|
|
|
|
|
#if USE_LITTLEFS
|
|
|
|
|
#include "LittleFS.h"
|
2021-12-22 14:49:25 +01:00
|
|
|
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"
|
2022-09-16 01:52:04 +02:00
|
|
|
#define FILE_READ "r"
|
|
|
|
|
#define FILE_WRITE "w"
|
|
|
|
|
#define FILE_APPEND "a"
|
2021-12-23 17:48:01 +01:00
|
|
|
#else
|
|
|
|
|
extern FS* filesystem;
|
|
|
|
|
#define FileFS SPIFFS
|
2022-09-15 14:02:24 +02:00
|
|
|
#define FS_NAME "SPIFFS_8266"
|
2021-12-23 17:48:01 +01:00
|
|
|
#endif
|
|
|
|
|
#endif
|
2021-12-22 14:49:25 +01:00
|
|
|
|
|
|
|
|
extern bool fileSystemInit();
|
2021-12-22 23:47:35 +01:00
|
|
|
extern void globalVarsSync();
|
2021-12-23 00:33:45 +01:00
|
|
|
|
2022-02-28 01:10:14 +01:00
|
|
|
extern String getParamsJson();
|
|
|
|
|
|
2022-02-12 03:09:57 +01:00
|
|
|
extern void syncSettingsFlashJson();
|
2022-02-02 23:39:41 +01:00
|
|
|
|
|
|
|
|
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();
|
2022-09-19 01:41:15 +02:00
|
|
|
extern const String getWebVersion();
|