Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
pgmspace_generic.hpp
00001 // ArduinoJson - arduinojson.org 00002 // Copyright Benoit Blanchon 2014-2021 00003 // MIT License 00004 00005 #pragma once 00006 00007 #include <ArduinoJson/Namespace.hpp> 00008 #include <ArduinoJson/Polyfills/type_traits.hpp> 00009 00010 namespace ARDUINOJSON_NAMESPACE { 00011 00012 template <typename T> 00013 typename enable_if<is_pointer<T>::value, T>::type pgm_read(const void* p) { 00014 return reinterpret_cast<T>(pgm_read_ptr(p)); 00015 } 00016 00017 template <typename T> 00018 typename enable_if<is_floating_point<T>::value && 00019 sizeof(T) == sizeof(float), // on AVR sizeof(double) == 00020 // sizeof(float) 00021 T>::type 00022 pgm_read(const void* p) { 00023 return pgm_read_float(p); 00024 } 00025 00026 template <typename T> 00027 typename enable_if<is_same<T, uint32_t>::value, T>::type pgm_read( 00028 const void* p) { 00029 return pgm_read_dword(p); 00030 } 00031 00032 } // namespace ARDUINOJSON_NAMESPACE
Generated on Wed Jul 13 2022 01:10:36 by
1.7.2