summaryrefslogtreecommitdiff
path: root/tmk_core
diff options
context:
space:
mode:
authorDrashna Jaelre <drashna@live.com>2019-08-21 17:07:49 -0700
committerGitHub <noreply@github.com>2019-08-21 17:07:49 -0700
commitb62e160a8950f451b08f1fee0109e60a58c5ddaa (patch)
tree897619679d73edd3a5c62bc528f1bfaaf974b96b /tmk_core
parentd534c72a544454132b3c6c05af85c821f6a93d65 (diff)
Additional changes for Layer State typedef compatibility (#5906)
* Additional changes for Layer State typedef compatibility * Replace biton32 with get_highest_layer in docs * Change additional layer structure code * Fix uGFX reference issue * Remove dynamic_keymap check * Where did all these extra spaces come from Co-Authored-By: fauxpark <fauxpark@gmail.com>
Diffstat (limited to 'tmk_core')
-rw-r--r--tmk_core/common/action_layer.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/tmk_core/common/action_layer.h b/tmk_core/common/action_layer.h
index 7fa30c86d6..a2734a29ee 100644
--- a/tmk_core/common/action_layer.h
+++ b/tmk_core/common/action_layer.h
@@ -21,12 +21,15 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "keyboard.h"
#include "action.h"
-#if defined(LAYER_STATE_8BIT) || ( defined(DYNAMIC_KEYMAP_ENABLE) && DYNAMIC_KEYMAP_LAYER_COUNT >= 8 )
+#if defined(LAYER_STATE_8BIT)
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