Prepare for LittleFS

This commit is contained in:
fvanroie 2020-11-14 14:02:35 +01:00
parent 88ab7b9bfb
commit 68a38d0b38
12 changed files with 159 additions and 136 deletions

View File

@ -42,7 +42,15 @@
#define HASP_HAS_FILESYSTEM (ARDUINO_ARCH_ESP32 > 0 || ARDUINO_ARCH_ESP8266 > 0)
#ifndef HASP_USE_SPIFFS
#ifndef HASP_USE_LITTLEFS
#define HASP_USE_SPIFFS (HASP_HAS_FILESYSTEM)
#else
#define HASP_USE_SPIFFS (HASP_USE_LITTLEFS <= 0)
#endif
#endif
#ifndef HASP_USE_LITTLEFS
#define HASP_USE_LITTLEFS (HASP_USE_SPIFFS <= 0)
#endif
#ifndef HASP_USE_EEPROM
@ -91,12 +99,22 @@
#include "SPIFFS.h"
#endif
#include <FS.h> // Include the SPIFFS library
#include "hasp_spiffs.h"
#include "hasp_filesystem.h"
#endif
#if HASP_USE_LITTLEFS > 0
#if defined(ARDUINO_ARCH_ESP32)
#include <LITTLEFS.h>
#endif
#include <FS.h> // Include the FS library
#include "hasp_filesystem.h"
#endif
#if HASP_USE_SPIFFS > 0 || HASP_USE_LITTLEFS > 0
#if defined(ARDUINO_ARCH_ESP32) || defined(ARDUINO_ARCH_ESP8266)
#include "lv_zifont.h"
#endif
#endif // SPIFFS
#endif
#if HASP_USE_EEPROM > 0
#include "hasp_eeprom.h"
@ -110,13 +128,13 @@
#if defined(ARDUINO_ARCH_ESP32)
#include <ETH.h>
#define ETH_ADDR 0
#define ETH_POWER_PIN -1
#define ETH_MDC_PIN 23
#define ETH_MDIO_PIN 18
#define NRST 5
#define ETH_TYPE ETH_PHY_LAN8720
#define ETH_CLKMODE ETH_CLOCK_GPIO17_OUT
#define ETH_ADDR 0
#define ETH_POWER_PIN -1
#define ETH_MDC_PIN 23
#define ETH_MDIO_PIN 18
#define NRST 5
#define ETH_TYPE ETH_PHY_LAN8720
#define ETH_CLKMODE ETH_CLOCK_GPIO17_OUT
#include "hasp_ethernet_esp32.h"
#warning Using ESP32 Ethernet LAN8720
@ -142,6 +160,10 @@
#include "hasp_mqtt.h"
#endif
#if HASP_USE_GPIO > 0
#include "hasp_gpio.h"
#endif
#if HASP_USE_HTTP > 0
#include "hasp_http.h"
#endif

View File

@ -95,6 +95,7 @@ esp8266_flags=
-D HASP_USE_SYSLOG=1
-D HASP_USE_TELNET=1
-D HASP_USE_SPIFFS=1
-D HASP_USE_LITTLEFS=0
-D HASP_USE_EEPROM=1
-D HASP_USE_GPIO=1
-D HASP_USE_ETHERNET=0
@ -110,6 +111,7 @@ esp32_flags=
-D HASP_USE_SYSLOG=1
-D HASP_USE_TELNET=1
-D HASP_USE_SPIFFS=1
-D HASP_USE_LITTLEFS=0
-D HASP_USE_EEPROM=1
-D HASP_USE_GPIO=1

View File

