From 744aef77eab9ba9afaca876139b02e0a0aa3bd3a Mon Sep 17 00:00:00 2001 From: lorol Date: Wed, 17 Jun 2020 13:12:16 -0400 Subject: [PATCH] LittleFS, on ESP32, too. see my library and tool plus the core conversation: https://github.com/lorol/arduino-esp32littlefs-plugin https://github.com/lorol/LITTLEFS https://github.com/espressif/arduino-esp32/issues/3765 #include #define SPIFFS LITTLEFS #include --- .../ESP_AsyncFSBrowser/ESP_AsyncFSBrowser.ino | 16 +++++++++++----- examples/SmartSwitch/SmartSwitch.ino | 9 +++++++-- 2 files changed, 18 insertions(+), 7 deletions(-) diff --git a/examples/ESP_AsyncFSBrowser/ESP_AsyncFSBrowser.ino b/examples/ESP_AsyncFSBrowser/ESP_AsyncFSBrowser.ino index 20564333..b12106b7 100644 --- a/examples/ESP_AsyncFSBrowser/ESP_AsyncFSBrowser.ino +++ b/examples/ESP_AsyncFSBrowser/ESP_AsyncFSBrowser.ino @@ -1,12 +1,18 @@ #define USE_LittleFS // possible only for ESP8266 for now #include + #ifdef ESP32 -#include -#include -#include -#include -#include + #include + #ifdef USE_LittleFS + #define SPIFFS LITTLEFS + #include + #else + #include + #endif + #include + #include + #include #elif defined(ESP8266) #ifdef USE_LittleFS #include diff --git a/examples/SmartSwitch/SmartSwitch.ino b/examples/SmartSwitch/SmartSwitch.ino index 4244e29d..a5e448c4 100644 --- a/examples/SmartSwitch/SmartSwitch.ino +++ b/examples/SmartSwitch/SmartSwitch.ino @@ -13,7 +13,7 @@ Multiple clients can be connected at same time, they see each other requests Use latest ESP core lib (from Github) */ -#define USE_LittleFS // possible only for ESP8266 for now +#define USE_LittleFS #define USE_WFM // to use ESPAsyncWiFiManager //#define DEL_WFM // delete Wifi credentials stored @@ -41,7 +41,12 @@ Use latest ESP core lib (from Github) #include #ifdef ESP32 #include - #include + #ifdef USE_LittleFS + #define SPIFFS LITTLEFS + #include + #else + #include + #endif #include #include #include