aboutsummaryrefslogtreecommitdiff
path: root/src/arm/common/strings.h
diff options
context:
space:
mode:
authorvetch <vetch97@gmail.com>2020-01-13 12:40:38 +0100
committervetch <vetch97@gmail.com>2020-01-13 12:40:38 +0100
commit1af7591e37d09ddcd734ea07d0e999cf61c8bc5e (patch)
treea56c73c9eddeb148baffc3a31bf50edbbeb31074 /src/arm/common/strings.h
parent300cf770698142b636da867b7e04bf2d6ae9baa4 (diff)
downloadrpi-MMU-example-1af7591e37d09ddcd734ea07d0e999cf61c8bc5e.tar.gz
rpi-MMU-example-1af7591e37d09ddcd734ea07d0e999cf61c8bc5e.zip
Great Reorganisation, modify structure and makefile
Diffstat (limited to 'src/arm/common/strings.h')
-rw-r--r--src/arm/common/strings.h33
1 files changed, 33 insertions, 0 deletions
diff --git a/src/arm/common/strings.h b/src/arm/common/strings.h
new file mode 100644
index 0000000..aff0533
--- /dev/null
+++ b/src/arm/common/strings.h
@@ -0,0 +1,33 @@
+#ifndef STRINGS_H
+#define STRINGS_H
+
+#include <stddef.h>
+#include <stdint.h>
+
+void uint32_to_dec(uint32_t number, char buf[10]);
+
+void uint32_to_hex(uint32_t number, char buf[8]);
+
+void uint32_to_bin(uint32_t number, char buf[32]);
+
+void uint32_to_decstring(uint32_t number, char buf[11]);
+
+void uint32_to_hexstring(uint32_t number, char buf[9]);
+
+void uint32_to_binstring(uint32_t number, char buf[33]);
+
+void trim_0s(char string[]);
+
+void uint32_to_decstringt(uint32_t number, char buf[11]);
+
+void uint32_to_hexstringt(uint32_t number, char buf[9]);
+
+size_t strlen(char string[]);
+
+void memcpy(void *dst, void *src, size_t nbytes);
+
+void *memset(void *s, int c, size_t n);
+
+char *strcat(char *dst, const char *src);
+
+#endif // STRINGS_H