summaryrefslogtreecommitdiffstats
path: root/common/debug.h
diff options
context:
space:
mode:
authortmk <nobody@nowhere>2012-09-04 07:24:52 +0200
committertmk <nobody@nowhere>2012-09-04 07:24:52 +0200
commitdc79a8521946a3a2e5b86945b8043b87a8b8d78c (patch)
tree737827112555c00a7f2ebbb88e61079c460be71a /common/debug.h
parent7350b7c6aa300a234244c264b10d1732803c27df (diff)
parent232ab308e358e41f3253d66fa009c1ebca0951a2 (diff)
downloadqmk_firmware-dc79a8521946a3a2e5b86945b8043b87a8b8d78c.tar.gz
qmk_firmware-dc79a8521946a3a2e5b86945b8043b87a8b8d78c.tar.xz
Merge branch 'usb_hid'
Diffstat (limited to 'common/debug.h')
-rw-r--r--common/debug.h19
1 files changed, 14 insertions, 5 deletions
diff --git a/common/debug.h b/common/debug.h
index 230d3b349..9cc8d882f 100644
--- a/common/debug.h
+++ b/common/debug.h
@@ -18,19 +18,28 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#ifndef DEBUG_H
#define DEBUG_H 1
+#include <stdbool.h>
#include "print.h"
-#define debug(s) if(debug_enable) print(s)
+#define debug(s) if(debug_enable) print_P(PSTR(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