mirror of
				https://github.com/eledio-devices/thirdparty-ArduinoJson.git
				synced 2025-10-31 08:42:39 +01:00 
			
		
		
		
	Moved float tables to PROGMEM
This commit is contained in:
		| @@ -28,7 +28,15 @@ inline void* pgm_read_ptr(const void* p) { | ||||
|   return *reinterpret_cast<void* const*>(convertFlashToPtr(p)); | ||||
| } | ||||
|  | ||||
| #define ARDUINOJSON_DEFINE_PROGMEM_ARRAY(type, name, value)        \ | ||||
| inline float pgm_read_float(const void* p) { | ||||
|   return *reinterpret_cast<const float*>(convertFlashToPtr(p)); | ||||
| } | ||||
|  | ||||
| inline uint32_t pgm_read_dword(const void* p) { | ||||
|   return *reinterpret_cast<const uint32_t*>(convertFlashToPtr(p)); | ||||
| } | ||||
|  | ||||
| #define ARDUINOJSON_DEFINE_STATIC_ARRAY(type, name, value)         \ | ||||
|   static type const ARDUINOJSON_CONCAT2(name, _progmem)[] = value; \ | ||||
|   static type const* name = reinterpret_cast<type const*>(         \ | ||||
|       convertPtrToFlash(ARDUINOJSON_CONCAT2(name, _progmem))); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user