From a1f6f3f277f7e79bf10e196494a8d6dfa6123cfa Mon Sep 17 00:00:00 2001 From: Pixel Date: Tue, 25 Jan 2011 07:09:44 -0800 Subject: More consistent makefiles includes. Adding BoardConsole for basic console output general API. Starting up console from the boot sequence. --- arch/arm/lpc17xx/mbed/BoardConsole.c | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 arch/arm/lpc17xx/mbed/BoardConsole.c (limited to 'arch/arm/lpc17xx/mbed/BoardConsole.c') 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 +#include +#include +#include "BoardConsole.h" +#include + +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); +} -- cgit v1.2.3