réplica de
https://github.com/Arnau478/quark.git
synced 2024-05-20 04:46:30 +02:00
Arnau Camprubí
109b5b17a1
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.
15 líneas
289 B
C
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");
|
|
}
|