From cf1b69513fb371a37a0f5778267ea3eccbe5a3ab Mon Sep 17 00:00:00 2001 From: Kristian Sloth Lauszus Date: Sun, 14 Jan 2018 18:17:12 +0100 Subject: [PATCH] Define pgm_read_pointer in the end, as pgm_read_ptr is not defined on the ESP32 platform --- avrpins.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/avrpins.h b/avrpins.h index b1c75238..ec4ae672 100644 --- a/avrpins.h +++ b/avrpins.h @@ -1328,8 +1328,6 @@ MAKE_PIN(P13, 13); // #elif defined(ESP8266) || defined(ESP32) -#define pgm_read_pointer(p) pgm_read_ptr(p) - #define MAKE_PIN(className, pin) \ class className { \ public: \ @@ -1418,6 +1416,12 @@ MAKE_PIN(P17, 17); // INT #undef MAKE_PIN +// pgm_read_ptr is not defined in the ESP32, so we have to undef the diffinition from version_helper.h +#ifdef pgm_read_pointer +#undef pgm_read_pointer +#endif +#define pgm_read_pointer(p) pgm_read_ptr(p) + #else #error "Please define board in avrpins.h"