summaryrefslogtreecommitdiffstats
path: root/Src/osmocombb/src/target/firmware/lib/printf.c
diff options
context:
space:
mode:
Diffstat (limited to 'Src/osmocombb/src/target/firmware/lib/printf.c')
-rw-r--r--Src/osmocombb/src/target/firmware/lib/printf.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/Src/osmocombb/src/target/firmware/lib/printf.c b/Src/osmocombb/src/target/firmware/lib/printf.c
new file mode 100644
index 0000000..a4fc687
--- /dev/null
+++ b/Src/osmocombb/src/target/firmware/lib/printf.c
@@ -0,0 +1,19 @@
+
+#include <stdio.h>
+#include <stdarg.h>
+
+static char printf_buffer[1024];
+
+int printf(const char *fmt, ...)
+{
+ va_list args;
+ int r;
+
+ va_start(args, fmt);
+ r = vsnprintf(printf_buffer, sizeof(printf_buffer), fmt, args);
+ va_end(args);
+
+ puts(printf_buffer);
+
+ return r;
+}