Go to the documentation of this file.
23 #if defined(ARDUINO) && ARDUINO >=100
27 #include <pins_arduino.h>
29 #include <avr/pgmspace.h>
36 #define __PGMSPACE_H_ 1
44 #define PGM_P const char *
47 #define PSTR(str) (str)
53 #define _SFR_BYTE(n) (n)
85 #define memchr_P(str, c, len) memchr((str), (c), (len))
88 #define memcmp_P(a, b, n) memcmp((a), (b), (n))
91 #define memcpy_P(dest, src, num) memcpy((dest), (src), (num))
94 #define memmem_P(a, alen, b, blen) memmem((a), (alen), (b), (blen))
97 #define memrchr_P(str, val, len) memrchr((str), (val), (len))
100 #define strcat_P(dest, src) strcat((dest), (src))
103 #define strchr_P(str, c) strchr((str), (c))
106 #define strchrnul_P(str, c) strchrnul((str), (c))
109 #define strcmp_P(a, b) strcmp((a), (b))
112 #define strcpy_P(dest, src) strcpy((dest), (src))
115 #define strcasecmp_P(a, b) strcasecmp((a), (b))
118 #define strcasestr_P(a, b) strcasestr((a), (b))
121 #define strlcat_P(dest, src, len) strlcat((dest), (src), (len))
124 #define strlcpy_P(dest, src, len) strlcpy((dest), (src), (len))
127 #define strlen_P(s) strlen((const char *)(s))
130 #define strnlen_P(str, len) strnlen((str), (len))
133 #define strncmp_P(a, b, n) strncmp((a), (b), (n))
135 #ifndef strncasecmp_P
136 #define strncasecmp_P(a, b, n) strncasecmp((a), (b), (n))
139 #define strncat_P(a, b, n) strncat((a), (b), (n))
142 #define strncpy_P(a, b, n) strncmp((a), (b), (n))
145 #define strpbrk_P(str, chrs) strpbrk((str), (chrs))
148 #define strrchr_P(str, c) strrchr((str), (c))
151 #define strsep_P(strp, delim) strsep((strp), (delim))
154 #define strspn_P(str, chrs) strspn((str), (chrs))
157 #define strstr_P(a, b) strstr((a), (b))
160 #define sprintf_P(s, ...) sprintf((s), __VA_ARGS__)
163 #define vfprintf_P(s, ...) vfprintf((s), __VA_ARGS__)
166 #define printf_P(...) printf(__VA_ARGS__)
169 #define snprintf_P(s, n, ...) ((s), (n), __VA_ARGS__)
172 #define vsprintf_P(s, ...) ((s),__VA_ARGS__)
175 #define vsnprintf_P(s, n, ...) ((s), (n),__VA_ARGS__)
178 #define fprintf_P(s, ...) ((s), __VA_ARGS__)
181 #ifndef pgm_read_byte
182 #define pgm_read_byte(addr) (*(const unsigned char *)(addr))
184 #ifndef pgm_read_word
185 #define pgm_read_word(addr) (*(const unsigned short *)(addr))
187 #ifndef pgm_read_dword
188 #define pgm_read_dword(addr) (*(const unsigned long *)(addr))
190 #ifndef pgm_read_float
191 #define pgm_read_float(addr) (*(const float *)(addr))
194 #ifndef pgm_read_byte_near
195 #define pgm_read_byte_near(addr) pgm_read_byte(addr)
197 #ifndef pgm_read_word_near
198 #define pgm_read_word_near(addr) pgm_read_word(addr)
200 #ifndef pgm_read_dword_near
201 #define pgm_read_dword_near(addr) pgm_read_dword(addr)
203 #ifndef pgm_read_float_near
204 #define pgm_read_float_near(addr) pgm_read_float(addr)
206 #ifndef pgm_read_byte_far
207 #define pgm_read_byte_far(addr) pgm_read_byte(addr)
209 #ifndef pgm_read_word_far
210 #define pgm_read_word_far(addr) pgm_read_word(addr)
212 #ifndef pgm_read_dword_far
213 #define pgm_read_dword_far(addr) pgm_read_dword(addr)
215 #ifndef pgm_read_float_far
216 #define pgm_read_float_far(addr) pgm_read_float(addr)
219 #ifndef pgm_read_pointer
220 #define pgm_read_pointer