diff options
Diffstat (limited to 'firmware/common/string.c')
-rw-r--r-- | firmware/common/string.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/firmware/common/string.c b/firmware/common/string.c new file mode 100644 index 0000000000..373aa92273 --- /dev/null +++ b/firmware/common/string.c | |||
@@ -0,0 +1,19 @@ | |||
1 | /* For archs that lack assembly optimized versions of those */ | ||
2 | |||
3 | #include "string.h" | ||
4 | |||
5 | _PTR _EXFUN(memset,(_PTR, int, size_t)); | ||
6 | |||
7 | _PTR memset(_PTR data, int val, size_t count) | ||
8 | { | ||
9 | for (int i=0; i < count; i++) | ||
10 | ((char*)data)[i] = val; | ||
11 | return data; | ||
12 | } | ||
13 | |||
14 | _PTR memcpy(_PTR dst, const _PTR src, size_t count) | ||
15 | { | ||
16 | for (int i=0; i < count; i++) | ||
17 | ((char*)dst)[i] = ((char*)src)[i]; | ||
18 | return dst; | ||
19 | } | ||