diff options
author | tmk <nobody@nowhere> | 2013-03-20 00:26:01 +0900 |
---|---|---|
committer | tmk <nobody@nowhere> | 2013-03-20 00:26:01 +0900 |
commit | b057511f45de020c43021f2991569a53c2b929c9 (patch) | |
tree | f68be1f393692a9235a76f6d98739d8a614ad13c /common | |
parent | 16870412679225d1a3b46c78928757deb713ae08 (diff) | |
download | qmk_firmware-b057511f45de020c43021f2991569a53c2b929c9.tar.gz qmk_firmware-b057511f45de020c43021f2991569a53c2b929c9.zip |
Add NO_ACTION_OVERLAY config option
Diffstat (limited to 'common')
-rw-r--r-- | common/action.c | 2 | ||||
-rw-r--r-- | common/layer_switch.c | 4 | ||||
-rw-r--r-- | common/layer_switch.h | 15 |
3 files changed, 21 insertions, 0 deletions
diff --git a/common/action.c b/common/action.c index 4fafbfa79f..1b84d1e884 100644 --- a/common/action.c +++ b/common/action.c @@ -517,6 +517,7 @@ static void process_action(keyrecord_t *record) } break; +#ifndef NO_ACTION_OVERLAY case ACT_OVERLAY: switch (action.layer.code) { // Overlay Invert bit4 @@ -670,6 +671,7 @@ static void process_action(keyrecord_t *record) break; } break; +#endif /* Extentions */ case ACT_MACRO: diff --git a/common/layer_switch.c b/common/layer_switch.c index 19e286f885..815d1e5f28 100644 --- a/common/layer_switch.c +++ b/common/layer_switch.c @@ -98,6 +98,7 @@ void keymap_debug(void) +#ifndef NO_ACTION_OVERLAY /* * Overlay Layer (16-31 = 0-15|0x10) */ @@ -169,12 +170,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,6 +187,7 @@ action_t layer_switch_get_action(key_t key) } } } +#endif /* keymap: top layer first */ for (int8_t i = 15; i >= 0; i--) { diff --git a/common/layer_switch.h b/common/layer_switch.h index a566ab12b7..5de6cb01c3 100644 --- a/common/layer_switch.h +++ b/common/layer_switch.h @@ -57,6 +57,7 @@ void keymap_debug(void); /* * Overlay Layer */ +#ifndef NO_ACTION_OVERLAY extern uint16_t overlay_stat; /* return current active layer */ uint8_t overlay_get_layer(void); @@ -71,6 +72,20 @@ void overlay_or(uint16_t stat); void overlay_and(uint16_t stat); void overlay_xor(uint16_t stat); void overlay_debug(void); +#else +#define overlay_stat 0 +#define overlay_get_layer() +#define overlay_clear() +#define overlay_set(stat) +#define overlay_move(layer) +#define overlay_on(layer) +#define overlay_off(layer) +#define overlay_invert(layer) +#define overlay_or(stat) +#define overlay_and(stat) +#define overlay_xor(stat) +#define overlay_debug() +#endif |