]> 4ch.mooo.com Git - 16.git/blobdiff - src/lib/16_dbg.h
in case where DEBUGSERIAL is not defined, make sure stubs compile
[16.git] / src / lib / 16_dbg.h
index b8c39f6f647f47c6dffad34516a9d34d9fa913f6..e408ac0ca84e8c3f52fa437bd47998ab71fc4260 100644 (file)
@@ -1,10 +1,13 @@
 
-#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 _DEBUG(const char *msg);
 int _DEBUG_INIT();
-#else
+# else
 static inline void _DEBUG(const char *msg) {
        // NOTHING
 }
@@ -13,5 +16,6 @@ static inline int _DEBUG_INIT() {
        // NOTHING
        return -1;
 }
-#endif
+# endif
+#endif // _SRC_LIB_16_DBG