From aa3731c230343575870c2e031a96a2e619229bec Mon Sep 17 00:00:00 2001 From: Kristian Sloth Lauszus Date: Tue, 25 Oct 2016 00:06:15 -0500 Subject: [PATCH] Workaround the following issue: https://github.com/esp8266/Arduino/issues/2078 Also see: https://travis-ci.org/felis/USB_Host_Shield_2.0/jobs/170350078 --- settings.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/settings.h b/settings.h index 1fb371d8..c8856a24 100644 --- a/settings.h +++ b/settings.h @@ -177,4 +177,16 @@ extern SPI_HandleTypeDef SPI_Handle; // Needed to be declared in your main.cpp #define MFK_CASTUINT8T #endif +// Workaround issue: https://github.com/esp8266/Arduino/issues/2078 +#ifdef ESP8266 +#undef PROGMEM +#define PROGMEM +#undef PSTR +#define PSTR(s) (s) +#undef pgm_read_byte +#define pgm_read_byte(addr) (*reinterpret_cast(addr)) +#undef pgm_read_word +#define pgm_read_word(addr) (*reinterpret_cast(addr)) +#endif + #endif /* SETTINGS_H */