Skip to content

Commit c3ffea7

Browse files
committed
feat: add missing PROGMEM variants in ArduinoCore-API
Add the missing _P macro wrappers such as vfprintf_P, printf_P, vsprintf_P, vsnprintf_P, and fprintf_P Signed-off-by: Aymane Bahssain <aymane.bahssain@st.com>
1 parent 0f4e57e commit c3ffea7

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

api/deprecated-avr-comp/avr/pgmspace.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,11 @@ typedef const void* uint_farptr_t;
100100

101101
#define sprintf_P(s, f, ...) sprintf((s), (f), __VA_ARGS__)
102102
#define snprintf_P(s, f, ...) snprintf((s), (f), __VA_ARGS__)
103+
#define vfprintf_P(fp, s, ...) vfprintf((fp), (s), __VA_ARGS__)
104+
#define printf_P(...) printf(__VA_ARGS__)
105+
#define vsprintf_P(s, ...) vsprintf((s), __VA_ARGS__)
106+
#define vsnprintf_P(s, n, ...) vsnprintf((s), (n), __VA_ARGS__)
107+
#define fprintf_P(fp, ...) fprintf((fp), __VA_ARGS__)
103108

104109
#define pgm_read_byte(addr) (*(const unsigned char *)(addr))
105110
#define pgm_read_word(addr) (*(const unsigned short *)(addr))

0 commit comments

Comments
 (0)