- Main Page
- Related Pages
- Data Structures
- Files

- File List
- Globals

# drivers/console/debug.c

Go to the documentation of this file.

    00001
    00045 #include <debug.h>
    00046 #include <console/core.h>
    00047 #include <console/serial.h>
    00048
    00053 static struct console debug_console;
    00054
    00068 int dbg_priv_vprintf(const char *format, va_list ap)
    00069 {
    00070         return console_vprintf(&debug_console, format, ap);
    00071 }
    00072
    00085 int dbg_priv_printf(const char *format, ...)
    00086 {
    00087         va_list ap;
    00088         int n;
    00089
    00090         va_start(ap, format);
    00091         n = dbg_priv_vprintf(format, ap);
    00092         va_end(ap);
    00093
    00094         return n;
    00095 }
    00096
    00105 int dbg_priv_putstr(const char *str)
    00106 {
    00107         return console_putstr(&debug_console, str);
    00108 }
    00109
    00118 int dbg_priv_putchar(int c)
    00119 {
    00120         return console_putchar(&debug_console, c);
    00121 }
    00122
    00130 void dbg_init(void)
    00131 {
    00132         serial_console_init(&debug_console, CONFIG_DEBUG_CONSOLE_USART,
    00133                         CONFIG_DEBUG_CONSOLE_BAUD_RATE, SERIAL_ENABLE_TX);
    00134 }