summaryrefslogtreecommitdiff
path: root/common/action_layer.c
diff options
context:
space:
mode:
authortmk <nobody@nowhere>2013-05-14 16:18:22 +0900
committertmk <nobody@nowhere>2013-05-14 16:19:40 +0900
commitff2d276b193632136c785d92ed01df48aea8461f (patch)
treebd8e7c789fbb7f191b4de31498160f05d2f80229 /common/action_layer.c
parentd9c06db60006e2191d8b86e34f651644a54426b4 (diff)
Use dprint and dprintf for debug
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