mirror of
https://github.com/IoTManagerProject/IoTManager.git
synced 2026-03-26 22:22:16 +03:00
запуск little fs на esp32
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
//Версия прошивки
|
||||
#define FIRMWARE_VERSION 420
|
||||
#define FIRMWARE_VERSION 421
|
||||
|
||||
#ifdef esp8266_4mb
|
||||
#define FIRMWARE_NAME "esp8266_4mb"
|
||||
|
||||
@@ -1,11 +1,16 @@
|
||||
#pragma once
|
||||
#include "Global.h"
|
||||
|
||||
#ifdef ESP32
|
||||
#if USE_LITTLEFS
|
||||
#include <LITTLEFS.h>
|
||||
#define FileFS LittleFS
|
||||
#define FS_NAME "LittleFS_32"
|
||||
#else
|
||||
#include <SPIFFS.h>
|
||||
extern FS* filesystem;
|
||||
#define FileFS SPIFFS
|
||||
#define FS_NAME "SPIFFS"
|
||||
#define FS_NAME "SPIFFS_32"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef ESP8266
|
||||
@@ -15,11 +20,11 @@ extern FS LittleFS;
|
||||
using littlefs_impl::LittleFSConfig;
|
||||
extern FS* filesystem;
|
||||
#define FileFS LittleFS
|
||||
#define FS_NAME "LittleFS"
|
||||
#define FS_NAME "LittleFS_8266"
|
||||
#else
|
||||
extern FS* filesystem;
|
||||
#define FileFS SPIFFS
|
||||
#define FS_NAME "SPIFFS"
|
||||
#define FS_NAME "SPIFFS_8266"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
@@ -14,8 +14,7 @@ extern size_t countLines(const String filename);
|
||||
void removeFile(const String& filename);
|
||||
void removeDirectory(const String& dir);
|
||||
void cleanDirectory(String path);
|
||||
void cleanLogs1();
|
||||
void cleanLogs2();
|
||||
void cleanLogs();
|
||||
void saveDataDB(String id, String data);
|
||||
String readDataDB(String id);
|
||||
extern void onFlashWrite();
|
||||
@@ -23,7 +22,13 @@ extern void onFlashWrite();
|
||||
String getFilesList8266(String& directory);
|
||||
String getFilesList32(String& directory);
|
||||
String getFilesList(String& directory);
|
||||
extern void getFSInfo();
|
||||
|
||||
struct IoTFSInfo {
|
||||
size_t totalBytes;
|
||||
float freePer;
|
||||
};
|
||||
|
||||
extern IoTFSInfo getFSInfo();
|
||||
#ifdef ESP8266
|
||||
extern bool getInfo(FSInfo& info);
|
||||
#endif
|
||||
Reference in New Issue
Block a user