Prusa MINI Firmware overview
|
Go to the documentation of this file.
24 #define __PGMSPACE_H_ 1
28 #define PROGMEM_EMULATED 1
30 #define PGM_P const char *
31 #define PSTR(str) (str)
33 #define _SFR_BYTE(n) (n)
47 #define memchr_P(str, c, len) memchr((str), (c), (len))
48 #define memcmp_P(a, b, n) memcmp((a), (b), (n))
49 #define memcpy_P(dest, src, num) memcpy((dest), (src), (num))
50 #define memmem_P(a, alen, b, blen) memmem((a), (alen), (b), (blen))
51 #define memrchr_P(str, val, len) memrchr((str), (val), (len))
52 #define strcat_P(dest, src) strcat((dest), (src))
53 #define strchr_P(str, c) strchr((str), (c))
54 #define strchrnul_P(str, c) strchrnul((str), (c))
55 #define strcmp_P(a, b) strcmp((a), (b))
56 #define strcpy_P(dest, src) strcpy((dest), (src))
57 #define strcasecmp_P(a, b) strcasecmp((a), (b))
58 #define strcasestr_P(a, b) strcasestr((a), (b))
59 #define strlcat_P(dest, src, len) strlcat((dest), (src), (len))
60 #define strlcpy_P(dest, src, len) strlcpy((dest), (src), (len))
61 #define strlen_P(s) strlen((const char *)(s))
62 #define strnlen_P(str, len) strnlen((str), (len))
63 #define strncmp_P(a, b, n) strncmp((a), (b), (n))
64 #define strncasecmp_P(a, b, n) strncasecmp((a), (b), (n))
65 #define strncat_P(a, b, n) strncat((a), (b), (n))
66 #define strncpy_P(a, b, n) strncpy((a), (b), (n))
67 #define strpbrk_P(str, chrs) strpbrk((str), (chrs))
68 #define strrchr_P(str, c) strrchr((str), (c))
69 #define strsep_P(strp, delim) strsep((strp), (delim))
70 #define strspn_P(str, chrs) strspn((str), (chrs))
71 #define strstr_P(a, b) strstr((a), (b))
72 #define sprintf_P(s, ...) sprintf((s), __VA_ARGS__)
73 #define vfprintf_P(fp, s, ...) vfprintf((fp), (s), __VA_ARGS__)
74 #define printf_P(...) printf(__VA_ARGS__)
75 #define snprintf_P(s, n, ...) snprintf((s), (n), __VA_ARGS__)
76 #define vsprintf_P(s, ...) vsprintf((s), __VA_ARGS__)
77 #define vsnprintf_P(s, n, ...) vsnprintf((s), (n), __VA_ARGS__)
78 #define fprintf_P(fp, ...) fprintf((fp), __VA_ARGS__)
79 #define strlen_PF(a) strlen((a))
80 #define strnlen_PF(src, len) strnlen((src), (len))
81 #define memcpy_PF(dest, src, len) memcpy((dest), (src), (len))
82 #define strcpy_PF(dest, src) strcpy((dest), (src))
83 #define strncpy_PF(dest, src, len) strncpy((dest), (src), (len))
84 #define strcat_PF(dest, src) strcat((dest), (src))
85 #define strlcat_PF(dest, src, len) strlcat((dest), (src), (len))
86 #define strncat_PF(dest, src, len) strncat((dest), (src), (len))
87 #define strcmp_PF(s1, s2) strcmp((s1), (s2))
88 #define strncmp_PF(s1, s2, n) strncmp((s1), (s2), (n))
89 #define strcasecmp_PF(s1, s2) strcasecmp((s1), (s2))
90 #define strncasecmp_PF(s1, s2, n) strncasecmp((s1), (s2), (n))
91 #define strstr_PF(s1, s2) strstr((s1), (s2))
92 #define strlcpy_PF(dest, src, n) strlcpy((dest), (src), (n))
93 #define memcmp_PF(s1, s2, n) memcmp((s1), (s2), (n))
95 #define pgm_read_byte(addr) (*(const unsigned char *)(addr))
97 #define pgm_read_word(addr) (*(const unsigned short *)(addr))
98 #define pgm_read_dword(addr) (*(const unsigned long *)(addr))
99 #define pgm_read_float(addr) (*(const float *)(addr))
101 #define pgm_read_word(addr) ({ \
102 typeof(addr) _addr = (addr); \
103 *(const unsigned short *)(_addr); \
105 #define pgm_read_dword(addr) ({ \
106 typeof(addr) _addr = (addr); \
107 *(const unsigned long *)(_addr); \
109 #define pgm_read_float(addr) ({ \
110 typeof(addr) _addr = (addr); \
111 *(const float *)(_addr); \
113 #define pgm_read_ptr(addr) ({ \
114 typeof(addr) _addr = (addr); \
115 *(void *const *)(_addr); \
119 #define pgm_read_byte_near(addr) pgm_read_byte(addr)
120 #define pgm_read_word_near(addr) pgm_read_word(addr)
121 #define pgm_read_dword_near(addr) pgm_read_dword(addr)
122 #define pgm_read_float_near(addr) pgm_read_float(addr)
123 #define pgm_read_ptr_near(addr) pgm_read_ptr(addr)
124 #define pgm_read_byte_far(addr) pgm_read_byte(addr)
125 #define pgm_read_word_far(addr) pgm_read_word(addr)
126 #define pgm_read_dword_far(addr) pgm_read_dword(addr)
127 #define pgm_read_float_far(addr) pgm_read_float(addr)
128 #define pgm_read_ptr_far(addr) pgm_read_ptr(addr)
uint64_t prog_uint64_t
Definition: pgmspace.h:45
uint16_t prog_uint16_t
Definition: pgmspace.h:41
int16_t prog_int16_t
Definition: pgmspace.h:40
int8_t prog_int8_t
Definition: pgmspace.h:38
char prog_char
Definition: pgmspace.h:36
int32_t prog_int32_t
Definition: pgmspace.h:42
int64_t prog_int64_t
Definition: pgmspace.h:44
unsigned char prog_uchar
Definition: pgmspace.h:37
uint32_t prog_uint32_t
Definition: pgmspace.h:43
const uint8_t[]
Definition: 404_html.c:3
uint8_t prog_uint8_t
Definition: pgmspace.h:39
void prog_void
Definition: pgmspace.h:35