summaryrefslogtreecommitdiff
path: root/tmk_core/common
diff options
context:
space:
mode:
authorDrashna Jaelre <drashna@live.com>2019-05-17 15:28:11 -0700
committerFlorian Didron <fdidron@users.noreply.github.com>2019-07-27 11:25:58 +0900
commite0eecc6834daa62e635403666612079ffe0f9818 (patch)
treeefa9e99dbe99fecbfb21f540da590bb5935945a3 /tmk_core/common
parent04eb1226b926a0da04f3cd2df799c303773cb054 (diff)
Additional changes for Layer State typedef compatibility
Diffstat (limited to 'tmk_core/common')
-rw-r--r--tmk_core/common/action_layer.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/tmk_core/common/action_layer.h b/tmk_core/common/action_layer.h
index 7fa30c86d6..1ecc0974da 100644
--- a/tmk_core/common/action_layer.h
+++ b/tmk_core/common/action_layer.h
@@ -23,10 +23,13 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#if defined(LAYER_STATE_8BIT) || ( defined(DYNAMIC_KEYMAP_ENABLE) && DYNAMIC_KEYMAP_LAYER_COUNT >= 8 )
typedef uint8_t layer_state_t;
+#define get_highest_layer(state) biton8(state)
#elif defined(LAYER_STATE_16BIT)
typedef uint16_t layer_state_t;
+#define get_highest_layer(state) biton16(state)
#else
typedef uint32_t layer_state_t;
+#define get_highest_layer(state) biton32(state)
#endif