mirror of
https://github.com/IoTManagerProject/IoTManager.git
synced 2026-03-26 22:22:16 +03:00
esp32 рабочая версия с little fs файловой системой
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
//Версия прошивки
|
||||
#define FIRMWARE_VERSION 421
|
||||
#define FIRMWARE_VERSION 422
|
||||
|
||||
#ifdef esp8266_4mb
|
||||
#define FIRMWARE_NAME "esp8266_4mb"
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
#include <LITTLEFS.h>
|
||||
#define FileFS LittleFS
|
||||
#define FS_NAME "LittleFS_32"
|
||||
#define CONFIG_LITTLEFS_SPIFFS_COMPAT 1
|
||||
#else
|
||||
#include <SPIFFS.h>
|
||||
extern FS* filesystem;
|
||||
@@ -21,6 +22,9 @@ using littlefs_impl::LittleFSConfig;
|
||||
extern FS* filesystem;
|
||||
#define FileFS LittleFS
|
||||
#define FS_NAME "LittleFS_8266"
|
||||
#define FILE_READ "r"
|
||||
#define FILE_WRITE "w"
|
||||
#define FILE_APPEND "a"
|
||||
#else
|
||||
extern FS* filesystem;
|
||||
#define FileFS SPIFFS
|
||||
|
||||
@@ -13,5 +13,6 @@ extern const String getTimeLocal_hhmmss();
|
||||
extern const String getDateTimeDotFormated();
|
||||
extern const String getDateDotFormated();
|
||||
extern unsigned long strDateToUnix(String date);
|
||||
const String getDateTimeDotFormatedFromUnix(unsigned long unixTime);
|
||||
extern const String getDateTimeDotFormatedFromUnix(unsigned long unixTime);
|
||||
extern unsigned long gmtTimeToLocal(unsigned long gmtTimestamp);
|
||||
extern const String getDateDotFormatedFromUnix(unsigned long unixTime);
|
||||
|
||||
@@ -6,6 +6,7 @@ extern void writeFileUint8tByFrames(const String& filename, uint8_t*& big_buf, s
|
||||
extern void writeFileUint8tByByte(const String& filename, uint8_t*& payload, size_t length, size_t headerLenth);
|
||||
extern File seekFile(const String& filename, size_t position = 0);
|
||||
extern const String writeFile(const String& filename, const String& str);
|
||||
const String writeEmptyFile(const String& filename);
|
||||
extern const String addFileLn(const String& filename, const String& str);
|
||||
extern const String readFile(const String& filename, size_t max_size);
|
||||
extern const String filepath(const String& filename);
|
||||
@@ -15,7 +16,7 @@ void removeFile(const String& filename);
|
||||
void removeDirectory(const String& dir);
|
||||
void cleanDirectory(String path);
|
||||
void cleanLogs();
|
||||
void saveDataDB(String id, String data);
|
||||
String saveDataDB(String id, String data);
|
||||
String readDataDB(String id);
|
||||
extern void onFlashWrite();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user