Skip to content

Commit 6911558

Browse files
mteijared-w
authored and
jared-w
committed
add DEBUG_MATRIX_SCAN_RATE_ENABLE to common_features.mk (qmk#10824)
Add a Make variable to easily enable DEBUG_MATRIX_SCAN_RATE on the command line. eg. ``` make DEBUG_MATRIX_SCAN_RATE_ENABLE=yes KEYBOARD:KEYMAP ```
1 parent f3200a7 commit 6911558

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

common_features.mk

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,11 @@ QUANTUM_SRC += \
2020
$(QUANTUM_DIR)/keymap_common.c \
2121
$(QUANTUM_DIR)/keycode_config.c
2222

23+
ifeq ($(strip $(DEBUG_MATRIX_SCAN_RATE_ENABLE)), yes)
24+
OPT_DEFS += -DDEBUG_MATRIX_SCAN_RATE
25+
CONSOLE_ENABLE = yes
26+
endif
27+
2328
ifeq ($(strip $(API_SYSEX_ENABLE)), yes)
2429
OPT_DEFS += -DAPI_SYSEX_ENABLE
2530
OPT_DEFS += -DAPI_ENABLE

tmk_core/common/keyboard.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -299,6 +299,10 @@ void keyboard_init(void) {
299299
dip_switch_init();
300300
#endif
301301

302+
#if defined(DEBUG_MATRIX_SCAN_RATE) && defined(CONSOLE_ENABLE)
303+
debug_enable = true;
304+
#endif
305+
302306
keyboard_post_init_kb(); /* Always keep this last */
303307
}
304308

0 commit comments

Comments
 (0)