summaryrefslogtreecommitdiff
path: root/arch/arm/lpc17xx/mbed/BoardConsole.c
blob: 3f00c08f8913fb409a97aa628f6f48947f12f33b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
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);
}