#include <sys/features.h>#include "../c_types.h"#include "../esp_attr.h"
Include dependency graph for Arch/Esp8266/Components/libc/include/sys/pgmspace.h:
Go to the source code of this file.
Macros | |
| #define | pgm_read_with_offset(addr, res) |
| #define | FLASH_MEMORY_START_ADDR 0x40200000 |
| #define | PROGMEM STORE_ATTR ICACHE_RODATA_ATTR |
| Place entity into flash memory. More... | |
| #define | PROGMEM_PSTR |
| Place NUL-terminated string data into flash memory. More... | |
| #define | PSTR(str) |
| Define and use a NUL-terminated 'C' flash string inline. More... | |
| #define | PGM_P const char* |
| Identifies a char pointer as living in flash memory Use to clarify code. More... | |
| #define | PRIPSTR "%s" |
| Remove ? More... | |
Macros to safely read PROGMEM locations | |
| #define | pgm_read_byte(addr) pgm_read_byte_inlined(addr) |
| #define | pgm_read_word(addr) pgm_read_word_inlined(addr) |
| #define | pgm_read_dword(addr) (*(const unsigned long*)(addr)) |
| #define | pgm_read_float(addr) (*(const float*)(addr)) |
AVR-compatibility macros | |
| #define | pgm_read_byte_near(addr) pgm_read_byte(addr) |
| #define | pgm_read_word_near(addr) pgm_read_word(addr) |
| #define | pgm_read_dword_near(addr) pgm_read_dword(addr) |
| #define | pgm_read_float_near(addr) pgm_read_float(addr) |
| #define | pgm_read_byte_far(addr) pgm_read_byte(addr) |
| #define | pgm_read_word_far(addr) pgm_read_word(addr) |
| #define | pgm_read_dword_far(addr) pgm_read_dword(addr) |
| #define | pgm_read_float_far(addr) pgm_read_float(addr) |
Typedefs | |
AVR-compatible pgmspace types | |
Deprecated in esp8266-arduino https://github.com/esp8266/Arduino/pull/4619/ | |
| typedef void | prog_void |
| typedef char | prog_char |
| typedef unsigned char | prog_uchar |
| typedef int8_t | prog_int8_t |
| typedef uint8_t | prog_uint8_t |
| typedef int16_t | prog_int16_t |
| typedef uint16_t | prog_uint16_t |
| typedef int32_t | prog_int32_t |
| typedef uint32_t | prog_uint32_t |
Functions | |
| static uint8_t | pgm_read_byte_inlined (const void *addr) |
| static uint16_t | pgm_read_word_inlined (const void *addr) |
PROGMEM-compatible C library functions | |
| #define | sprintf_P(s, f_P, ...) |
| void * | memcpy_P (void *dest, const void *src_P, size_t length) |
| int | memcmp_P (const void *a1, const void *b1, size_t len) |
| size_t | strlen_P (const char *src_P) |
| char * | strcpy_P (char *dest, const char *src_P) |
| char * | strncpy_P (char *dest, const char *src_P, size_t size) |
| int | strcmp_P (const char *str1, const char *str2_P) |
| int | strncmp_P (const char *str1, const char *str2_P, const size_t size) |
| int | strcasecmp_P (const char *str1, const char *str2_P) |
| char * | strcat_P (char *dest, const char *src_P) |
| char * | strstr_P (char *haystack, const char *needle_P) |
Macro Definition Documentation
◆ pgm_read_byte
| #define pgm_read_byte | ( | addr | ) | pgm_read_byte_inlined(addr) |
◆ pgm_read_byte_far
| #define pgm_read_byte_far | ( | addr | ) | pgm_read_byte(addr) |
◆ pgm_read_byte_near
| #define pgm_read_byte_near | ( | addr | ) | pgm_read_byte(addr) |
◆ pgm_read_dword
| #define pgm_read_dword | ( | addr | ) | (*(const unsigned long*)(addr)) |
◆ pgm_read_dword_far
| #define pgm_read_dword_far | ( | addr | ) | pgm_read_dword(addr) |
◆ pgm_read_dword_near
| #define pgm_read_dword_near | ( | addr | ) | pgm_read_dword(addr) |
◆ pgm_read_float
| #define pgm_read_float | ( | addr | ) | (*(const float*)(addr)) |
◆ pgm_read_float_far
| #define pgm_read_float_far | ( | addr | ) | pgm_read_float(addr) |
◆ pgm_read_float_near
| #define pgm_read_float_near | ( | addr | ) | pgm_read_float(addr) |
◆ pgm_read_with_offset
| #define pgm_read_with_offset | ( | addr, | |
| res | |||
| ) |
Value:
__asm__("extui %0, %1, 0, 2\n" /* Extract offset within word (in bytes) */ \
"sub %1, %1, %0\n" /* Subtract offset from addr, yielding an aligned address */ \
"l32i.n %1, %1, 0x0\n" /* Load word from aligned address */ \
"ssa8l %0\n" /* Prepare to shift by offset (in bits) */ \
"src %0, %1, %1\n" /* Shift right; now the requested byte is the first one */ \
: "=r"(res), "=r"(addr) \
: "1"(addr) \
:);
◆ pgm_read_word
| #define pgm_read_word | ( | addr | ) | pgm_read_word_inlined(addr) |
◆ pgm_read_word_far
| #define pgm_read_word_far | ( | addr | ) | pgm_read_word(addr) |
◆ pgm_read_word_near
| #define pgm_read_word_near | ( | addr | ) | pgm_read_word(addr) |
◆ sprintf_P
| #define sprintf_P | ( | s, | |
| f_P, | |||
| ... | |||
| ) |
Value:
(__extension__({ \
int len_P = strlen_P(f_P); \
int __result = 0; \
char* __localF = (char*)malloc(len_P + 1); \
if(__localF) { \
strcpy_P(__localF, f_P); \
__localF[len_P] = '\0'; \
} \
__result = m_snprintf(s, len_P, __localF, ##__VA_ARGS__); \
free(__localF); \
__result; \
}))
size_t strlen_P(const char *src_P)
int m_snprintf(char *buf, int length, const char *fmt,...)
Typedef Documentation
◆ prog_char
| typedef char prog_char |
◆ prog_int16_t
| typedef int16_t prog_int16_t |
◆ prog_int32_t
| typedef int32_t prog_int32_t |
◆ prog_int8_t
| typedef int8_t prog_int8_t |
◆ prog_uchar
| typedef unsigned char prog_uchar |
◆ prog_uint16_t
| typedef uint16_t prog_uint16_t |
◆ prog_uint32_t
| typedef uint32_t prog_uint32_t |
◆ prog_uint8_t
| typedef uint8_t prog_uint8_t |
◆ prog_void
| typedef void prog_void |
Function Documentation
◆ memcmp_P()
| int memcmp_P | ( | const void * | a1, |
| const void * | b1, | ||
| size_t | len | ||
| ) |
◆ memcpy_P()
| void* memcpy_P | ( | void * | dest, |
| const void * | src_P, | ||
| size_t | length | ||
| ) |
◆ pgm_read_byte_inlined()
|
inlinestatic |
◆ pgm_read_word_inlined()
|
inlinestatic |
◆ strcasecmp_P()
| int strcasecmp_P | ( | const char * | str1, |
| const char * | str2_P | ||
| ) |
◆ strcat_P()
| char* strcat_P | ( | char * | dest, |
| const char * | src_P | ||
| ) |
◆ strcmp_P()
| int strcmp_P | ( | const char * | str1, |
| const char * | str2_P | ||
| ) |
◆ strcpy_P()
| char* strcpy_P | ( | char * | dest, |
| const char * | src_P | ||
| ) |
◆ strlen_P()
| size_t strlen_P | ( | const char * | src_P | ) |
◆ strncmp_P()
| int strncmp_P | ( | const char * | str1, |
| const char * | str2_P, | ||
| const size_t | size | ||
| ) |
◆ strncpy_P()
| char* strncpy_P | ( | char * | dest, |
| const char * | src_P, | ||
| size_t | size | ||
| ) |
◆ strstr_P()
| char* strstr_P | ( | char * | haystack, |
| const char * | needle_P | ||
| ) |
1.8.13