]> 4ch.mooo.com Git - 16.git/blobdiff - src/lib/16_dbg.h
add printf-like _DEBUGF() function for debugging, too
[16.git] / src / lib / 16_dbg.h
index b8c39f6f647f47c6dffad34516a9d34d9fa913f6..9aaf9644c1757ef922bec2c51c10d536e9dd290a 100644 (file)
@@ -1,10 +1,17 @@
 
-#ifdef DEBUGSERIAL
-# include <hw/8250/8250.h>
+#ifndef _SRC_LIB_16_DBG
+#define _SRC_LIB_16_DBG
 
+# ifdef DEBUGSERIAL
+#  include <hw/8250/8250.h>
+
+void _DEBUGF(const char *fmt,...);
 void _DEBUG(const char *msg);
 int _DEBUG_INIT();
-#else
+# else
+static inline void _DEBUGF(const char *fmt,...) {
+       // NOTHING
+}
 static inline void _DEBUG(const char *msg) {
        // NOTHING
 }
@@ -13,5 +20,6 @@ static inline int _DEBUG_INIT() {
        // NOTHING
        return -1;
 }
-#endif
+# endif
+#endif // _SRC_LIB_16_DBG