aboutsummaryrefslogtreecommitdiff
path: root/tmk_core
diff options
context:
space:
mode:
authorJoel Challis <git@zvecr.com>2019-11-09 02:23:26 +0000
committerDrashna Jaelre <drashna@live.com>2019-11-08 18:23:26 -0800
commitc1970e284d9718a62a973442ec9f0801365cff60 (patch)
treedecd82321b3137faf26d2a11de2dfcd9940b8a32 /tmk_core
parent20753706337630c6be4757e322b7da90f5f030cf (diff)
downloadqmk_firmware-c1970e284d9718a62a973442ec9f0801365cff60.tar.gz
qmk_firmware-c1970e284d9718a62a973442ec9f0801365cff60.zip
Fix LAYER_STATE_8BIT compile issues (#7304)
Diffstat (limited to 'tmk_core')
-rw-r--r--tmk_core/common/action_layer.c2
-rw-r--r--tmk_core/common/action_layer.h2
-rw-r--r--tmk_core/common/eeconfig.c2
3 files changed, 3 insertions, 3 deletions
diff --git a/tmk_core/common/action_layer.c b/tmk_core/common/action_layer.c
index 07d78c56d..4c7d15cd5 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) {
268 /* fall back to layer 0 */ 268 /* fall back to layer 0 */
269 return 0; 269 return 0;
270#else 270#else
271 return biton32(default_layer_state); 271 return get_highest_layer(default_layer_state);
272#endif 272#endif
273} 273}
274 274
diff --git a/tmk_core/common/action_layer.h b/tmk_core/common/action_layer.h
index fee9b244d..b8562f5a4 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/>.
23 23
24#if defined(LAYER_STATE_8BIT) 24#if defined(LAYER_STATE_8BIT)
25typedef uint8_t layer_state_t; 25typedef uint8_t layer_state_t;
26# define get_highest_layer(state) biton8(state) 26# define get_highest_layer(state) biton(state)
27#elif defined(LAYER_STATE_16BIT) 27#elif defined(LAYER_STATE_16BIT)
28typedef uint16_t layer_state_t; 28typedef uint16_t layer_state_t;
29# define get_highest_layer(state) biton16(state) 29# define get_highest_layer(state) biton16(state)
diff --git a/tmk_core/common/eeconfig.c b/tmk_core/common/eeconfig.c
index 4cf4ca3ac..72f198d6c 100644
--- a/tmk_core/common/eeconfig.c
+++ b/tmk_core/common/eeconfig.c
@@ -2,13 +2,13 @@
2#include <stdbool.h> 2#include <stdbool.h>
3#include "eeprom.h" 3#include "eeprom.h"
4#include "eeconfig.h" 4#include "eeconfig.h"
5#include "action_layer.h"
5 6
6#ifdef STM32_EEPROM_ENABLE 7#ifdef STM32_EEPROM_ENABLE
7# include "hal.h" 8# include "hal.h"
8# include "eeprom_stm32.h" 9# include "eeprom_stm32.h"
9#endif 10#endif
10 11
11extern uint32_t default_layer_state;
12/** \brief eeconfig enable 12/** \brief eeconfig enable
13 * 13 *
14 * FIXME: needs doc 14 * FIXME: needs doc