Skip to content

Commit aa3731c

Browse files
committed
1 parent 58015d6 commit aa3731c

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

settings.h

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,4 +177,16 @@ extern SPI_HandleTypeDef SPI_Handle; // Needed to be declared in your main.cpp
177177
#define MFK_CASTUINT8T
178178
#endif
179179

180+
// Workaround issue: https://github.com/esp8266/Arduino/issues/2078
181+
#ifdef ESP8266
182+
#undef PROGMEM
183+
#define PROGMEM
184+
#undef PSTR
185+
#define PSTR(s) (s)
186+
#undef pgm_read_byte
187+
#define pgm_read_byte(addr) (*reinterpret_cast<const uint8_t*>(addr))
188+
#undef pgm_read_word
189+
#define pgm_read_word(addr) (*reinterpret_cast<const uint16_t*>(addr))
190+
#endif
191+
180192
#endif /* SETTINGS_H */

0 commit comments

Comments
 (0)