summaryrefslogtreecommitdiff
path: root/fw/base.c
diff options
context:
space:
mode:
authorjaseg <git@jaseg.net>2020-10-11 23:31:12 +0200
committerjaseg <git@jaseg.net>2020-10-11 23:31:12 +0200
commit226fef1618dd9a37c050bb79a24c77396cd14c46 (patch)
treeed1d41cd5268e607ecd2abe8e628a1e796fda838 /fw/base.c
parent0e25682ed73ead8da26ea8659492bd5bce3cfe64 (diff)
downloadusb-remote-226fef1618dd9a37c050bb79a24c77396cd14c46.tar.gz
usb-remote-226fef1618dd9a37c050bb79a24c77396cd14c46.tar.bz2
usb-remote-226fef1618dd9a37c050bb79a24c77396cd14c46.zip
Initial fw commit
Diffstat (limited to 'fw/base.c')
-rw-r--r--fw/base.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/fw/base.c b/fw/base.c
new file mode 100644
index 0000000..8e7c03b
--- /dev/null
+++ b/fw/base.c
@@ -0,0 +1,25 @@
+
+#include <unistd.h>
+#include <stdbool.h>
+
+int __errno = 0;
+void *_impure_ptr = NULL;
+
+void __sinit(void) {
+}
+
+void *memset(void *s, int c, size_t n) {
+ char *end = (char *)s + n;
+ for (char *p = (char *)s; p < end; p++)
+ *p = (char)c;
+ return s;
+}
+
+size_t strlen(const char *s) {
+ const char *start = s;
+ while (*s++);
+ return s - start - 1;
+}
+
+void __assert_func(bool value) {
+}