Skip to content

Commit

Permalink
Max keymap_introspection's assert more accurate when via/xap is enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
drashna committed Dec 3, 2022
1 parent 61d0314 commit bb373c8
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions quantum/keymap_introspection.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,12 @@ uint8_t keymap_layer_count(void) {
return NUM_KEYMAP_LAYERS;
}

#ifdef DYNAMIC_KEYMAP_ENABLE
_Static_assert(NUM_KEYMAP_LAYERS <= MAX_LAYER, "Number of keymap layers exceeds maximum set by MAX_LAYER, check the configured DYNAMIC_KEYMAP_LAYER_COUNT");
#else
_Static_assert(NUM_KEYMAP_LAYERS <= MAX_LAYER, "Number of keymap layers exceeds maximum set by LAYER_STATE_(8|16|32)BIT");
#endif


uint16_t keycode_at_keymap_location_raw(uint8_t layer_num, uint8_t row, uint8_t column) {
if (layer_num < NUM_KEYMAP_LAYERS && row < MATRIX_ROWS && column < MATRIX_COLS) {
Expand Down

0 comments on commit bb373c8

Please sign in to comment.