From 1620d78e73f8e01ed1d48255c655d9eb6cc1b135 Mon Sep 17 00:00:00 2001 From: "Colin T.A. Gray" Date: Tue, 5 Dec 2017 11:59:53 -0700 Subject: helper to compare current layer_state to user layer Performs the same bit comparison that the layer_move functions perform --- tmk_core/common/action_layer.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'tmk_core/common/action_layer.h') diff --git a/tmk_core/common/action_layer.h b/tmk_core/common/action_layer.h index e71604d872..5fad18cbd6 100644 --- a/tmk_core/common/action_layer.h +++ b/tmk_core/common/action_layer.h @@ -51,6 +51,8 @@ void default_layer_xor(uint32_t state); extern uint32_t layer_state; void layer_debug(void); void layer_clear(void); +bool layer_state_is(uint8_t layer); +bool layer_state_cmp(uint32_t layer1, uint8_t layer2); void layer_move(uint8_t layer); void layer_on(uint8_t layer); void layer_off(uint8_t layer); -- cgit v1.2.3