summaryrefslogtreecommitdiff
path: root/arch/arm/lpc17xx/mbed/BoardConsole.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/lpc17xx/mbed/BoardConsole.c')
-rw-r--r--arch/arm/lpc17xx/mbed/BoardConsole.c31
1 files changed, 31 insertions, 0 deletions
diff --git a/arch/arm/lpc17xx/mbed/BoardConsole.c b/arch/arm/lpc17xx/mbed/BoardConsole.c
new file mode 100644
index 0000000..3f00c08
--- /dev/null
+++ b/arch/arm/lpc17xx/mbed/BoardConsole.c
@@ -0,0 +1,31 @@
+#include <stdio.h>
+#include <malloc.h>
+#include <stdarg.h>
+#include "BoardConsole.h"
+#include <debug_frmwrk.h>
+
+void BoardConsoleInit() {
+ debug_frmwrk_init();
+}
+
+void BoardConsolePuts(const char * str) {
+ _DBG_(str);
+}
+
+void BoardConsolePutc(int c) {
+ _DBC(c);
+}
+
+void BoardConsolePrintf(const char * fmt, ...) {
+ va_list ap;
+ va_start(ap, fmt);
+ BoardConsoleVPrintf(fmt, ap);
+ va_end(ap);
+}
+
+void BoardConsoleVPrintf(const char * fmt, va_list ap) {
+ char * str = NULL;
+ vasprintf(&str, fmt, ap);
+ _DBG(str);
+ free(str);
+}