diff options
author | tmk <nobody@nowhere> | 2013-03-21 15:44:33 +0900 |
---|---|---|
committer | tmk <nobody@nowhere> | 2013-03-21 15:44:33 +0900 |
commit | 2b08a150a41e25e87362436b7307bb1be35529f3 (patch) | |
tree | e176fafe0e7723612f7fb34b88105ea892f35404 /common/layer_switch.c | |
parent | 8580c8d291a432d5004c46321aa3c1b1626cdadd (diff) | |
parent | b2a19328ad35f51dcc9cef7c4d2801acd143582a (diff) | |
download | firmware-2b08a150a41e25e87362436b7307bb1be35529f3.tar.gz firmware-2b08a150a41e25e87362436b7307bb1be35529f3.tar.bz2 firmware-2b08a150a41e25e87362436b7307bb1be35529f3.zip |
Merge branch 'add_build_options'
Diffstat (limited to 'common/layer_switch.c')
-rw-r--r-- | common/layer_switch.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/common/layer_switch.c b/common/layer_switch.c index 19e286f88..a5d426a89 100644 --- a/common/layer_switch.c +++ b/common/layer_switch.c @@ -24,6 +24,7 @@ void default_layer_set(uint8_t layer) } +#ifndef NO_ACTION_KEYMAP /* * Keymap Layer (0-15) */ @@ -95,9 +96,11 @@ void keymap_debug(void) { debug_hex16(keymap_stat); debug("("); debug_dec(keymap_get_layer()); debug(")"); } +#endif +#ifndef NO_ACTION_OVERLAY /* * Overlay Layer (16-31 = 0-15|0x10) */ @@ -169,12 +172,14 @@ void overlay_debug(void) { debug_hex16(overlay_stat); debug("("); debug_dec(overlay_get_layer()); debug(")"); } +#endif action_t layer_switch_get_action(key_t key) { action_t action; action.code = ACTION_TRANSPARENT; +#ifndef NO_ACTION_OVERLAY /* overlay: top layer first */ for (int8_t i = 15; i >= 0; i--) { if (overlay_stat & (1<<i)) { @@ -184,7 +189,9 @@ action_t layer_switch_get_action(key_t key) } } } +#endif +#ifndef NO_ACTION_KEYMAP /* keymap: top layer first */ for (int8_t i = 15; i >= 0; i--) { if (keymap_stat & (1<<i)) { @@ -194,6 +201,7 @@ action_t layer_switch_get_action(key_t key) } } } +#endif /* default layer */ action = action_for_key(default_layer, key); |