Skip to content

Commit

Permalink
Fix pgm_read_float() macro definitions (#5666)
Browse files Browse the repository at this point in the history
Add in missing derefeence in pgm_read_float macro which was causing
compile errors.
  • Loading branch information
earlephilhower authored Jan 25, 2019
1 parent c26102b commit ab9d4ad
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tools/sdk/libc/xtensa-lx106-elf/include/sys/pgmspace.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
#ifdef __cplusplus
#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))
#else
#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))
#endif

Expand Down

0 comments on commit ab9d4ad

Please sign in to comment.