1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-04-19 23:22:16 +03:00

Fix pgm_read_float() macro definitions (#5666)

Add in missing derefeence in pgm_read_float macro which was causing
compile errors.
This commit is contained in:
Earle F. Philhower, III 2019-01-25 01:11:14 +00:00 committed by GitHub
parent c26102b34c
commit ab9d4ad57b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -72,11 +72,11 @@ static inline uint16_t pgm_read_word_inlined(const void* addr) {
#define pgm_read_word(addr) pgm_read_word_inlined(addr) #define pgm_read_word(addr) pgm_read_word_inlined(addr)
#ifdef __cplusplus #ifdef __cplusplus
#define pgm_read_dword(addr) (*reinterpret_cast<const uint32_t*>(addr)) #define pgm_read_dword(addr) (*reinterpret_cast<const uint32_t*>(addr))
#define pgm_read_float(addr) (*reinterpret_cast<const float>(addr)) #define pgm_read_float(addr) (*reinterpret_cast<const float*>(addr))
#define pgm_read_ptr(addr) (*reinterpret_cast<const void*>(addr)) #define pgm_read_ptr(addr) (*reinterpret_cast<const void*>(addr))
#else #else
#define pgm_read_dword(addr) (*(const uint32_t*)(addr)) #define pgm_read_dword(addr) (*(const uint32_t*)(addr))
#define pgm_read_float(addr) (*(const float)(addr)) #define pgm_read_float(addr) (*(const float*)(addr))
#define pgm_read_ptr(addr) (*(const void*)(addr)) #define pgm_read_ptr(addr) (*(const void*)(addr))
#endif #endif