logo

qmk_firmware

custom branch of QMK firmware git clone https://anongit.hacktivis.me/git/qmk_firmware.git

local_features.mk (3461B)


  1. # matrix.c testing options
  2. # set MATRIX_IO_DELAY macro
  3. # make MTEST=mdelay0 symmetric70_proto/{promicro|proton_c}/{fast|normal}:default:flash
  4. # make MTEST=mdelay=1 symmetric70_proto/{promicro|proton_c}/{fast|normal}:default:flash
  5. # make MTEST=mdelay=10 symmetric70_proto/{promicro|proton_c}/{fast|normal}:default:flash
  6. # set DEBUG_MATRIX_SCAN_RATE_ENABLE yes
  7. # make MTEST=scan symmetric70_proto/{promicro|proton_c}/{fast|normal}:default:flash
  8. # set MATRIX_DEBUG_DELAY and MATRIX_IO_DELAY macro
  9. # make MTEST=matrix_debug_delay,mdelay0 symmetric70_proto/{promicro|proton_c}/{fast|normal}:default:flash
  10. # set MATRIX_DEBUG_SCAN
  11. # make MTEST=matrix_debug_scan symmetric70_proto/{promicro|proton_c}/{fast|normal}:default:flash
  12. ifneq ($(strip $(MTEST)),)
  13. define KEYBOARD_OPTION_PARSE
  14. # parse 'consle', 'scan', 'no-scan', 'mdelay=?', 'mdelay0',
  15. # 'adaptive_delay', 'always_delay', 'matrix_debug_delay', 'matrix_debug_scan'
  16. $(if $(SHOW_PARSE),$(info parse .$1.)) #for debug 'make SHOW_PARSE=y ...'
  17. ifeq ($(strip $1),console)
  18. CONSOLE_ENABLE = yes
  19. endif
  20. ifeq ($(strip $1),scan)
  21. DEBUG_MATRIX_SCAN_RATE_ENABLE = yes
  22. endif
  23. ifeq ($(strip $1),no-scan)
  24. DEBUG_MATRIX_SCAN_RATE_ENABLE = no
  25. endif
  26. ifneq ($(filter mdelay=%,$1),)
  27. MDELAY = $(patsubst mdelay=%,%,$1)
  28. endif
  29. ifeq ($(strip $1),mdelay0)
  30. MDELAY = 0
  31. endif
  32. ifeq ($(strip $1),common_delay)
  33. MATRIX_COMMON_DELAY = yes
  34. endif
  35. ifeq ($(strip $1),adaptive_delay)
  36. ADAPTIVE_DELAY = yes
  37. endif
  38. ifeq ($(strip $1),adaptive_delay2)
  39. ADAPTIVE_DELAY2 = yes
  40. endif
  41. ifeq ($(strip $1),adaptive_delay_fast)
  42. ADAPTIVE_DELAY_FAST = yes
  43. endif
  44. ifeq ($(strip $1),always_delay)
  45. ALWAYS_DELAY = yes
  46. endif
  47. ifeq ($(strip $1),matrix_debug_delay)
  48. MATRIX_DEBUG_DELAY = yes
  49. MATRIX_DEBUG_SCAN = no
  50. endif
  51. ifeq ($(strip $1),matrix_debug_scan)
  52. MATRIX_DEBUG_DELAY = no
  53. MATRIX_DEBUG_SCAN = yes
  54. endif
  55. endef # end of KEYMAP_OPTION_PARSE
  56. COMMA=,
  57. $(eval $(foreach A_OPTION_NAME,$(subst $(COMMA), ,$(MTEST)), \
  58. $(call KEYBOARD_OPTION_PARSE,$(A_OPTION_NAME))))
  59. endif
  60. ifneq ($(strip $(MDELAY)),)
  61. OPT_DEFS += -DMATRIX_IO_DELAY=$(strip $(MDELAY))
  62. endif
  63. ifeq ($(strip $(ADAPTIVE_DELAY)),yes)
  64. OPT_DEFS += -DMATRIX_IO_DELAY_ADAPTIVE
  65. endif
  66. ifeq ($(strip $(ADAPTIVE_DELAY2)),yes)
  67. OPT_DEFS += -DMATRIX_IO_DELAY_ADAPTIVE2
  68. endif
  69. ifeq ($(strip $(ADAPTIVE_DELAY_FAST)),yes)
  70. OPT_DEFS += -DMATRIX_IO_DELAY_ADAPTIVE_FAST
  71. endif
  72. ifeq ($(strip $(ALWAYS_DELAY)),yes)
  73. OPT_DEFS += -DMATRIX_IO_DELAY_ALWAYS
  74. endif
  75. ifeq ($(strip $(MATRIX_DEBUG_DELAY)),yes)
  76. OPT_DEFS += -DMATRIX_DEBUG_DELAY
  77. DEBUG_CONFIG = yes
  78. endif
  79. ifeq ($(strip $(MATRIX_DEBUG_SCAN)),yes)
  80. OPT_DEFS += -DMATRIX_DEBUG_SCAN
  81. DEBUG_CONFIG = yes
  82. endif
  83. ifeq ($(strip $(DEBUG_CONFIG)),yes)
  84. # include "debug_config.h" from {promicro|proton_c}/config.h
  85. OPT_DEFS += -DDEBUG_CONFIG
  86. endif
  87. ifeq ($(strip $(MATRIX_COMMON_DELAY)),yes)
  88. # use matrix_output_unselect_delay() in matrix_common.c
  89. OPT_DEFS += -DMATRIX_IO_DELAY_DEFAULT
  90. endif
  91. $(info -)
  92. $(info - DEBUG_MATRIX_SCAN_RATE_ENABLE = $(DEBUG_MATRIX_SCAN_RATE_ENABLE))
  93. $(info - CONSOLE_ENABLE = $(CONSOLE_ENABLE))
  94. $(info - MDELAY = $(MDELAY))
  95. $(info - MATRIX_COMMON_DELAY = $(MATRIX_COMMON_DELAY))
  96. $(info - OPT_DEFS = $(OPT_DEFS))