Vyreseni problemu s definici souboroveho systemu i pro Core 2.0.0

This commit is contained in:
Pavel Brychta 2021-09-27 07:28:58 +02:00
parent 4cc1b656fd
commit dd5efb3345
2 changed files with 21 additions and 20 deletions

20
src/definefs.hpp Normal file
View File

@ -0,0 +1,20 @@
#pragma once
#ifndef USEDFS
# if defined(ESP32)
# ifdef USE_LITTLEFS
# if ESP_IDF_VERSION_MAJOR < 4
# include <LITTLEFS.h>
# define USEDFS LITTLEFS
# else
# include <LittleFS.h>
# define USEDFS LittleFS
# endif
# else
# include <SPIFFS.h>
# define USEDFS SPIFFS
# endif
# else
# include <LittleFS.h>
# define USEDFS LittleFS
# endif
#endif

View File

@ -8,26 +8,7 @@
#include <Arduino.h>
#include <ArduinoJson.h>
#include <FS.h>
// 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 <LITTLEFS.h>
# define USEDFS LITTLEFS
# else
# include <LittleFS.h>
# define USEDFS LittleFS
# endif
# else
# include <SPIFFS.h>
# define USEDFS SPIFFS
# endif
# else
# include <LittleFS.h>
# define USEDFS LittleFS
# endif
#endif
#include "definefs.hpp"
enum {
SV_OK = 0,