aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorQMK Bot <[email protected]>2024-10-10 19:55:27 +0000
committerQMK Bot <[email protected]>2024-10-10 19:55:27 +0000
commit29bc842fe28758295865141f2a652cb7d1775149 (patch)
tree242b0f15bbfdcc41603ed539e7b9c1fbcc4501cb
parent00db6f2397a135a88da0d889f12071bb7239eb02 (diff)
parent49a1a12a327e6f78db184e83e8ea805da4477775 (diff)
downloadqmk_firmware-29bc842fe28758295865141f2a652cb7d1775149.tar.gz
qmk_firmware-29bc842fe28758295865141f2a652cb7d1775149.zip
Merge remote-tracking branch 'origin/master' into develop
-rw-r--r--quantum/keymap_introspection.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/quantum/keymap_introspection.c b/quantum/keymap_introspection.c
index 327df6e277..236b54ce98 100644
--- a/quantum/keymap_introspection.c
+++ b/quantum/keymap_introspection.c
@@ -102,6 +102,8 @@ __attribute__((weak)) uint16_t combo_count(void) {
return combo_count_raw();
}
+_Static_assert(ARRAY_SIZE(key_combos) <= (QK_KB), "Number of combos is abnormally high. Are you using SAFE_RANGE in an enum for combos?");
+
combo_t* combo_get_raw(uint16_t combo_idx) {
if (combo_idx >= combo_count_raw()) {
return NULL;
@@ -127,6 +129,8 @@ __attribute__((weak)) uint16_t tap_dance_count(void) {
return tap_dance_count_raw();
}
+_Static_assert(ARRAY_SIZE(tap_dance_actions) <= (QK_TAP_DANCE_MAX - QK_TAP_DANCE), "Number of tap dance actions exceeds maximum. Are you using SAFE_RANGE in tap dance enum?");
+
tap_dance_action_t* tap_dance_get_raw(uint16_t tap_dance_idx) {
if (tap_dance_idx >= tap_dance_count_raw()) {
return NULL;
@@ -153,6 +157,8 @@ __attribute__((weak)) uint16_t key_override_count(void) {
return key_override_count_raw();
}
+_Static_assert(ARRAY_SIZE(key_overrides) <= (QK_KB), "Number of key overrides is abnormally high. Are you using SAFE_RANGE in an enum for key overrides?");
+
const key_override_t* key_override_get_raw(uint16_t key_override_idx) {
if (key_override_idx >= key_override_count_raw()) {
return NULL;