quark/src/kernel/lib/debug.c
Arnau Camprubí 109b5b17a1 Added debug_printf()
The debug_printf() function works just as any printf-like function. It prints to the serial port using ANSI coloring. Also, debug_vprintf() was implemented, which takes arguments as a va_list instead of as variadic arguments.
2022-08-07 21:58:36 +02:00

15 líneas
289 B
C

#include "debug.h"
#include "stdio.h"
void debug_printf(char *fmt, ...){
va_list args;
va_start(args, fmt);
debug_vprintf(fmt, args);
}
void debug_vprintf(char *fmt, va_list args){
serial_printf("\x1b[34m");
serial_vprintf(fmt, args);
serial_printf("\x1b[0m");
}