aboutsummaryrefslogtreecommitdiff
path: root/common/debug.h
diff options
context:
space:
mode:
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/>.
18#ifndef DEBUG_H 18#ifndef DEBUG_H
19#define DEBUG_H 1 19#define DEBUG_H 1
20 20
21#include <stdbool.h>
21#include "print.h" 22#include "print.h"
22 23
23 24
24#define debug(s) if(debug_enable) print(s) 25#define debug(s) if(debug_enable) print_P(PSTR(s))
25#define debug_hex(c) if(debug_enable) phex(c) 26#define debug_hex(c) if(debug_enable) phex(c)
26#define debug_hex16(i) if(debug_enable) phex16(i) 27#define debug_hex16(i) if(debug_enable) phex16(i)
27#define debug_bin(c) if(debug_enable) pbin(c) 28#define debug_bin(c) if(debug_enable) pbin(c)
28#define debug_bin_reverse(c) if(debug_enable) pbin_reverse(c) 29#define debug_bin_reverse(c) if(debug_enable) pbin_reverse(c)
29 30
30 31
31bool debug_enable; 32#ifdef __cplusplus
32bool debug_matrix; 33extern "C" {
33bool debug_keyboard; 34#endif
34bool debug_mouse; 35
36extern bool debug_enable;
37extern bool debug_matrix;
38extern bool debug_keyboard;
39extern bool debug_mouse;
40
41#ifdef __cplusplus
42}
43#endif
35 44
36#endif 45#endif