Skip to content

Commit 56ce580

Browse files
bxparksme-no-dev
authored andcommitted
Fix incorrect definition of FPSTR() and move from pgmspace.h to WString.h (#1371) (#2961)
1 parent 509d31b commit 56ce580

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

cores/esp32/WString.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ class StringSumHelper;
3535
// an abstract class used as a means to proide a unique pointer type
3636
// but really has no body
3737
class __FlashStringHelper;
38-
#define F(string_literal) (reinterpret_cast<const __FlashStringHelper *>(PSTR(string_literal)))
38+
#define FPSTR(pstr_pointer) (reinterpret_cast<const __FlashStringHelper *>(pstr_pointer))
39+
#define F(string_literal) (FPSTR(PSTR(string_literal)))
3940

4041
// The string class
4142
class String {

cores/esp32/pgmspace.h

-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ typedef unsigned long prog_uint32_t;
3232
#define PROGMEM
3333
#define PGM_P const char *
3434
#define PGM_VOID_P const void *
35-
#define FPSTR(p) ((const char *)(p))
3635
#define PSTR(s) (s)
3736
#define _SFR_BYTE(n) (n)
3837

0 commit comments

Comments
 (0)