X-Git-Url: https://git.friedersdorff.com/?a=blobdiff_plain;ds=inline;f=common%2Fdebug.h;h=1d56e21f77e6a69011dccb57d45769a93b093631;hb=edce1d19a6af040df994243e7b6b1851e3eccebc;hp=230d3b3499b7c1ae3ccb8002d7a1f9f0901235c2;hpb=62d1ebb91c7b381ce3d88aad9ee0b03bea9fce26;p=max%2Ftmk_keyboard.git
diff --git a/common/debug.h b/common/debug.h
index 230d3b34..1d56e21f 100644
--- a/common/debug.h
+++ b/common/debug.h
@@ -18,19 +18,30 @@ along with this program. If not, see .
#ifndef DEBUG_H
#define DEBUG_H 1
+#include
#include "print.h"
-#define debug(s) if(debug_enable) print(s)
+#define debug(s) if(debug_enable) print_P(PSTR(s))
+#define debug_P(s) if(debug_enable) print_P(s)
+#define debug_S(s) if(debug_enable) print_S(s)
#define debug_hex(c) if(debug_enable) phex(c)
#define debug_hex16(i) if(debug_enable) phex16(i)
#define debug_bin(c) if(debug_enable) pbin(c)
#define debug_bin_reverse(c) if(debug_enable) pbin_reverse(c)
-bool debug_enable;
-bool debug_matrix;
-bool debug_keyboard;
-bool debug_mouse;
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+extern bool debug_enable;
+extern bool debug_matrix;
+extern bool debug_keyboard;
+extern bool debug_mouse;
+
+#ifdef __cplusplus
+}
+#endif
#endif