mirror of
https://github.com/IoTManagerProject/IoTManager.git
synced 2026-03-27 14:42:18 +03:00
memory remain
This commit is contained in:
@@ -10,27 +10,15 @@
|
||||
#include <LittleFS.h>
|
||||
extern FS LittleFS;
|
||||
using littlefs_impl::LittleFSConfig;
|
||||
extern FS *filesystem;
|
||||
extern FS* filesystem;
|
||||
#define FileFS LittleFS
|
||||
#define FS_NAME "LittleFS"
|
||||
#else
|
||||
extern FS *filesystem;
|
||||
extern FS* filesystem;
|
||||
#define FileFS SPIFFS
|
||||
#define FS_NAME "SPIFFS"
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Информация о ФС
|
||||
size_t totalBytes; // всего
|
||||
size_t usedBytes; // использовано
|
||||
size_t maxOpenFiles; // лимит на открые файлы
|
||||
size_t maxPathLength; // лимит на полное пути + имя файла
|
||||
|
||||
FSInfo buf;
|
||||
getInfo(buf);
|
||||
size_t freeBytes = buf.totalBytes - buf.usedBytes;
|
||||
float freePer = buf.usedBytes / buf.totalBytes * 100;
|
||||
*/
|
||||
bool getInfo(FSInfo& info) {
|
||||
return FileFS.info(info);
|
||||
}
|
||||
extern void getFSInfo();
|
||||
extern bool getInfo(FSInfo& info);
|
||||
Reference in New Issue
Block a user