From e0eecc6834daa62e635403666612079ffe0f9818 Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Fri, 17 May 2019 15:28:11 -0700 Subject: [PATCH] Additional changes for Layer State typedef compatibility --- quantum/quantum.c | 6 +++--- quantum/quantum.h | 2 +- tmk_core/common/action_layer.h | 3 +++ 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/quantum/quantum.c b/quantum/quantum.c index 4d80cc1470..da48337e4b 100644 --- a/quantum/quantum.c +++ b/quantum/quantum.c @@ -881,9 +881,9 @@ void set_single_persistent_default_layer(uint8_t default_layer) { default_layer_set(1U<. #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