Skip to content

Commit d7cf78f

Browse files
committed
1 parent b406c71 commit d7cf78f

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

settings.h

+12
Original file line numberDiff line numberDiff line change
@@ -171,4 +171,16 @@ extern SPI_HandleTypeDef SPI_Handle; // Needed to be declared in your main.cpp
171171
#endif
172172
#endif
173173

174+
// Workaround issue: https://github.com/esp8266/Arduino/issues/2078
175+
#ifdef ESP8266
176+
#undef PROGMEM
177+
#define PROGMEM
178+
#undef PSTR
179+
#define PSTR(s) (s)
180+
#undef pgm_read_byte
181+
#define pgm_read_byte(addr) (*reinterpret_cast<const uint8_t*>(addr))
182+
#undef pgm_read_word
183+
#define pgm_read_word(addr) (*reinterpret_cast<const uint16_t*>(addr))
184+
#endif
185+
174186
#endif /* SETTINGS_H */

0 commit comments

Comments
 (0)