mirror of https://github.com/ArduPilot/ardupilot
AP_Common: added typesafe wrapper for memcpy_P()
This commit is contained in:
parent
57c4385a18
commit
e9c7f8de21
|
@ -110,6 +110,11 @@ static inline size_t strlen_P(const prog_char_t *pstr)
|
||||||
return strlen_P((const prog_char *)pstr);
|
return strlen_P((const prog_char *)pstr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline void *memcpy_P(void *dest, const prog_char_t *src, size_t n)
|
||||||
|
{
|
||||||
|
return memcpy_P(dest, (const prog_char *)src, n);
|
||||||
|
}
|
||||||
|
|
||||||
// strlcat_P() in AVR libc seems to be broken
|
// strlcat_P() in AVR libc seems to be broken
|
||||||
static inline size_t strlcat_P(char *d, const prog_char_t *s, size_t bufsize)
|
static inline size_t strlcat_P(char *d, const prog_char_t *s, size_t bufsize)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue