Skip to content

Commit

Permalink
add DEBUG_MATRIX_SCAN_RATE_ENABLE to common_features.mk (qmk#10824)
Browse files Browse the repository at this point in the history
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
```
  • Loading branch information
mtei authored and jared-w committed Nov 12, 2020
1 parent f3200a7 commit 6911558
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
5 changes: 5 additions & 0 deletions common_features.mk
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ QUANTUM_SRC += \
$(QUANTUM_DIR)/keymap_common.c \
$(QUANTUM_DIR)/keycode_config.c

ifeq ($(strip $(DEBUG_MATRIX_SCAN_RATE_ENABLE)), yes)
OPT_DEFS += -DDEBUG_MATRIX_SCAN_RATE
CONSOLE_ENABLE = yes
endif

ifeq ($(strip $(API_SYSEX_ENABLE)), yes)
OPT_DEFS += -DAPI_SYSEX_ENABLE
OPT_DEFS += -DAPI_ENABLE
Expand Down
4 changes: 4 additions & 0 deletions tmk_core/common/keyboard.c
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,10 @@ void keyboard_init(void) {
dip_switch_init();
#endif

#if defined(DEBUG_MATRIX_SCAN_RATE) && defined(CONSOLE_ENABLE)
debug_enable = true;
#endif

keyboard_post_init_kb(); /* Always keep this last */
}

Expand Down

0 comments on commit 6911558

Please sign in to comment.