Set default for ARDUINOJSON_ENABLE_PROGMEM to 1 on AVR

Ported from 082ae69e86
This commit is contained in:
Benoit Blanchon
2023-04-12 11:24:49 +02:00
parent acfbf26e37
commit 03139a08af
2 changed files with 8 additions and 2 deletions

View File

@ -1,5 +1,7 @@
#include <ArduinoJson.h>
static_assert(ARDUINOJSON_ENABLE_PROGMEM == 1, "ARDUINOJSON_ENABLE_PROGMEM");
static_assert(ARDUINOJSON_USE_LONG_LONG == 0, "ARDUINOJSON_USE_LONG_LONG");
static_assert(ARDUINOJSON_SLOT_OFFSET_SIZE == 1,

View File

@ -130,10 +130,14 @@
# define ARDUINOJSON_ENABLE_ARDUINO_PRINT 0
# endif
// Disable support for PROGMEM
// Enable PROGMEM support on AVR only
# ifndef ARDUINOJSON_ENABLE_PROGMEM
# ifdef __AVR__
# define ARDUINOJSON_ENABLE_PROGMEM 1
# else
# define ARDUINOJSON_ENABLE_PROGMEM 0
# endif
# endif
#endif // ARDUINO