memcpy_P missing from pgmspace.h for Teensy 3

matt

Member
As the title says.

I added the following to ..\cores\teensy3\avr\pgmspace.h
Code:
#define memcpy_P(a, b, c) memcpy((a), (b), (c))

I believe this is correct since there is no separation of data and program space in the ARM, so we don't need separate _P functions.
Can this be added to a future release please?
 
Hello,

There were a few functions that were missing when I tried to compile my sketch ported from a duino. I tried adding similarly to pgmspace.h, however I have never added functions to pgmspace.h, not sure if I did it correctly. Can you confirm that this is the correct way to do this?

#define strcasestr_P(a,b) strcasestr((a),(b))
#define strncasecmp_P(a,b,num) strncasecmp((a),(b),(num))
#define memcmp_P(dest, src, num) memcmp((dest), (src), (num))

Thanks,

-ren
 
Back
Top