mirror of
https://github.com/IoTManagerProject/IoTManager.git
synced 2026-03-26 22:22:16 +03:00
прошивка работает и для esp32
This commit is contained in:
@@ -4,6 +4,14 @@
|
||||
|
||||
#define JSON_BUFFER_SIZE 4096
|
||||
|
||||
#ifdef esp8266_4mb
|
||||
#define USE_LITTLEFS true
|
||||
#endif
|
||||
|
||||
#ifdef esp32_4mb
|
||||
#define USE_LITTLEFS false
|
||||
#endif
|
||||
|
||||
//задачи таскера
|
||||
enum TimerTask_t { WIFI_SCAN,
|
||||
WIFI_MQTT_CONNECTION_CHECK,
|
||||
|
||||
@@ -1,13 +1,27 @@
|
||||
#pragma once
|
||||
|
||||
#include "Global.h"
|
||||
#include "LittleFS.h"
|
||||
|
||||
#ifdef ESP32
|
||||
#include <SPIFFS.h>
|
||||
extern FS* filesystem;
|
||||
#define FileFS SPIFFS
|
||||
#define FS_NAME "SPIFFS"
|
||||
#endif
|
||||
|
||||
#ifdef ESP8266
|
||||
#if USE_LITTLEFS
|
||||
#include "LittleFS.h"
|
||||
extern FS LittleFS;
|
||||
using littlefs_impl::LittleFSConfig;
|
||||
extern FS* filesystem;
|
||||
#define FileFS LittleFS
|
||||
#define FS_NAME "LittleFS"
|
||||
#else
|
||||
extern FS* filesystem;
|
||||
#define FileFS SPIFFS
|
||||
#define FS_NAME "SPIFFS"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
extern bool fileSystemInit();
|
||||
extern void globalVarsSync();
|
||||
|
||||
@@ -3,10 +3,20 @@
|
||||
//внешние глобальные директории
|
||||
#include <Arduino.h>
|
||||
#include <ArduinoJson.h>
|
||||
#include <TickerScheduler.h>
|
||||
|
||||
#ifdef ESP32
|
||||
#include <WiFi.h>
|
||||
#include <HTTPClient.h>
|
||||
#include <HTTPUpdate.h>
|
||||
#endif
|
||||
|
||||
#ifdef ESP8266
|
||||
#include <ESP8266httpUpdate.h>
|
||||
#endif
|
||||
|
||||
#include <ESPAsyncWebServer.h>
|
||||
#include <FS.h>
|
||||
#include <TickerScheduler.h>
|
||||
|
||||
//внутренние глобальные директории проекта
|
||||
#include "Const.h"
|
||||
|
||||
Reference in New Issue
Block a user