diff options
author | Joel Challis <git@zvecr.com> | 2019-11-09 02:23:26 +0000 |
---|---|---|
committer | Florian Didron <fdidron@users.noreply.github.com> | 2020-01-09 08:57:11 +0900 |
commit | 5aa1d81b15688c40ef05827eb80d40d790debd32 (patch) | |
tree | d264279c1427b77868dd339634565a25c1b1f772 /tmk_core/common | |
parent | df91396be99ea4bd916c8671d233d75d3d67aa18 (diff) |
Fix LAYER_STATE_8BIT compile issues (#7304)
Diffstat (limited to 'tmk_core/common')
-rw-r--r-- | tmk_core/common/action_layer.c | 2 | ||||
-rw-r--r-- | tmk_core/common/action_layer.h | 2 | ||||
-rw-r--r-- | 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 07d78c56d4..4c7d15cd50 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 fee9b244df..b8562f5a46 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 <http://www.gnu.org/licenses/>. #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 4369e44ac2..72f198d6ce 100644 --- a/tmk_core/common/eeconfig.c +++ b/tmk_core/common/eeconfig.c @@ -2,13 +2,13 @@ #include <stdbool.h> #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 |