More minor ESP8266 compatibility tweaks (#1131)

This commit is contained in:
Earle F. Philhower, III 2023-01-20 17:06:40 -08:00 committed by GitHub
parent 9a241b0e43
commit d619bf0bc1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 14 additions and 0 deletions

View file

@ -107,6 +107,9 @@ extern bool __isFreeRTOS;
#ifdef __cplusplus
// emptyString is an ESP-ism, a constant string with ""
extern const String emptyString;
#ifdef USE_TINYUSB
// Needed for declaring Serial
#include "Adafruit_USBD_CDC.h"

View file

@ -195,3 +195,5 @@ void hexdump(const void* mem, uint32_t len, uint8_t cols) {
}
printf("\n");
}
const String emptyString = "";

View file

@ -381,6 +381,15 @@ public:
void setFeedWatchdogFunc(FeedHostProcessorWatchdogFuncPointer func);
void feedWatchdog();
// ESP8266 compatibility
void persistent(bool unused) {
(void) unused;
}
void hostname(const char *name) {
setHostname(name);
}
private:
int _timeout = 15000;
String _ssid;