add DEBUG_MATRIX_SCAN_RATE_ENABLE to common_features.mk (#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
```
This commit is contained in:
Takeshi ISHII 2020-11-10 17:03:15 +09:00 committed by GitHub
parent 2098d98e57
commit 28d6b9d7be
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 0 deletions

View file

@ -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

View file

@ -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 */
}