From dc43ec6c38fb410c3054ea7b55cca23307651d18 Mon Sep 17 00:00:00 2001 From: Patrick Fink Date: Sat, 16 Jan 2021 18:41:14 +0100 Subject: [PATCH 1/2] Expand pgmspace compatibility Co-Authored-By: Christoph Schulz --- cores/piduino/pgmspace.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/cores/piduino/pgmspace.h b/cores/piduino/pgmspace.h index 1385fd3c..f019038d 100644 --- a/cores/piduino/pgmspace.h +++ b/cores/piduino/pgmspace.h @@ -21,4 +21,11 @@ typedef char __FlashStringHelper; #define pgm_read_float_far(addr) pgm_read_float(addr) #define memcpy_P(to,from,len) memcpy(to,from,len) + +// https://github.com/esp8266/Arduino/blob/85ba53a24994db5ec2aff3b7adfa05330a637413/tests/host/sys/pgmspace.h +#define strcmp_P strcmp +#define strncmp_P strncmp +inline size_t strlen_P(const char *s) { return strlen(s); } +#define sprintf_P sprintf +#define printf_P printf #endif From 149e8e070179de2042b0c14f1a602e98c599f921 Mon Sep 17 00:00:00 2001 From: Patrick Fink Date: Sat, 16 Jan 2021 21:32:28 +0100 Subject: [PATCH 2/2] Fix build error Co-Authored-By: Christoph Schulz --- cores/piduino/pgmspace.h | 1 - 1 file changed, 1 deletion(-) diff --git a/cores/piduino/pgmspace.h b/cores/piduino/pgmspace.h index f019038d..b027550f 100644 --- a/cores/piduino/pgmspace.h +++ b/cores/piduino/pgmspace.h @@ -25,7 +25,6 @@ typedef char __FlashStringHelper; // https://github.com/esp8266/Arduino/blob/85ba53a24994db5ec2aff3b7adfa05330a637413/tests/host/sys/pgmspace.h #define strcmp_P strcmp #define strncmp_P strncmp -inline size_t strlen_P(const char *s) { return strlen(s); } #define sprintf_P sprintf #define printf_P printf #endif