You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

127 lines
3.8 KiB

Update mtei's keymap (helix/rev2:five_rows, helix/pico:mtei, helix/rev3_5rows:five_rows) (#16966) * add users/mtei/key_blocks.h This change does not alter the binary of the build result. Moved common macro definitions in the following files to users/mtei/key_blocks.h. * keyboards/helix/rev2/keymaps/five_rows/keymap.c * keyboards/helix/rev3_5rows/keymaps/five_rows/keymap.c * remove INIT_HELIX_OLED() in helix:five_rows This change does not alter the binary of the build result. * update helix/pico/keymaps/mtei/keymap.c Changed helix/pico/keymaps/mtei/keymap.c to use users/mtei/key_blocks.h. This change does not alter the binary of the build result. * Remove old SSD1306OLED code from users/mtei/oled_display.c This change does not alter the binary of the build result. * add options ENABLE_COLEMAK, ENABLE_DVORAK and ENABLE_EUCALYN into five_rows/keymap.c * add users/mtei/{config.h,rules.mk,user_featues.mk,user_options.mk} * move layer_names[] from users/mtei/oled_display.c to keymaps/five_rows/keymap.c * Update keyboards/helix/pico/keymaps/mtei/config.h Co-authored-by: Ryan <fauxpark@gmail.com> * Update keyboards/helix/pico/keymaps/mtei/config.h Co-authored-by: Ryan <fauxpark@gmail.com> * Update keyboards/helix/pico/keymaps/mtei/keymap.c Co-authored-by: Ryan <fauxpark@gmail.com> * Update keyboards/helix/rev2/keymaps/five_rows/config.h Co-authored-by: Ryan <fauxpark@gmail.com> * Update keyboards/helix/rev2/keymaps/five_rows/config.h Co-authored-by: Ryan <fauxpark@gmail.com> * Update keyboards/helix/rev2/keymaps/five_rows/keymap.c Co-authored-by: Ryan <fauxpark@gmail.com> * Update keyboards/helix/rev3_5rows/keymaps/five_rows/config.h Co-authored-by: Ryan <fauxpark@gmail.com> * Update keyboards/helix/rev3_5rows/keymaps/five_rows/config.h Co-authored-by: Ryan <fauxpark@gmail.com> * Update keyboards/helix/rev3_5rows/keymaps/five_rows/keymap.c Co-authored-by: Ryan <fauxpark@gmail.com> * Update users/mtei/config.h Co-authored-by: Ryan <fauxpark@gmail.com> * Update users/mtei/config.h Co-authored-by: Ryan <fauxpark@gmail.com> * Update users/mtei/cpp_map.h Co-authored-by: Ryan <fauxpark@gmail.com> * Update users/mtei/cpp_map.h Co-authored-by: Ryan <fauxpark@gmail.com> * Update users/mtei/debug_config.h Co-authored-by: Ryan <fauxpark@gmail.com> * Update users/mtei/debug_config.h Co-authored-by: Ryan <fauxpark@gmail.com> * Update users/mtei/layer_number_util.h Co-authored-by: Ryan <fauxpark@gmail.com> Co-authored-by: Ryan <fauxpark@gmail.com>
2 years ago
  1. # Copyright (c) 2022 Takeshi Ishii (mtei@github)
  2. # SPDX-License-Identifier: GPL-2.0-or-later
  3. #
  4. # make USROPT=<option>,<option>,... <KEYBOARD>:<KEYMAP>
  5. # options:
  6. # dispoff: OLED, RGBLIGHT disable
  7. # oled: OLED enable
  8. # no-oled: OLED disable
  9. # rgblight: RGBLIGHT enable
  10. # no-rgblight: RGBLIGHT disable
  11. # no_ani: RGBLIGHT ANIMATIONS disable
  12. # mini-ani: RGBLIGHT ANIMATIONS mini set
  13. # ani: RGBLIGHT ANIMATIONS enable
  14. # scan: DEBUG_MATRIX_SCAN_RATE enable
  15. # scan-api: DEBUG_MATRIX_SCAN_RATE api enable
  16. # mdelay=<num> MATRIX_IO_DELAY set <num>
  17. # mdelay_type=<type> use custom matrix_output_unselect_delay()
  18. # type=no,ondemand
  19. # enc: ENCODER enable
  20. # no-enc: ENCODER disable
  21. #
  22. ifneq ($(strip $(USROPT)),)
  23. define USER_OPTION_PARSE
  24. # parse 'debug', 'no-debug', 'dispoff', 'consle', 'scan', 'no-scan', 'scan-api',
  25. # 'mdelay=?', 'mdelay0', 'colemak', 'dvorak', 'eucalyn', 'lto', 'no-lto'
  26. $(if $(SHOW_PARSE),$(info parse .$1.)) #for debug 'make SHOW_PARSE=y ...'
  27. ifeq ($(strip $1),debug)
  28. DEBUG_CONFIG = yes
  29. endif
  30. ifneq ($(filter nodebug no-debug no_debug,$(strip $1)),)
  31. DEBUG_CONFIG = no
  32. endif
  33. ifeq ($(strip $1),dispoff)
  34. OLED_ENABLE = no
  35. RGBLIGHT_ENABLE = no
  36. LED_BACK_ENABLE = no
  37. LED_UNDERGLOW_ENABLE = no
  38. endif
  39. ifneq ($(filter rgblight,$(strip $1)),)
  40. RGBLIGHT_ENABLE = yes
  41. LED_BACK_ENABLE = yes
  42. endif
  43. ifneq ($(filter norgblight no-rgblight,$(strip $1)),)
  44. RGBLIGHT_ENABLE = no
  45. LED_BACK_ENABLE = no
  46. LED_UNDERGLOW_ENABLE = no
  47. endif
  48. ifneq ($(filter na no_ani no-ani,$(strip $1)),)
  49. LED_ANIMATIONS = no
  50. endif
  51. ifneq ($(filter mini-ani mini_ani,$(strip $1)),)
  52. LED_ANIMATIONS = mini
  53. endif
  54. ifneq ($(filter ani animation,$(strip $1)),)
  55. LED_ANIMATIONS = yes
  56. endif
  57. ifneq ($(filter nooled no-oled,$(strip $1)),)
  58. OLED_ENABLE = no
  59. endif
  60. ifeq ($(strip $1),oled)
  61. OLED_ENABLE = yes
  62. endif
  63. ifeq ($(strip $1),console)
  64. CONSOLE_ENABLE = yes
  65. endif
  66. ifeq ($(strip $1),scan)
  67. # use DEBUG_MATRIX_SCAN_RATE
  68. # see docs/newbs_testing_debugging.md
  69. DEBUG_MATRIX_SCAN_RATE_ENABLE = yes
  70. endif
  71. ifeq ($(strip $1),no-scan)
  72. DEBUG_MATRIX_SCAN_RATE_ENABLE = no
  73. endif
  74. ifeq ($(strip $1),scan-api)
  75. # use DEBUG_MATRIX_SCAN_RATE
  76. # see docs/newbs_testing_debugging.md
  77. DEBUG_MATRIX_SCAN_RATE_ENABLE = api
  78. endif
  79. ifneq ($(filter stimer sync-timer,$(strip $1)),)
  80. SYNC_TIMER_ENABLE = yes
  81. endif
  82. ifneq ($(filter nostimer no-sync-timer,$(strip $1)),)
  83. SYNC_TIMER_ENABLE = no
  84. endif
  85. ifeq ($(filter mdelay_type=%,$1),mdelay_type=no)
  86. CUSTOM_MATRIX_DELAY = no
  87. endif
  88. ifeq ($(filter mdelay_type=%,$1),mdelay_type=demand)
  89. CUSTOM_MATRIX_DELAY = on-demand
  90. endif
  91. ifneq ($(filter mdelay=%,$1),)
  92. MDELAY = $(patsubst mdelay=%,%,$1)
  93. endif
  94. ifeq ($(strip $1),mdelay0)
  95. MDELAY = 0
  96. endif
  97. ifeq ($(strip $1),colemak)
  98. ENABLE_COLEMAK = yes
  99. endif
  100. ifeq ($(strip $1),dvorak)
  101. ENABLE_DVORAK = yes
  102. endif
  103. ifeq ($(strip $1),eucalyn)
  104. ENABLE_EUCALYN = yes
  105. endif
  106. ifeq ($(strip $1),lto)
  107. LTO_ENABLE = yes
  108. endif
  109. ifneq ($(filter nolto no-lto no_lto,$(strip $1)),)
  110. LTO_ENABLE = no
  111. endif
  112. ifneq ($(filter enc,$(strip $1)),)
  113. ENCODER_ENABLE = yes
  114. endif
  115. ifneq ($(filter noenc no-enc no_enc,$(strip $1)),)
  116. ENCODER_ENABLE = no
  117. endif
  118. ifneq ($(filter debugenc debug-enc debug_enc,$(strip $1)),)
  119. DEBUG_ENCODER = yes
  120. endif
  121. endef # end of USER_OPTION_PARSE
  122. COMMA=,
  123. $(eval $(foreach A_OPTION_NAME,$(subst $(COMMA), ,$(USROPT)), \
  124. $(call USER_OPTION_PARSE,$(A_OPTION_NAME))))
  125. endif