mirror of
				https://github.com/eledio-devices/thirdparty-ArduinoJson.git
				synced 2025-10-31 08:42:39 +01:00 
			
		
		
		
	Set default for ARDUINOJSON_ENABLE_PROGMEM to 1 on AVR
				
					
				
			This commit is contained in:
		| @@ -6,6 +6,7 @@ HEAD | |||||||
|  |  | ||||||
| * Fix compatibility with the Zephyr Project (issue #1905) | * Fix compatibility with the Zephyr Project (issue #1905) | ||||||
| * Allow using PROGMEM outside of Arduino (issue #1903) | * Allow using PROGMEM outside of Arduino (issue #1903) | ||||||
|  | * Set default for `ARDUINOJSON_ENABLE_PROGMEM` to `1` on AVR | ||||||
|  |  | ||||||
| v6.21.1 (2023-03-27) | v6.21.1 (2023-03-27) | ||||||
| ------- | ------- | ||||||
|   | |||||||
| @@ -1,5 +1,7 @@ | |||||||
| #include <ArduinoJson.h> | #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_USE_LONG_LONG == 0, "ARDUINOJSON_USE_LONG_LONG"); | ||||||
|  |  | ||||||
| static_assert(ARDUINOJSON_SLOT_OFFSET_SIZE == 1, | static_assert(ARDUINOJSON_SLOT_OFFSET_SIZE == 1, | ||||||
|   | |||||||
| @@ -130,9 +130,13 @@ | |||||||
| #    define ARDUINOJSON_ENABLE_ARDUINO_PRINT 0 | #    define ARDUINOJSON_ENABLE_ARDUINO_PRINT 0 | ||||||
| #  endif | #  endif | ||||||
|  |  | ||||||
| // Disable support for PROGMEM | // Enable PROGMEM support on AVR only | ||||||
| #  ifndef ARDUINOJSON_ENABLE_PROGMEM | #  ifndef ARDUINOJSON_ENABLE_PROGMEM | ||||||
| #    define ARDUINOJSON_ENABLE_PROGMEM 0 | #    ifdef __AVR__ | ||||||
|  | #      define ARDUINOJSON_ENABLE_PROGMEM 1 | ||||||
|  | #    else | ||||||
|  | #      define ARDUINOJSON_ENABLE_PROGMEM 0 | ||||||
|  | #    endif | ||||||
| #  endif | #  endif | ||||||
|  |  | ||||||
| #endif  // ARDUINO | #endif  // ARDUINO | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user