diff options
| author | tmk <nobody@nowhere> | 2012-08-25 15:49:08 +0900 |
|---|---|---|
| committer | tmk <nobody@nowhere> | 2012-08-28 21:56:15 +0900 |
| commit | c5060ea81942b0e3f8577536ff78402a19abe3d3 (patch) | |
| tree | bcdd4cd269be3064982014b0afdc0aea628d7048 /common/debug.h | |
| parent | 9382bf2f765cfbb8f7a9a48157391cac2bb71780 (diff) | |
| download | qmk_firmware-c5060ea81942b0e3f8577536ff78402a19abe3d3.tar.gz qmk_firmware-c5060ea81942b0e3f8577536ff78402a19abe3d3.zip | |
test build of 'Host shield' in minimal env.
Diffstat (limited to 'common/debug.h')
| -rw-r--r-- | common/debug.h | 19 |
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 | ||
| 31 | bool debug_enable; | 32 | #ifdef __cplusplus |
| 32 | bool debug_matrix; | 33 | extern "C" { |
| 33 | bool debug_keyboard; | 34 | #endif |
| 34 | bool debug_mouse; | 35 | |
| 36 | extern bool debug_enable; | ||
| 37 | extern bool debug_matrix; | ||
| 38 | extern bool debug_keyboard; | ||
| 39 | extern bool debug_mouse; | ||
| 40 | |||
| 41 | #ifdef __cplusplus | ||
| 42 | } | ||
| 43 | #endif | ||
| 35 | 44 | ||
| 36 | #endif | 45 | #endif |
