From c1970e284d9718a62a973442ec9f0801365cff60 Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Sat, 9 Nov 2019 02:23:26 +0000 Subject: [PATCH] Fix LAYER_STATE_8BIT compile issues (#7304) --- tmk_core/common/action_layer.c | 2 +- tmk_core/common/action_layer.h | 2 +- tmk_core/common/eeconfig.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tmk_core/common/action_layer.c b/tmk_core/common/action_layer.c index 07d78c56d4f9c50a187a0fb3da95be40300b51df..4c7d15cd50f99d7cc29639be2b39dd328e4defba 100644 --- a/tmk_core/common/action_layer.c +++ b/tmk_core/common/action_layer.c @@ -268,7 +268,7 @@ uint8_t layer_switch_get_layer(keypos_t key) { /* fall back to layer 0 */ return 0; #else - return biton32(default_layer_state); + return get_highest_layer(default_layer_state); #endif } diff --git a/tmk_core/common/action_layer.h b/tmk_core/common/action_layer.h index fee9b244df001dd938f9ea064006a3a72ea4619b..b8562f5a46f57e38d6a2418d338bce510f8289d6 100644 --- a/tmk_core/common/action_layer.h +++ b/tmk_core/common/action_layer.h @@ -23,7 +23,7 @@ along with this program. If not, see . #if defined(LAYER_STATE_8BIT) typedef uint8_t layer_state_t; -# define get_highest_layer(state) biton8(state) +# define get_highest_layer(state) biton(state) #elif defined(LAYER_STATE_16BIT) typedef uint16_t layer_state_t; # define get_highest_layer(state) biton16(state) diff --git a/tmk_core/common/eeconfig.c b/tmk_core/common/eeconfig.c index 4cf4ca3acea5a90eae8889677073420e2d2b9538..72f198d6cec997b1677e8a191d705e79a7678f72 100644 --- a/tmk_core/common/eeconfig.c +++ b/tmk_core/common/eeconfig.c @@ -2,13 +2,13 @@ #include #include "eeprom.h" #include "eeconfig.h" +#include "action_layer.h" #ifdef STM32_EEPROM_ENABLE # include "hal.h" # include "eeprom_stm32.h" #endif -extern uint32_t default_layer_state; /** \brief eeconfig enable * * FIXME: needs doc