Skip to content

missing strn program space wrappers #107

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 26, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions hardware/arduino/sam/cores/arduino/avr/pgmspace.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@ typedef uint32_t prog_uint32_t;
#define strstr_P(a, b) strstr((a), (b))
#define strlen_P(a) strlen((a))
#define sprintf_P(s, f, ...) sprintf((s), (f), __VA_ARGS__)
#define strcasecmp_P(a, b) strcasecmp((a), (b))
#define strncpy_P(dest, src, size) strncpy((dest), (src), (size))
#define strncat_P(dest, src, size) strncat((dest), (src), (size))
#define strncmp_P(a, b, size) strncmp((a), (b), (size))
#define strnlen_P(s, size) strnlen((const char *)(s), (size))
#define strncasecmp_P(a, b, size) strncasecmp((a), (b), (size))

#define pgm_read_byte(addr) (*(const unsigned char *)(addr))
#define pgm_read_word(addr) (*(const unsigned short *)(addr))
Expand Down
6 changes: 6 additions & 0 deletions hardware/esp8266com/esp8266/cores/esp8266/pgmspace.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,12 @@ typedef uint32_t prog_uint32_t;
#define strcmp_P(a, b) strcmp((a), (b))
#define strstr_P(a, b) strstr((a), (b))
#define strlen_P(s) strlen((const char *)(s))
#define strcasecmp_P(a, b) strcasecmp((a), (b))
#define strncpy_P(dest, src, size) strncpy((dest), (src), (size))
#define strncat_P(dest, src, size) strncat((dest), (src), (size))
#define strncmp_P(a, b, size) strncmp((a), (b), (size))
#define strnlen_P(s, size) strnlen((const char *)(s), (size))
#define strncasecmp_P(a, b, size) strncasecmp((a), (b), (size))

#define pgm_read_byte(addr) (*(const unsigned char *)(addr))
#define pgm_read_word(addr) (*(const unsigned short *)(addr))
Expand Down