mirror of
https://github.com/0015/ThatProject.git
synced 2026-01-12 09:17:42 +03:00
OTA Solution - Build your own OTA platform (2/2, ESP32 OTA Application)
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
#ifndef FileIO_H_
|
||||
#define FileIO_H_
|
||||
|
||||
#include "SPIFFS.h"
|
||||
#include "mbedtls/md.h"
|
||||
class FileIO {
|
||||
private:
|
||||
mbedtls_md_context_t ctx;
|
||||
|
||||
public:
|
||||
static constexpr const char* TEMP_BIN_FILE = "/download_firmware.bin";
|
||||
FileIO();
|
||||
void format();
|
||||
void listSPIFFS();
|
||||
fs::File openFile(String fileName, bool isReadOnly);
|
||||
void closeFile(fs::File file);
|
||||
void removeFile(String fileName);
|
||||
int getFileSize(String fileName);
|
||||
void mdContextInit();
|
||||
void mdContextUpdate(const unsigned char* buff, int c);
|
||||
String md5Result();
|
||||
};
|
||||
#endif
|
||||
Reference in New Issue
Block a user