Skip to content

Commit add5d71

Browse files
authored
Added emptyString for compatibility with other Arduino cores (#19)
I was double checking: it seems that only the ESP32 and the RP2040 core from Earlee Phil Hower seem to support this!
1 parent b2f2bf8 commit add5d71

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

ArduinoCore-Linux/cores/arduino/Arduino.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,3 +232,5 @@ void analogWriteResolution(uint8_t bits) {
232232
* @note This is used to prevent watchdog timer resets in long-running loops
233233
*/
234234
void yield() {}
235+
236+
const String emptyString;

ArduinoCore-Linux/cores/arduino/Arduino.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,4 +49,8 @@ using namespace arduino;
4949

5050
// supported by some platforms
5151
void analogWriteFrequency(pin_size_t pin, uint32_t freq);
52-
void analogWriteResolution(uint8_t bits);
52+
void analogWriteResolution(uint8_t bits);
53+
54+
// ESP32-ism that is adopted by most Arduino implementations
55+
// and used by, at least, ESPAsyncWebServer
56+
extern const String emptyString;

0 commit comments

Comments
 (0)