diff --git a/inc/debug.h b/inc/debug.h index 4f24e20..07512b5 100644 --- a/inc/debug.h +++ b/inc/debug.h @@ -8,12 +8,13 @@ #ifdef DEBUG #define TRACEF(disp, text, ...) dbg_printf(disp, text, __VA_ARGS__); - #define TRACE(disp, text) printText(text, 3, -1, disp); + #define TRACE(disp, text) dbg_print(disp, text); #else - #define TRACEF(disp, text, ...) do { if (0) dbg_printf(disp, text, __VA_ARGS__); sleep(5000); } while (0) - #define TRACE(disp, text) do { if (0) printText(text, 3, -1, disp); } didplay_show(disp); sleep(5000); while (0) + #define TRACEF(disp, text, ...) do { if (0) dbg_printf(disp, text, __VA_ARGS__); } while (0) + #define TRACE(disp, text) do { if (0) dbg_print(disp, text); } while (0) #endif void dbg_printf(display_context_t disp, const char *fmt, ...); +void dbg_print(display_context_t disp, char *fmt); #endif diff --git a/src/debug.c b/src/debug.c index 97a6b59..dba46cc 100644 --- a/src/debug.c +++ b/src/debug.c @@ -21,4 +21,12 @@ void dbg_printf(display_context_t disp, const char *fmt, ...) printText(tmp, 3, -1, disp); display_show(disp); sleep(3000); +} + + +void dbg_print(display_context_t disp, char *fmt) +{ + printText(fmt, 3, -1, disp); + display_show(disp); + sleep(3000); } \ No newline at end of file