diff --git a/cores/esp32/WString.h b/cores/esp32/WString.h index 604763aa..d99352f4 100644 --- a/cores/esp32/WString.h +++ b/cores/esp32/WString.h @@ -26,7 +26,7 @@ #include #include #include -//#include +#include // An inherited class for holding the result of a concatenation. These // result objects are assumed to be writable by subsequent concatenations. @@ -34,9 +34,7 @@ class StringSumHelper; // an abstract class used as a means to proide a unique pointer type // but really has no body -class __FlashStringHelper; -#define FPSTR(pstr_pointer) (reinterpret_cast(pstr_pointer)) -#define F(string_literal) (FPSTR(PSTR(string_literal))) +//class __FlashStringHelper; // The string class class String diff --git a/cores/esp32/pgmspace.h b/cores/esp32/pgmspace.h index ce155391..013ff63c 100644 --- a/cores/esp32/pgmspace.h +++ b/cores/esp32/pgmspace.h @@ -22,7 +22,8 @@ typedef char __FlashStringHelper; #define PROGMEM #define PSTR(s) (s) -#define F(string_literal) (reinterpret_cast(PSTR(string_literal))) +#define FPSTR(pstr_pointer) ((const char *)(pstr_pointer)) +#define F(string_literal) (string_literal) #define pgm_read_byte(addr) (*(const unsigned char *)(addr)) #define pgm_read_word(addr) (*(const unsigned short *)(addr))