Skip to content

Commit 1414a8c

Browse files
committed
nRF5 pgm_read_ptr fix
1 parent 510086e commit 1414a8c

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

library.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name=ArduinoMenu library
2-
version=4.17.24
2+
version=4.17.25
33
author=Rui Azevedo, [email protected]
44
maintainer=neu-rah, [email protected]
55
sentence=Generic menu/interactivity system

src/macros.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@
2727
#define MEMMODE PROGMEM
2828
#define constMEM const
2929
#define constText const char
30+
#ifdef NRF5
31+
#undef pgm_read_ptr
32+
#define pgm_read_ptr(addr) ((const void *)(addr))
33+
#endif
3034
#define memPtr(src) pgm_read_ptr(&(src))
3135
#define memByte(addr) (pgm_read_byte(addr))
3236
#define memWord(addr) (pgm_read_word(addr))

0 commit comments

Comments
 (0)