8000 Fix incorrect definition of FPSTR() and move from pgmspace.h to WStri… · shuaidi/arduino-esp32@56ce580 · GitHub
[go: up one dir, main page]

Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 56ce580

Browse files
bxparksme-no-dev
authored andcommitted
Fix incorrect definition of FPSTR() and move from pgmspace.h to WString.h (espressif#1371) (espressif#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

Lines changed: 2 additions & 1 deletion
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

Lines changed: 0 additions & 1 deletion
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)
0