Skip to content

Commit 2f907f4

Browse files
Fix pgmspace 32-bit read macros (#5425)
Looks like the pgm_read_(32bit) defines were not used in the main core, and they contained syntax errors when invoked due to some bad bracket/parens. Fix the macros
1 parent 50cbdc0 commit 2f907f4

File tree

1 file changed

+4
-4
lines changed
  • tools/sdk/libc/xtensa-lx106-elf/include/sys

1 file changed

+4
-4
lines changed

tools/sdk/libc/xtensa-lx106-elf/include/sys/pgmspace.h

+4-4
Original file line numberDiff line numberDiff line change
@@ -71,13 +71,13 @@ static inline uint16_t pgm_read_word_inlined(const void* addr) {
7171
#define pgm_read_byte(addr) pgm_read_byte_inlined(addr)
7272
#define pgm_read_word(addr) pgm_read_word_inlined(addr)
7373
#ifdef __cplusplus
74-
#define pgm_read_dword(addr) (*reinterpret_cast<const uint32_t*)(addr)>
75-
#define pgm_read_float(addr) (*reinterpret_cast<const float)(addr)>
76-
#define pgm_read_ptr(addr) (*reinterpret_cast<const void const *)(addr)>
74+
#define pgm_read_dword(addr) (*reinterpret_cast<const uint32_t*>(addr))
75+
#define pgm_read_float(addr) (*reinterpret_cast<const float>(addr))
76+
#define pgm_read_ptr(addr) (*reinterpret_cast<const void*>(addr))
7777
#else
7878
#define pgm_read_dword(addr) (*(const uint32_t*)(addr))
7979
#define pgm_read_float(addr) (*(const float)(addr))
80-
#define pgm_read_ptr(addr) (*(const void const *)(addr))
80+
#define pgm_read_ptr(addr) (*(const void*)(addr))
8181
#endif
8282

8383
#define pgm_read_byte_near(addr) pgm_read_byte(addr)

0 commit comments

Comments
 (0)