Skip to content

Commit 1a4ceba

Browse files
committed
wrappers allowing to compile and run esp32-arduino basic examples
(AdvancedWebServer FSBrowser HelloServer SimpleAuthentification)
1 parent 326be35 commit 1a4ceba

File tree

8 files changed

+52
-0
lines changed

8 files changed

+52
-0
lines changed

cores/esp8266/FS.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ class File : public Stream
7979
operator bool() const;
8080
const char* name() const;
8181
const char* fullName() const; // Includes path
82+
const char* path() const { return fullName(); } // esp32 compat
8283
bool truncate(uint32_t size);
8384

8485
bool isFile() const;
@@ -225,6 +226,7 @@ class FS
225226

226227
File open(const char* path, const char* mode);
227228
File open(const String& path, const char* mode);
229+
File open(const String& path) { return open(path, "r"); } // esp32 compat
228230

229231
bool exists(const char* path);
230232
bool exists(const String& path);

libraries/WiFi/keywords.txt

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#######################################
2+
# Datatypes (KEYWORD1)
3+
#######################################
4+
5+
ESPmDNS KEYWORD1
6+
FFat KEYWORD1
7+
WebServer KEYWORD1
8+
9+
#######################################
10+
# Methods and Functions (KEYWORD2)
11+
#######################################
12+
13+
#######################################
14+
# Constants (LITERAL1)
15+
#######################################
16+

libraries/WiFi/library.properties

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
name=WiFi
2+
version=1.0
3+
author=esp8266-arduino
4+
maintainer=esp8266-arduino
5+
sentence=convergence headers for esp32-Arduino compatibility
6+
architectures=esp8266

libraries/WiFi/src/ESPmDNS.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
2+
#pragma once
3+
4+
#include <ESP8266mDNS.h>
5+
6+
using ESPmDNS = MDNSResponder;

libraries/WiFi/src/FFat.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
2+
#pragma once
3+
4+
#include <LittleFS.h>
5+
6+
#define FFat LittleFS

libraries/WiFi/src/SPIFFS.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
2+
#pragma once
3+
4+
#include <FS.h>

libraries/WiFi/src/WebServer.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
2+
#pragma once
3+
4+
#include <ESP8266WebServer.h>
5+
6+
using WebServer = ESP8266WebServer;

libraries/WiFi/src/WiFi.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
2+
#pragma once
3+
4+
#include <ESP8266WiFi.h>
5+
6+
using WiFiClass = ESP8266WiFiClass;

0 commit comments

Comments
 (0)