Go to the documentation of this file.
24 #define isFlashPtr(ptr) ((uint32_t)(ptr) >= SOC_DROM_LOW && (uint32_t)(ptr) < SOC_DROM_HIGH)
26 #define PROGMEM STORE_ATTR ICACHE_RODATA_ATTR
27 #define PROGMEM_PSTR PROGMEM
31 static const char __pstr__[] PROGMEM_PSTR = str; \
35 #define PGM_P const char*
36 #define PGM_VOID_P const void*
43 #define pgm_read_byte(addr) (*(const unsigned char*)(addr))
44 #define pgm_read_word(addr) \
46 uint32_t tmp_addr = (uint32_t)(addr); \
47 *(const uint16_t*)tmp_addr; \
49 #define pgm_read_dword(addr) \
51 uint32_t tmp_addr = (uint32_t)(addr); \
52 *(const uint32_t*)tmp_addr; \
54 #define pgm_read_float(addr) \
56 uint32_t tmp_addr = (uint32_t)(addr); \
57 *(const float*)tmp_addr; \
62 #define pgm_read_byte_near(addr) pgm_read_byte(addr)
63 #define pgm_read_word_near(addr) pgm_read_word(addr)
64 #define pgm_read_dword_near(addr) pgm_read_dword(addr)
65 #define pgm_read_float_near(addr) pgm_read_float(addr)
66 #define pgm_read_byte_far(addr) pgm_read_byte(addr)
67 #define pgm_read_word_far(addr) pgm_read_word(addr)
68 #define pgm_read_dword_far(addr) pgm_read_dword(addr)
69 #define pgm_read_float_far(addr) pgm_read_float(addr)
71 #define memcpy_P(dest, src_P, num) memcpy(dest, src_P, num)
72 #define memcmp_P(buf1, buf2_P, len) memcmp(buf1, buf2_P, len)
73 #define strlen_P(str_P) strlen(str_P)
74 #define strcpy_P(dest, src_P) strcpy(dest, src_P)
75 #define strncpy_P(dest, src_P, size) strncpy(dest, src_P, size)
76 #define strcmp_P(str1, str2_P) strcmp(str1, str2_P)
77 #define strncmp_P(str1, str2_P, size) strncmp(str1, str2_P, size)
78 #define strcasecmp_P(str1, str2_P) strcasecmp(str1, str2_P)
79 #define strcat_P(dest, src_P) strcat(dest, src_P)
80 #define strstr_P(haystack, needle_P) strstr(haystack, needle_P)
81 #define sprintf_P(str, format_P, ...) m_snprintf(str, 1024, format_P, ##__VA_ARGS__)