@ -15,6 +15,7 @@
#include "hasp_debug.h"
#include "hasp_config.h"
#include "hasp_dispatch.h"
//#include "hasp_filesystem.h" included in hasp_conf.h
#include "hasp_wifi.h"
#include "hasp_gui.h"
#include "hasp_tft.h"
@ -404,7 +405,7 @@ void haspSetup()
/* ********** Font Initializations ********** */
#if HASP_USE_SPIFFS > 0
#if HASP_USE_SPIFFS > 0 || HASP_USE_LITTLEFS > 0
#if defined(ARDUINO_ARCH_ESP32) || defined(ARDUINO_ARCH_ESP8266)
lv_zifont_init();
@ -1006,22 +1007,22 @@ void haspNewObject(const JsonObject & config, uint8_t & saved_page_id)
void haspLoadPage(const char * pages)
{
#if HASP_USE_SPIFFS > 0
#if HASP_USE_SPIFFS > 0 || HASP_USE_LITTLEFS > 0
if(pages[0] == '\0') return;
if(!SPIFFS.begin()) {
if(!filesystemSetup()) {
Log.error(TAG_HASP, F("FS not mounted. Failed to load %s"), pages);
return;
}
if(!SPIFFS.exists(pages)) {
if(!HASP_FS.exists(pages)) {
Log.error(TAG_HASP, F("Non existing file %s"), pages);
return;
}
Log.notice(TAG_HASP, F("Loading file %s"), pages);
File file = SPIFFS.open(pages, "r");
File file = HASP_FS.open(pages, "r");
dispatchParseJsonl(file);
file.close();

View File

@ -3,24 +3,20 @@
#include "ArduinoJson.h"
#include "StreamUtils.h"
#include "hasp_conf.h"
#include "hasp_config.h"
#include "hasp_debug.h"
#include "hasp_gui.h"
#include "hasp_ota.h"
#include "hasp_spiffs.h"
#include "hasp_telnet.h"
#include "hasp_gpio.h"
//#include "hasp_ota.h" included in conf
//#include "hasp_filesystem.h" included in conf
//#include "hasp_telnet.h" included in conf
//#include "hasp_gpio.h" included in conf
//#include "hasp_eeprom.h"
#include "hasp.h"
#include "hasp_conf.h"
#if HASP_USE_SPIFFS > 0
#include <FS.h> // Include the SPIFFS library
#if defined(ARDUINO_ARCH_ESP32)
#include "SPIFFS.h"
#endif
#endif
#if HASP_USE_EEPROM > 0
#include "EEPROM.h"
#endif
@ -74,13 +70,13 @@ void configStartDebug(bool setupdebug, String & configFile)
{
if(setupdebug) {
debugStart(); // Debug started, now we can use it; HASP header sent
#if HASP_USE_SPIFFS > 0
Log.notice(TAG_CONF, F("FILE: [SUCCESS] SPI flash FS mounted"));
spiffsInfo();
spiffsList();
#if HASP_USE_SPIFFS > 0 || HASP_USE_LITTLEFS > 0
Log.notice(TAG_CONF, F("[SUCCESS] SPI flash FS mounted"));
filesystemInfo();
filesystemList();
#endif
}
#if HASP_USE_SPIFFS > 0
#if HASP_USE_SPIFFS > 0 || HASP_USE_LITTLEFS > 0
Log.notice(TAG_CONF, F("Loading %s"), configFile.c_str());
#else
Log.notice(TAG_CONF, F("reading EEPROM"));
@ -94,8 +90,8 @@ void configGetConfig(JsonDocument & settings, bool setupdebug = false)
configFile = String(FPSTR(HASP_CONFIG_FILE));
DeserializationError error;
#if HASP_USE_SPIFFS > 0
File file = SPIFFS.open(configFile, "r");
#if HASP_USE_SPIFFS > 0 || HASP_USE_LITTLEFS > 0
File file = HASP_FS.open(configFile, "r");
if(file) {
size_t size = file.size();
@ -143,14 +139,14 @@ void configGetConfig(JsonDocument & settings, bool setupdebug = false)
}
configStartDebug(setupdebug, configFile);
#if HASP_USE_SPIFFS > 0
#if HASP_USE_SPIFFS > 0 || HASP_USE_LITTLEFS > 0
Log.error(TAG_CONF, F("Failed to load %s"), configFile.c_str());
#endif
}
/*
void configBackupToEeprom()
{
#if HASP_USE_SPIFFS>0
#if HASP_USE_SPIFFS > 0 || HASP_USE_LITTLEFS > 0
String configFile((char *)0);
configFile.reserve(128);
configFile = String(FPSTR(HASP_CONFIG_FILE));
@ -159,7 +155,7 @@ void configBackupToEeprom()
uint8_t buffer[128];
size_t index = 0;
File file = SPIFFS.open(configFile, "r");
File file = HASP_FS.open(configFile, "r");
if(file) {
while(size_t count = file.read(buffer, sizeof(buffer)) > 0) {
@ -281,8 +277,8 @@ void configWriteConfig()
// changed |= otaGetConfig(settings[F("ota")].as<JsonObject>());
if(writefile) {
#if HASP_USE_SPIFFS > 0
File file = SPIFFS.open(configFile, "w");
#if HASP_USE_SPIFFS > 0 || HASP_USE_LITTLEFS > 0
File file = HASP_FS.open(configFile, "w");
if(file) {
Log.notice(TAG_CONF, F("Writing %s"), configFile.c_str());
size_t size = serializeJson(doc, file);
@ -344,8 +340,8 @@ void configSetup()
continue;
#endif
} else {
#if HASP_USE_SPIFFS > 0
if(!SPIFFS.begin()) {
#if HASP_USE_SPIFFS > 0 || HASP_USE_LITTLEFS > 0
if(!filesystemSetup()) {
Log.error(TAG_CONF, F("FILE: SPI flash init failed. Unable to mount FS: Using default settings..."));
return;
}
@ -454,8 +450,8 @@ bool configClear()
Log.error(TAG_CONF, F("Failed to clear to EEPROM"));
return false;
}
#elif HASP_USE_SPIFFS > 0
return SPIFFS.format();
#elif HASP_USE_SPIFFS > 0 || HASP_USE_LITTLEFS > 0
return HASP_FS.format();
#else
return false;
#endif

View File

@ -3,17 +3,16 @@
#include "StringStream.h"
#include "CharStream.h"
#include "hasp_conf.h"
#include "hasp_dispatch.h"
#include "hasp_config.h"
#include "hasp_debug.h"
#include "hasp_gpio.h"
#include "hasp_gui.h"
#include "hasp_oobe.h"
#include "hasp_hal.h"
#include "hasp.h"
#include "hasp_conf.h"
inline bool isON(const char * payload)
{
return strcasecmp_P(payload, PSTR("ON")) == 0;
@ -38,8 +37,8 @@ bool dispatch_factory_reset()
{
bool formated, erased = true;
#if HASP_USE_SPIFFS > 0
formated = SPIFFS.format();
#if HASP_USE_SPIFFS > 0 || HASP_USE_LITTLEFS > 0
formated = HASP_FS.format();
#endif
#if HASP_USE_EEPROM > 0
@ -209,12 +208,13 @@ void dispatchCommand(const char * topic, const char * payload)
#endif
} else if(!strcmp_P(topic, PSTR("mqtthost")) || !strcmp_P(topic, PSTR("mqttport")) ||
!strcmp_P(topic, PSTR("mqttuser")) || !strcmp_P(topic, PSTR("mqttpass"))) {
char item[5];
memset(item, 0, sizeof(item));
strncpy(item, topic + 4, 4);
!strcmp_P(topic, PSTR("mqttport")) || !strcmp_P(topic, PSTR("mqttuser")) ||
!strcmp_P(topic, PSTR("hostname"))) {
// char item[5];
// memset(item, 0, sizeof(item));
// strncpy(item, topic + 4, 4);
DynamicJsonDocument settings(45);
settings[item] = payload;
settings[topic + 4] = payload;
mqttSetConfig(settings.as<JsonObject>());
} else {

View File

@ -4,16 +4,9 @@
#include "hasp_conf.h"
#include "hasp_debug.h"
#include "hasp_spiffs.h"
#include "hasp_filesystem.h"
#if HASP_USE_SPIFFS > 0
#if defined(ARDUINO_ARCH_ESP32)
#include "SPIFFS.h"
#endif
#include <FS.h>
#endif
void spiffsInfo()
void filesystemInfo()
{ // Get all information of your SPIFFS
#if 0
FSInfo fs_info;
@ -68,7 +61,7 @@ void spiffsInfo()
#endif
}
void spiffsList()
void filesystemList()
{
#if HASP_USE_SPIFFS > 0
#if defined(ARDUINO_ARCH_ESP8266)
@ -76,42 +69,46 @@ void spiffsList()
#else
if(!SPIFFS.begin(true)) {
#endif
Log.error(TAG_FILE,F("Flash file system not mouted."));
Log.error(TAG_FILE, F("Flash file system not mouted."));
} else {
Log.verbose(TAG_FILE,F("Listing files on the internal flash:"));
Log.verbose(TAG_FILE, F("Listing files on the internal flash:"));
#if defined(ARDUINO_ARCH_ESP32)
File root = SPIFFS.open("/");
File file = root.openNextFile();
while(file) {
Log.verbose(TAG_FILE,F(" * %s (%u bytes)"), file.name(), (uint32_t)file.size());
Log.verbose(TAG_FILE, F(" * %s (%u bytes)"), file.name(), (uint32_t)file.size());
file = root.openNextFile();
}
#endif
#if defined(ARDUINO_ARCH_ESP8266)
Dir dir = SPIFFS.openDir("/");
while(dir.next()) {
Log.notice(TAG_FILE,F(" * %s (%u bytes)"), dir.fileName().c_str(), (uint32_t)dir.fileSize());
Log.notice(TAG_FILE, F(" * %s (%u bytes)"), dir.fileName().c_str(), (uint32_t)dir.fileSize());
}
#endif
}
#endif
}
void spiffsSetup()
bool filesystemSetup()
{
// no SPIFFS settings, as settings depend on SPIFFS
#if HASP_USE_SPIFFS > 0
#if HASP_USE_SPIFFS > 0 || HASP_USE_LITTLEFS > 0
#if defined(ARDUINO_ARCH_ESP8266)
if(!SPIFFS.begin()) {
if(!HASP_FS.begin()) {
#else
if(!SPIFFS.begin(true)) {
if(!HASP_FS.begin(true)) {
#endif
Log.error(TAG_FILE,F("SPI flash init failed. Unable to mount FS."));
Log.error(TAG_FILE, F("SPI flash init failed. Unable to mount FS."));
return false;
} else {
Log.verbose(TAG_FILE,F("SPI Flash FS mounted"));
Log.verbose(TAG_FILE, F("SPI Flash FS mounted"));
return true;
}
#endif
return false;
}

30
src/hasp_filesystem.h Normal file
View File

@ -0,0 +1,30 @@
#ifndef HASP_FILESYSTEM_H
#define HASP_FILESYSTEM_H
#include <Arduino.h>
bool filesystemSetup(void);
void filesystemList();
void filesystemInfo();
#if defined(ARDUINO_ARCH_ESP32)
#include <FS.h>
#include <ESP.h>
#if HASP_USE_SPIFFS > 0
#include "SPIFFS.h"
extern FS * HASP_FS = &SPIFFS;
#elif HASP_USE_LITTLEFS > 0
#include "LittleFS.h"
#define HASP_FS LITTLEFS
#endif
#elif defined(ARDUINO_ARCH_ESP8266)
#include <FS.h>
#include <ESP.h>
#define HASP_FS SPIFFS
#endif
#endif

View File

@ -21,6 +21,7 @@
//#include "lv_zifont.h"
#include "hasp_conf.h"
#include "hasp_debug.h"
#include "hasp_config.h"
#include "hasp_dispatch.h"
@ -39,16 +40,9 @@
#define TOUCH_DRIVER 99
#endif
#if HASP_USE_SPIFFS > 0
#if defined(ARDUINO_ARCH_ESP32)
#include "SPIFFS.h"
#endif
#include <FS.h> // Include the SPIFFS library
#endif
#define BACKLIGHT_CHANNEL 15 // pwm channel 0-15
#if HASP_USE_SPIFFS > 0
#if HASP_USE_SPIFFS > 0 || HASP_USE_LITTLEFS > 0
File pFileOut;
#endif
@ -609,8 +603,8 @@ void guiSetup()
lv_obj_t * mouse_layer = lv_disp_get_layer_sys(NULL); // default display
#if defined(ARDUINO_ARCH_ESP32)
LV_IMG_DECLARE(mouse_cursor_icon); /*Declare the image file.*/
cursor = lv_img_create(mouse_layer, NULL); /*Create an image object for the cursor */
LV_IMG_DECLARE(mouse_cursor_icon); /*Declare the image file.*/
cursor = lv_img_create(mouse_layer, NULL); /*Create an image object for the cursor */
lv_img_set_src(cursor, &mouse_cursor_icon); /*Set the image source*/
#else
cursor = lv_obj_create(mouse_layer, NULL); // show cursor object on every page
@ -822,7 +816,7 @@ bool guiSetConfig(const JsonObject & settings)
}
/* **************************** SCREENSHOTS ************************************** */
#if HASP_USE_SPIFFS > 0 || HASP_USE_HTTP > 0
#if HASP_USE_SPIFFS > 0 || HASP_USE_LITTLEFS > 0 || HASP_USE_HTTP > 0
static void guiSetBmpHeader(uint8_t * buffer_p, int32_t data)
{
@ -887,9 +881,9 @@ void gui_flush_not_complete()
{
Log.warning(TAG_GUI, F("GUI: Pixelbuffer not completely sent"));
}
#endif // HASP_USE_SPIFFS > 0 || HASP_USE_HTTP > 0
#endif // HASP_USE_SPIFFS > 0 || HASP_USE_LITTLEFS > 0 || HASP_USE_HTTP > 0
#if HASP_USE_SPIFFS > 0
#if HASP_USE_SPIFFS > 0 || HASP_USE_LITTLEFS > 0
/* Flush VDB bytes to a file */
static void gui_screenshot_to_file(lv_disp_drv_t * disp, const lv_area_t * area, lv_color_t * color_p)
{
@ -914,7 +908,7 @@ void guiTakeScreenshot(const char * pFileName)
uint8_t buffer[128];
gui_get_bitmap_header(buffer, sizeof(buffer));
pFileOut = SPIFFS.open(pFileName, "w");
pFileOut = HASP_FS.open(pFileName, "w");
if(pFileOut) {
size_t len = pFileOut.write(buffer, 122);

View File

@ -13,24 +13,11 @@
#include "hasp_gui.h"
#include "hasp_hal.h"
#include "hasp_gpio.h"
#include "hasp_debug.h"
#include "hasp_config.h"
#include "hasp_dispatch.h"
#include "hasp.h"
#include "hasp_conf.h"
#if defined(ARDUINO_ARCH_ESP32)
#include "SPIFFS.h"
#include <FS.h>
#include <FS.h>
#include <ESP.h>
#elif defined(ARDUINO_ARCH_ESP8266)
#include <FS.h>
#include <ESP.h>
#endif
#if HASP_USE_HTTP > 0
bool httpEnable = true;
@ -38,7 +25,6 @@ bool webServerStarted = false;
uint16_t httpPort = 80;
#if defined(ARDUINO_ARCH_ESP8266) || defined(ARDUINO_ARCH_ESP32)
FS * filesystem = &SPIFFS;
File fsUploadFile;
#endif
@ -249,8 +235,8 @@ void webHandleRoot()
httpMessage +=
F("<p><form method='get' action='firmware'><button type='submit'>Firmware Upgrade</button></form></p>");
#if HASP_USE_SPIFFS > 0
if(SPIFFS.exists(F("/edit.htm.gz"))) {
#if HASP_USE_SPIFFS > 0 || HASP_USE_LITTLEFS > 0
if(HASP_FS.exists(F("/edit.htm.gz"))) {
httpMessage += F("<p><form method='get' action='edit.htm.gz?path=/'><button type='submit'>File "
"Browser</button></form></p>");
}
@ -447,6 +433,15 @@ void webHandleInfo()
httpMessage += F("<br/><b>Memory Fragmentation: </b>");
httpMessage += String(halGetHeapFragmentation());
#if ARDUINO_ARCH_ESP32
if(psramFound()) {
httpMessage += F("<br/><b>Free PSRam: </b>");
httpMessage += halFormatBytes(ESP.getFreePsram());
httpMessage += F("<br/><b>PSRam Size: </b>");
httpMessage += halFormatBytes(ESP.getPsramSize());
}
#endif
/* LVGL Stats */
lv_mem_monitor_t mem_mon;
lv_mem_monitor(&mem_mon);
@ -696,7 +691,7 @@ void webHandleFirmwareUpdate()
}
#endif
#if HASP_USE_SPIFFS > 0
#if HASP_USE_SPIFFS > 0 || HASP_USE_LITTLEFS > 0
bool handleFileRead(String path)
{
if(!httpIsAuthenticated(F("fileread"))) return false;
@ -706,10 +701,10 @@ bool handleFileRead(String path)
path += F("index.htm");
}
String pathWithGz = path + F(".gz");
if(filesystem->exists(pathWithGz) || filesystem->exists(path)) {
if(filesystem->exists(pathWithGz)) path += F(".gz");
if(HASP_FS.exists(pathWithGz) || HASP_FS.exists(path)) {
if(HASP_FS.exists(pathWithGz)) path += F(".gz");
File file = filesystem->open(path, "r");
File file = HASP_FS.open(path, "r");
String contentType = getContentType(path);
if(path == F("/edit.htm.gz")) {
contentType = F("text/html");
@ -738,7 +733,7 @@ void handleFileUpload()
filename += upload->filename;
}
if(filename.length() < 32) {
fsUploadFile = filesystem->open(filename, "w");
fsUploadFile = HASP_FS.open(filename, "w");
Log.notice(TAG_HTTP, F("handleFileUpload Name: %s"), filename.c_str());
haspProgressMsg(fsUploadFile.name());
} else {
@ -782,10 +777,10 @@ void handleFileDelete()
if(path == "/") {
return webServer.send_P(500, mimetype, PSTR("BAD PATH"));
}
if(!filesystem->exists(path)) {
if(!HASP_FS.exists(path)) {
return webServer.send_P(404, mimetype, PSTR("FileNotFound"));
}
filesystem->remove(path);
HASP_FS.remove(path);
webServer.send_P(200, mimetype, PSTR(""));
// path.clear();
}
@ -802,10 +797,10 @@ void handleFileCreate()
if(path == "/") {
return webServer.send(500, PSTR("text/plain"), PSTR("BAD PATH"));
}
if(filesystem->exists(path)) {
if(HASP_FS.exists(path)) {
return webServer.send(500, PSTR("text/plain"), PSTR("FILE EXISTS"));
}
File file = filesystem->open(path, "w");
File file = HASP_FS.open(path, "w");
if(file) {
file.close();
} else {
@ -829,7 +824,7 @@ void handleFileList()
path.clear();
#if defined(ARDUINO_ARCH_ESP32)
File root = SPIFFS.open("/");
File root = HASP_FS.open("/", FILE_READ);
File file = root.openNextFile();
String output = "[";
@ -854,7 +849,7 @@ void handleFileList()
output += "]";
webServer.send(200, PSTR("text/json"), output);
#elif defined(ARDUINO_ARCH_ESP8266)
Dir dir = filesystem->openDir(path);
Dir dir = HASP_FS.openDir(path);
String output = "[";
while(dir.next()) {
File entry = dir.openFile("r");
@ -1489,7 +1484,7 @@ void webHandleHaspConfig()
httpMessage += F("<p><b>Default Font</b><select id='font' name='font'><option value=''>None</option>");
#if defined(ARDUINO_ARCH_ESP32)
File root = SPIFFS.open("/");
File root = HASP_FS.open("/");
File file = root.openNextFile();
while(file) {
@ -1500,7 +1495,7 @@ void webHandleHaspConfig()
file = root.openNextFile();
}
#elif defined(ARDUINO_ARCH_ESP8266)
Dir dir = filesystem->openDir("/");
Dir dir = HASP_FS.openDir("/");
while(dir.next()) {
File file = dir.openFile("r");
String filename = file.name();
@ -1540,7 +1535,7 @@ void webHandleHaspConfig()
////////////////////////////////////////////////////////////////////////////////////////////////////
void httpHandleNotFound()
{ // webServer 404
#if HASP_USE_SPIFFS > 0
#if HASP_USE_SPIFFS > 0 || HASP_USE_LITTLEFS > 0
if(handleFileRead(webServer.uri())) return;
#endif
@ -1730,7 +1725,7 @@ void httpSetup()
haspSetPage(pageid.toInt());
});
#if HASP_USE_SPIFFS > 0
#if HASP_USE_SPIFFS > 0 || HASP_USE_LITTLEFS > 0
webServer.on(F("/list"), HTTP_GET, handleFileList);
// load editor
webServer.on(F("/edit"), HTTP_GET, []() {

View File

@ -13,14 +13,6 @@
#include "hasp_config.h"
#include "hasp_debug.h"
#include "hasp_conf.h"
#if HASP_USE_MQTT > 0
#include "hasp_mqtt.h"
#endif
#if HASP_USE_MDNS > 0
#include "hasp_mdns.h"
#endif
uint8_t mdnsEnabled = true;
void mdnsSetup()

View File

@ -1,11 +0,0 @@
#ifndef HASP_SPIFFS_H
#define HASP_SPIFFS_H
#include <Arduino.h>
void spiffsSetup(void);
void spiffsList();
void spiffsInfo();
#endif

View File

@ -23,6 +23,11 @@ build_flags =
-D TFT_RST=-1 ; RST
-D TFT_BCKL=-1 ; None, configurable via web UI (e.g. 21)
-D TOUCH_CS=17 ; (can also be 22 or 16)
-D PIOENV=${PIOENV}
-D CONFIG_LITTLEFS_FOR_IDF_3_2
lib_deps =
LittleFS_esp32
lib_ignore =
GxTFT