summaryrefslogtreecommitdiffstats
path: root/tmk_core/common/action_layer.h
diff options
context:
space:
mode:
authorWojciech Siewierski <wojciech.siewierski@onet.pl>2016-04-05 10:54:47 +0200
committerWojciech Siewierski <wojciech.siewierski@onet.pl>2016-04-05 11:08:04 +0200
commit567f256c5d4598adb4dcd63fa4e4a7b4df553b12 (patch)
treea9999db4f3d600d230227e6b4f4c22013dd325b8 /tmk_core/common/action_layer.h
parent47dd29513eeec7b7f639bef6df441a905ce8bacb (diff)
downloadqmk_firmware-567f256c5d4598adb4dcd63fa4e4a7b4df553b12.tar.gz
qmk_firmware-567f256c5d4598adb4dcd63fa4e4a7b4df553b12.tar.xz
Refactor the source layer cache encoding
Diffstat (limited to 'tmk_core/common/action_layer.h')
-rw-r--r--tmk_core/common/action_layer.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/tmk_core/common/action_layer.h b/tmk_core/common/action_layer.h
index 1a313a259..3a4b1e334 100644
--- a/tmk_core/common/action_layer.h
+++ b/tmk_core/common/action_layer.h
@@ -70,6 +70,14 @@ void layer_xor(uint32_t state);
#define layer_debug()
#endif
+/* pressed actions cache */
+#if !defined(NO_ACTION_LAYER) && defined(PREVENT_STUCK_MODIFIERS)
+/* The number of bits needed to represent the layer number: log2(32). */
+#define MAX_LAYER_BITS 5
+void update_source_layers_cache(keypos_t key, uint8_t layer);
+uint8_t read_source_layers_cache(keypos_t key);
+#endif
+action_t store_or_get_action(bool pressed, keypos_t key);
/* return the topmost non-transparent layer currently associated with key */
int8_t layer_switch_get_layer(keypos_t key);