summaryrefslogtreecommitdiff
path: root/common/action_layer.c
diff options
context:
space:
mode:
authortmk <nobody@nowhere>2013-05-14 23:03:23 +0900
committertmk <nobody@nowhere>2013-05-14 23:03:23 +0900
commitcbb9c408e46a7a7a567f3d6e07713256152106d0 (patch)
treebd8e7c789fbb7f191b4de31498160f05d2f80229 /common/action_layer.c
parentb9f558b3d89fc434d6dab348698d5100ff82d16b (diff)
parentff2d276b193632136c785d92ed01df48aea8461f (diff)
downloadqmk_firmware-cbb9c408e46a7a7a567f3d6e07713256152106d0.tar.gz
qmk_firmware-cbb9c408e46a7a7a567f3d6e07713256152106d0.zip
Merge branch 'fix_print'
Diffstat (limited to 'common/action_layer.c')
-rw-r--r--common/action_layer.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/common/action_layer.c b/common/action_layer.c
index 3413c53e65..d24aa2e19f 100644
--- a/common/action_layer.c
+++ b/common/action_layer.c
@@ -1,10 +1,15 @@
#include <stdint.h>
#include "keyboard.h"
#include "action.h"
-#include "debug.h"
#include "util.h"
#include "action_layer.h"
+#ifdef DEBUG_ACTION
+#include "debug.h"
+#else
+#include "nodebug.h"
+#endif
+
/*
* Default Layer State
@@ -22,8 +27,7 @@ static void default_layer_state_set(uint32_t state)
void default_layer_debug(void)
{
- debug_hex32(default_layer_state);
- debug("("); debug_dec(biton32(default_layer_state)); debug(")");
+ dprintf("%08lX(%u)", default_layer_state, biton32(default_layer_state));
}
void default_layer_set(uint8_t layer)
@@ -55,10 +59,10 @@ uint32_t layer_state = 0;
static void layer_state_set(uint32_t state)
{
- debug("layer_state: ");
- layer_debug(); debug(" to ");
+ dprint("layer_state: ");
+ layer_debug(); dprint(" to ");
layer_state = state;
- layer_debug(); debug("\n");
+ layer_debug(); dprintln();
clear_keyboard_but_mods(); // To avoid stuck keys
}
@@ -102,8 +106,7 @@ void layer_xor(uint32_t state)
void layer_debug(void)
{
- debug_hex32(layer_state);
- debug("("); debug_dec(biton32(layer_state)); debug(")");
+ dprintf("%08lX(%u)", layer_state, biton32(layer_state));
}
#endif