desktop: fixed desktop build for strlcat_P() changes

This commit is contained in:
Andrew Tridgell 2011-11-26 17:18:09 +11:00
parent 7fa59a6849
commit f2a0a49d55
2 changed files with 14 additions and 0 deletions

View File

@ -29,6 +29,10 @@ extern int strcasecmp_P(const char *, PGM_P) __ATTR_PURE__;
extern int strcmp_P(const char *, PGM_P) __ATTR_PURE__;
extern size_t strlcat_P (char *, PGM_P, size_t );
extern size_t strnlen_P (PGM_P, size_t );
extern size_t strlen_P (PGM_P);
extern size_t strlen_P (PGM_P);
extern char *strncpy_P(char *dest, PGM_P src, size_t n);
extern void *memcpy_P(void *dest, PGM_P src, size_t n);
static inline uint8_t pgm_read_byte(PGM_P s) { return (uint8_t)*s; }
static inline uint16_t pgm_read_word(const void *s) { return *(const uint16_t *)s; }

View File

@ -72,6 +72,11 @@ size_t strnlen_P(PGM_P str, size_t size)
return strnlen(str, size);
}
size_t strlen_P(PGM_P str)
{
return strlen(str);
}
int strcasecmp_P(PGM_P str1, PGM_P str2)
{
return strcasecmp(str1, str2);
@ -82,6 +87,11 @@ int strcmp_P(PGM_P str1, PGM_P str2)
return strcmp(str1, str2);
}
void *memcpy_P(void *dest, PGM_P src, size_t n)
{
return memcpy(dest, src, n);
}
void digitalWrite(uint8_t pin, uint8_t val)
{