diff --git a/extras/conf_test/avr.cpp b/extras/conf_test/avr.cpp index eeac6c0d..769317a8 100644 --- a/extras/conf_test/avr.cpp +++ b/extras/conf_test/avr.cpp @@ -6,6 +6,8 @@ static_assert(ARDUINOJSON_USE_LONG_LONG == 0, "ARDUINOJSON_USE_LONG_LONG"); static_assert(ARDUINOJSON_SLOT_ID_SIZE == 1, "ARDUINOJSON_SLOT_ID_SIZE"); +static_assert(ARDUINOJSON_POOL_CAPACITY == 16, "ARDUINOJSON_POOL_CAPACITY"); + static_assert(ARDUINOJSON_LITTLE_ENDIAN == 1, "ARDUINOJSON_LITTLE_ENDIAN"); static_assert(ARDUINOJSON_USE_DOUBLE == 0, "ARDUINOJSON_USE_DOUBLE"); diff --git a/extras/conf_test/esp8266.cpp b/extras/conf_test/esp8266.cpp index 18d0d753..b37bfd67 100644 --- a/extras/conf_test/esp8266.cpp +++ b/extras/conf_test/esp8266.cpp @@ -4,6 +4,8 @@ static_assert(ARDUINOJSON_USE_LONG_LONG == 1, "ARDUINOJSON_USE_LONG_LONG"); static_assert(ARDUINOJSON_SLOT_ID_SIZE == 2, "ARDUINOJSON_SLOT_ID_SIZE"); +static_assert(ARDUINOJSON_POOL_CAPACITY == 128, "ARDUINOJSON_POOL_CAPACITY"); + static_assert(ARDUINOJSON_LITTLE_ENDIAN == 1, "ARDUINOJSON_LITTLE_ENDIAN"); static_assert(ARDUINOJSON_USE_DOUBLE == 1, "ARDUINOJSON_USE_DOUBLE"); diff --git a/extras/conf_test/x64.cpp b/extras/conf_test/x64.cpp index c7ce9ae2..df6b044b 100644 --- a/extras/conf_test/x64.cpp +++ b/extras/conf_test/x64.cpp @@ -4,6 +4,8 @@ static_assert(ARDUINOJSON_USE_LONG_LONG == 1, "ARDUINOJSON_USE_LONG_LONG"); static_assert(ARDUINOJSON_SLOT_ID_SIZE == 4, "ARDUINOJSON_SLOT_ID_SIZE"); +static_assert(ARDUINOJSON_POOL_CAPACITY == 256, "ARDUINOJSON_POOL_CAPACITY"); + static_assert(ARDUINOJSON_LITTLE_ENDIAN == 1, "ARDUINOJSON_LITTLE_ENDIAN"); static_assert(ARDUINOJSON_USE_DOUBLE == 1, "ARDUINOJSON_USE_DOUBLE"); diff --git a/extras/conf_test/x86.cpp b/extras/conf_test/x86.cpp index a5f335e8..9dff8f17 100644 --- a/extras/conf_test/x86.cpp +++ b/extras/conf_test/x86.cpp @@ -4,6 +4,8 @@ static_assert(ARDUINOJSON_USE_LONG_LONG == 1, "ARDUINOJSON_USE_LONG_LONG"); static_assert(ARDUINOJSON_SLOT_ID_SIZE == 2, "ARDUINOJSON_SLOT_ID_SIZE"); +static_assert(ARDUINOJSON_POOL_CAPACITY == 128, "ARDUINOJSON_POOL_CAPACITY"); + static_assert(ARDUINOJSON_LITTLE_ENDIAN == 1, "ARDUINOJSON_LITTLE_ENDIAN"); static_assert(ARDUINOJSON_USE_DOUBLE == 1, "ARDUINOJSON_USE_DOUBLE"); diff --git a/src/ArduinoJson/Configuration.hpp b/src/ArduinoJson/Configuration.hpp index 21006bc3..cf6fb383 100644 --- a/src/ArduinoJson/Configuration.hpp +++ b/src/ArduinoJson/Configuration.hpp @@ -110,9 +110,9 @@ // Capacity of each variant pool (in slots) #ifndef ARDUINOJSON_POOL_CAPACITY -# if ARDUINOJSON_SIZEOF_POINTER <= 2 +# if ARDUINOJSON_SLOT_ID_SIZE == 1 # define ARDUINOJSON_POOL_CAPACITY 16 // 96 bytes -# elif ARDUINOJSON_SIZEOF_POINTER == 4 +# elif ARDUINOJSON_SLOT_ID_SIZE == 2 # define ARDUINOJSON_POOL_CAPACITY 128 // 1024 bytes # else # define ARDUINOJSON_POOL_CAPACITY 256 // 4096 bytes