Skip to content

Commit d619bf0

Browse files
More minor ESP8266 compatibility tweaks (#1131)
1 parent 9a241b0 commit d619bf0

File tree

3 files changed

+14
-0
lines changed

3 files changed

+14
-0
lines changed

cores/rp2040/Arduino.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,9 @@ extern bool __isFreeRTOS;
107107

108108
#ifdef __cplusplus
109109

110+
// emptyString is an ESP-ism, a constant string with ""
111+
extern const String emptyString;
112+
110113
#ifdef USE_TINYUSB
111114
// Needed for declaring Serial
112115
#include "Adafruit_USBD_CDC.h"

cores/rp2040/main.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,3 +195,5 @@ void hexdump(const void* mem, uint32_t len, uint8_t cols) {
195195
}
196196
printf("\n");
197197
}
198+
199+
const String emptyString = "";

libraries/WiFi/src/WiFiClass.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -381,6 +381,15 @@ class WiFiClass {
381381
void setFeedWatchdogFunc(FeedHostProcessorWatchdogFuncPointer func);
382382
void feedWatchdog();
383383

384+
// ESP8266 compatibility
385+
void persistent(bool unused) {
386+
(void) unused;
387+
}
388+
389+
void hostname(const char *name) {
390+
setHostname(name);
391+
}
392+
384393
private:
385394
int _timeout = 15000;
386395
String _ssid;

0 commit comments

Comments
 (0)