diff options
Diffstat (limited to 'tmk_core/common/action_layer.h')
-rw-r--r-- | tmk_core/common/action_layer.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tmk_core/common/action_layer.h b/tmk_core/common/action_layer.h index 7fa30c86d..a2734a29e 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/>. | |||
21 | #include "keyboard.h" | 21 | #include "keyboard.h" |
22 | #include "action.h" | 22 | #include "action.h" |
23 | 23 | ||
24 | #if defined(LAYER_STATE_8BIT) || ( defined(DYNAMIC_KEYMAP_ENABLE) && DYNAMIC_KEYMAP_LAYER_COUNT >= 8 ) | 24 | #if defined(LAYER_STATE_8BIT) |
25 | typedef uint8_t layer_state_t; | 25 | typedef uint8_t layer_state_t; |
26 | #define get_highest_layer(state) biton8(state) | ||
26 | #elif defined(LAYER_STATE_16BIT) | 27 | #elif defined(LAYER_STATE_16BIT) |
27 | typedef uint16_t layer_state_t; | 28 | typedef uint16_t layer_state_t; |
29 | #define get_highest_layer(state) biton16(state) | ||
28 | #else | 30 | #else |
29 | typedef uint32_t layer_state_t; | 31 | typedef uint32_t layer_state_t; |
32 | #define get_highest_layer(state) biton32(state) | ||
30 | #endif | 33 | #endif |
31 | 34 | ||
32 | 35 | ||