From 14427e778c7ccf8e1d1dd30a2db74c745e586633 Mon Sep 17 00:00:00 2001 From: Brian Park Date: Thu, 21 Jun 2018 20:54:56 -0700 Subject: [PATCH] Fix incorrect definition of FPSTR() and move from pgmspace.h to WString.h (#1371) --- cores/esp32/WString.h | 3 ++- cores/esp32/pgmspace.h | 1 - 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cores/esp32/WString.h b/cores/esp32/WString.h index e045538c5cb..11b12aa08a5 100644 --- a/cores/esp32/WString.h +++ b/cores/esp32/WString.h @@ -35,7 +35,8 @@ class StringSumHelper; // an abstract class used as a means to proide a unique pointer type // but really has no body class __FlashStringHelper; -#define F(string_literal) (reinterpret_cast(PSTR(string_literal))) +#define FPSTR(pstr_pointer) (reinterpret_cast(pstr_pointer)) +#define F(string_literal) (FPSTR(PSTR(string_literal))) // The string class class String { diff --git a/cores/esp32/pgmspace.h b/cores/esp32/pgmspace.h index c2bee48ce9e..aa58775ff57 100644 --- a/cores/esp32/pgmspace.h +++ b/cores/esp32/pgmspace.h @@ -32,7 +32,6 @@ typedef unsigned long prog_uint32_t; #define PROGMEM #define PGM_P const char * #define PGM_VOID_P const void * -#define FPSTR(p) ((const char *)(p)) #define PSTR(s) (s) #define _SFR_BYTE(n) (n)