summaryrefslogtreecommitdiff
path: root/base.c
diff options
context:
space:
mode:
authorjaseg <git@jaseg.net>2020-08-30 15:27:11 +0200
committerjaseg <git@jaseg.net>2020-08-30 15:27:11 +0200
commitcbb4ac1178362f61f854fd13f46ee0138c5d73ba (patch)
tree5c9f8e95a591e59fe623420e3e77919a41c657f0 /base.c
parentc7cfa7c057c916843469c539eeaddf762cb0d720 (diff)
downloadmoargb-cbb4ac1178362f61f854fd13f46ee0138c5d73ba.tar.gz
moargb-cbb4ac1178362f61f854fd13f46ee0138c5d73ba.tar.bz2
moargb-cbb4ac1178362f61f854fd13f46ee0138c5d73ba.zip
make usb work with weird opencm3 hybridHEADmaster
Diffstat (limited to 'base.c')
-rw-r--r--base.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/base.c b/base.c
index 8e7c03b..8d095be 100644
--- a/base.c
+++ b/base.c
@@ -15,6 +15,16 @@ void *memset(void *s, int c, size_t n) {
return s;
}
+void *memcpy(void *dest, const void *src, size_t n) {
+ uint8_t *out = (uint8_t *)dest;
+ const uint8_t *in = (const uint8_t *)src;
+
+ while (n--)
+ *out++ = *in++;
+
+ return dest;
+}
+
size_t strlen(const char *s) {
const char *start = s;
while (*s++);