From dd5efb33456c3f5528b2e4e0f6aca7448395bc93 Mon Sep 17 00:00:00 2001 From: Pavel Brychta Date: Mon, 27 Sep 2021 07:28:58 +0200 Subject: [PATCH] Vyreseni problemu s definici souboroveho systemu i pro Core 2.0.0 --- src/definefs.hpp | 20 ++++++++++++++++++++ src/sysvars.hpp | 21 +-------------------- 2 files changed, 21 insertions(+), 20 deletions(-) create mode 100644 src/definefs.hpp diff --git a/src/definefs.hpp b/src/definefs.hpp new file mode 100644 index 0000000..e9cb4af --- /dev/null +++ b/src/definefs.hpp @@ -0,0 +1,20 @@ +#pragma once +#ifndef USEDFS +# if defined(ESP32) +# ifdef USE_LITTLEFS +# if ESP_IDF_VERSION_MAJOR < 4 +# include +# define USEDFS LITTLEFS +# else +# include +# define USEDFS LittleFS +# endif +# else +# include +# define USEDFS SPIFFS +# endif +# else +# include +# define USEDFS LittleFS +# endif +#endif diff --git a/src/sysvars.hpp b/src/sysvars.hpp index 6fd48c3..972d8c2 100644 --- a/src/sysvars.hpp +++ b/src/sysvars.hpp @@ -8,26 +8,7 @@ #include #include #include -// TODO: predelat na definefs.hpp, ale to pak vytvori zavislost na ESPFoundation :-( -#ifndef USEDFS -# if defined(ESP32) -# ifdef USE_LITTLEFS -# if ESP_IDF_VERSION_MAJOR < 4 -# include -# define USEDFS LITTLEFS -# else -# include -# define USEDFS LittleFS -# endif -# else -# include -# define USEDFS SPIFFS -# endif -# else -# include -# define USEDFS LittleFS -# endif -#endif +#include "definefs.hpp" enum { SV_OK = 0,