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.

276 lines
7.7 KiB

Backlighting for JJ40 and underglow initialisation code (#2260) * Cleanup Mechmini keymap. Once the custom RGB function is defined, there is no need to manually handle RGB code. * Change default to KEYMAP_MIT, not KEYMAP_OFFSET * Add custom RGB code for JJ40 * Reset Mechmini advertised power draw to 500. Will have to test actual maximum power draw later. * RGB working on JJ40. * Fix: saturation increase/decrease flipped * Add new directory for my custom keymap with RGB keycodes * Swap LAlt and LGUI * Update JJ40 max power draw with measured value * Update: fun40 rules.mk to enable underglow; earlier failed Travis CI * Fix: init RGB LEDs on boot. Also added HHKB-like keymap for XD60. * Super rudimentary backlight test, init RGB LEDs on boot * Backlighting works - stays on for now * Toggling working * Now can override backlight.c functions. Problem was functions in backlight.c weren't called before due to a lack of matrix_scan_quantum() in matrix.c * Timers not working * Delete global.h * Cleanup * Compiles * Good sign: LEDs stop working again * Handle timer1 overflow * Progress: fix: forgot to init * Backlighting fully working now except breathing. * Revert keymap to original keycodes * Update XD60 keymap README * Update JJ40 keymap with backlight toggles * Breathing working just fine. * Update references * Add backlight_set() call * Cleanup code to disable backlight * Fix: does not compile * Fix: missing call to rgblight_task. * Testing with BACKLIGHT_BREATHING * Cleanup * Cleanup comments * More commenting cleanup. * Do not enable BACKLIGHT_BREATHING by default
6 years ago
Backlighting for JJ40 and underglow initialisation code (#2260) * Cleanup Mechmini keymap. Once the custom RGB function is defined, there is no need to manually handle RGB code. * Change default to KEYMAP_MIT, not KEYMAP_OFFSET * Add custom RGB code for JJ40 * Reset Mechmini advertised power draw to 500. Will have to test actual maximum power draw later. * RGB working on JJ40. * Fix: saturation increase/decrease flipped * Add new directory for my custom keymap with RGB keycodes * Swap LAlt and LGUI * Update JJ40 max power draw with measured value * Update: fun40 rules.mk to enable underglow; earlier failed Travis CI * Fix: init RGB LEDs on boot. Also added HHKB-like keymap for XD60. * Super rudimentary backlight test, init RGB LEDs on boot * Backlighting works - stays on for now * Toggling working * Now can override backlight.c functions. Problem was functions in backlight.c weren't called before due to a lack of matrix_scan_quantum() in matrix.c * Timers not working * Delete global.h * Cleanup * Compiles * Good sign: LEDs stop working again * Handle timer1 overflow * Progress: fix: forgot to init * Backlighting fully working now except breathing. * Revert keymap to original keycodes * Update XD60 keymap README * Update JJ40 keymap with backlight toggles * Breathing working just fine. * Update references * Add backlight_set() call * Cleanup code to disable backlight * Fix: does not compile * Fix: missing call to rgblight_task. * Testing with BACKLIGHT_BREATHING * Cleanup * Cleanup comments * More commenting cleanup. * Do not enable BACKLIGHT_BREATHING by default
6 years ago
adding Hadron v3 keyboard, QWIIC devices support, haptic feedback support (#4462) * add initial support for hadron ver3 * add initial support for hadron ver3 * pull qwiic support for micro_led to be modified for use in hadron's 64x24 ssd1306 oled display * initial work on OLED using qwiic driver * early work to get 128x32 oled working by redefining qwiic micro oled parameters. Currently working, but would affect qwiic's micro oled functionality * moved oled defines to config.h and added ifndef to micro_oled driver * WORKING :D - note, still work in progress to get the start location correct on the 128x32 display. * added equation to automatically calculate display offset based on screen width * adding time-out timer to oled display * changed read lock staus via read_led_state * lock indications fixes * Added scroll lock indication to oled * add support for DRV2605 haptic driver * Improve readabiity of DRV2605 driver. -added typedef for waveform library -added unions for registers * Update keyboards/hadron/ver2/keymaps/default/config.h Co-Authored-By: ishtob <ishtob@gmail.com> * Update keyboards/hadron/ver2/keymaps/default/config.h Co-Authored-By: ishtob <ishtob@gmail.com> * Update keyboards/hadron/ver2/keymaps/default/config.h Co-Authored-By: ishtob <ishtob@gmail.com> * Update keyboards/hadron/ver2/keymaps/default/config.h Co-Authored-By: ishtob <ishtob@gmail.com> * Fixes for PR * PR fixes * fix old persistent layer function to use new set_single_persistent_default_layer * fix issues with changing makefile defines that broken per-key haptic pulse * Comment fixes * Add definable parameter and auto-calibration based on motor choice
5 years ago
Zeal60/Zeal65/M60-A implementation (#3879) * Initial version of zeal60 * WIP * Fixes issue #900 * Adding RGB underglow functionality. Fixed a compile-time conflict caused by enabling RGB underglow functionality. * Refactor RPC protocol * Fix last merge * README for RGB underglow updated. * Additional README changes. * Adding RGBW strip software-based current-limiting functionality. * RGBW current-limiting functionality should be handled by RGBSTRIP_MAX_CURRENT_PER_LIGHT instead. * Updated README to reflect implementation of built-in current limiting. * Keymap readability improvements. * Minor keymap improvements. * Fixed LED driver init sequence, formatting * Dimming implementation tested, working. * Stab LEDs synced with spacebar hits in effects. * RGB underglow tested and functional. Simplified README for RGB underglow. * Undid accidental file deletion from previous merge conflict. Safer values for RGB underglow. * Improved arrow key positions in keymap. * Added functionality to correct uneven RGB underglow. Refactored related code. * Reverted to safer values for underglow. * Changes for v0.3 * Custom LED brightness scaling will take place after current adjustment in order to avoid being overridden. * Create keymap.c Added split backspace and split shift to ISO layout * Create config.h Turned on LEDs for new layout * Fixed bug where left spacebar stabilizer LED (LC06) would adopt color of row above. * Added hhkb_wilba keymap * Update keymap.c * Update keymap.c * Update keymap.c * Added indicators, full param setting via host * Added "mousekey" layout * Added Zeal65 support, factory test mode * Keycode safe range changed, caused bugs * Bumped EEPROM version due to change in QMK keycodes * Disable HHKB "blocked" LEDs if KC_NO in keymap * Added "disable_hhkb_blocker_leds" * Required overridden function for keymaps in EEPROM * Added polar coordinate mapping, effect speed * Force Raw HID interface number to 1 always * Fixed last merge from master * Added effect speed to default keymaps * add BACKLIGHT_ prefix to vars * add BACKLIGHT_ prefix to vars * Keymap speed effect; keymap improvements/fixes Readme updated to match changes * Refactored to use common IS31FL3731/I2C drivers * Fixed make rules, backlight disabled feature * Make split rightshift default for Zeal65 * Added M60-A as a "version" of Zeal60. * Renamed IS31FL3731 driver functions * Fix suspend_wakeup_init_kb() being defined twice * First pass refactor dynamic keymaps * Updated to changed I2C and ISSI drivers * Refactor zeal_color.* usage to quantum/color.* * Updated Zeal65, fixed dynamic_keymap * Major refactoring of Zeal60 backlight and API * Lots of little cleanups * Added readme.md * Added readme.md * Added LAYOUT_60*() macros, refactored and cleaned up default keymaps * Fix compile error in suspend.c * Added Zeal65 LAYOUT macros, info.json * Added rama/m60_a, deleted zeal60/keymaps/m60_a * Fixed rama/m60_a/keymaps/proto * Fixed compilation error for suspend.c * Requested changes for PR * Fixed readme.md images * Another readme.md fix * Added drashna's requested changes
5 years ago
adding Hadron v3 keyboard, QWIIC devices support, haptic feedback support (#4462) * add initial support for hadron ver3 * add initial support for hadron ver3 * pull qwiic support for micro_led to be modified for use in hadron's 64x24 ssd1306 oled display * initial work on OLED using qwiic driver * early work to get 128x32 oled working by redefining qwiic micro oled parameters. Currently working, but would affect qwiic's micro oled functionality * moved oled defines to config.h and added ifndef to micro_oled driver * WORKING :D - note, still work in progress to get the start location correct on the 128x32 display. * added equation to automatically calculate display offset based on screen width * adding time-out timer to oled display * changed read lock staus via read_led_state * lock indications fixes * Added scroll lock indication to oled * add support for DRV2605 haptic driver * Improve readabiity of DRV2605 driver. -added typedef for waveform library -added unions for registers * Update keyboards/hadron/ver2/keymaps/default/config.h Co-Authored-By: ishtob <ishtob@gmail.com> * Update keyboards/hadron/ver2/keymaps/default/config.h Co-Authored-By: ishtob <ishtob@gmail.com> * Update keyboards/hadron/ver2/keymaps/default/config.h Co-Authored-By: ishtob <ishtob@gmail.com> * Update keyboards/hadron/ver2/keymaps/default/config.h Co-Authored-By: ishtob <ishtob@gmail.com> * Fixes for PR * PR fixes * fix old persistent layer function to use new set_single_persistent_default_layer * fix issues with changing makefile defines that broken per-key haptic pulse * Comment fixes * Add definable parameter and auto-calibration based on motor choice
5 years ago
Lets split eh (#3120) * Line ending stuff again * Added Let's Split Eh? Files and updated #USE_IC2 checks to also include th EH revision (can only be used in I2C) * Added personal keymap, updated some of the EH files * Created new keyboard file for testing "lets_split_eh" will merge into lets_split once fully functional * Added split code from lets_split, removed pro micro imports and LED code THIS IS WORKING CODE, WITHOUT RGB AND BACKLIGHT * Took back original Lets Slit files for the lets_split keyboard, working in the lets_split_eh folder for now * Updated eh.c * More rework of the I2C code, added global flags for split boards. * Introduced RGB over I2C, having weird edge case issues at the moment though * Fixed weird I2C edgecase with RGB, although still would like to track down route cause.. * Changed RGB keycodes (static ones) to activate on key-up instead of key-down to elimate weird ghosting issue over I2C * Lots of changes, mainly externalized the Split keyboard code and added logic for only including when needed. - Added makefile option "SPLIT_KEYBOARD" that when = yes will include the split keyboard files and custom matrix - Split keyboard files placed into quantum/split_common/ - Added define option for config files "SPLIT_HAND_PIN" FOr using high/low pin to determine handedness, low = right hand, high = left hand - Cleaned up split logic for RGB and Backlight so it is only exectuted / included when needed * Updated documentation for the new makefile options and #defines specific to split keyboards * Added a bit more info to docs, so people aren't confused * Modifed Let's Split to use externalized code, also added left and right hand eeprom files to the split_common folder * Removed some debugging from eh.c * Small changes to keyboard configs. Also added a default keymap (just a copy of my that_canadian keymap). * Added a README file to the Let's Split Eh? * Changed it so RGB static updates are done on key-up ONLY for split boards rather than all boards. Also fixed leftover un-used variable in rgblight.c * Updated default keymap and my keymap for Let's Split Eh? Updated the comments so it reflects RGB control, and removed audio functions. * Fixed lets_split_eh not having a default version * Removed "eh" references from lets_split folder for now * Took lets_split folder from master to fix travis build errors, weird my local was overriding. * Changed LAYOUT_ortho_4x12_kc -> LAYOUT_kc_ortho_4x12 to match bakingpy and others * Removed rules.mk from my lets_split keymap, not needed * Updated the config_options doc to better explain the usage of "#define SPLIT_HAND_PIN"
5 years ago
Make quantum/split_common/serial.[ch] configurable (#4419) * add temporary compile test shell script * add 'CONFIG_H += serial_backward_compatibility.h' into common_features.mk:SPLIT_KEYBOARD block * add quantum/split_common/serial_backward_compatibility.h SERIAL_PIN_PORT and other PIN define move to serial_backward_compatibility.h SERIAL_BACKLIT_START move to split_util.h * quantum/split_common/serial.c change to helix-serial.c style serial configuration * add temporary file quantum/split_common/split-keyboards-list.txt * add '#define SOFT_SERIAL_PIN D0' to keyboards/6lit/config.h * add '#define SOFT_SERIAL_PIN D0' to keyboards/divergetm2/config.h * add '#define SOFT_SERIAL_PIN D0' to keyboards/ergotravel/rev1/config.h * add '#define SOFT_SERIAL_PIN D0' to keyboards/foobar/config.h * add '#define SOFT_SERIAL_PIN D0' to keyboards/handwired/dactyl_manuform/config.h * add '#define SOFT_SERIAL_PIN D0' to keyboards/handwired/qc60/config.h * add '//#define SOFT_SERIAL_PIN D0' to keyboards/handwired/xealous/config.h * add '#define SOFT_SERIAL_PIN D0' to keyboards/iris/rev*/config.h * add '//#define SOFT_SERIAL_PIN D0' to keyboards/lets_split_eh/config.h * add '#define SOFT_SERIAL_PIN D0' to keyboards/levinson/rev*/config.h * add '#define SOFT_SERIAL_PIN D0' to keyboards/miniaxe/config.h * add '#define SOFT_SERIAL_PIN D0' to keyboards/nyquist/rev?/config.h * add '#define SOFT_SERIAL_PIN D0' to keyboards/quefrency/rev1/config.h * add '#define SOFT_SERIAL_PIN D0' to keyboards/qwertyydox/config.h,keyboards/qwertyydox/rev1/config.h * add '#define SOFT_SERIAL_PIN D0' to keyboards/redox/rev1/config.h * add '#define SOFT_SERIAL_PIN D0' to keyboards/rorschach/rev1/config.h * remove '#define SOFT_SERIAL_PIN D0' from quantum/split_common/serial_backward_compatibility.h * remove temporary file quantum/split_common/split-keyboards-list.txt * remove temporary compile test shell script * Revert "remove temporary compile test shell script" This reverts commit 15b0021b4092127b8d8a21f572642ad3702b46d4. * update quantum/split_common/compile_split_test.sh for new keyboard test * add '#define SOFT_SERIAL_PIN D0' to keyboards/diverge3/config.h * add '#define SOFT_SERIAL_PIN D0' to keyboards/40percentclub/25/config.h * remove temporary compile test shell script * update docs/config_options.md, quantum/template/avr/config.h * fix quantum/template/avr/config.h * fix typo docs/config_options.md
5 years ago
Lets split eh (#3120) * Line ending stuff again * Added Let's Split Eh? Files and updated #USE_IC2 checks to also include th EH revision (can only be used in I2C) * Added personal keymap, updated some of the EH files * Created new keyboard file for testing "lets_split_eh" will merge into lets_split once fully functional * Added split code from lets_split, removed pro micro imports and LED code THIS IS WORKING CODE, WITHOUT RGB AND BACKLIGHT * Took back original Lets Slit files for the lets_split keyboard, working in the lets_split_eh folder for now * Updated eh.c * More rework of the I2C code, added global flags for split boards. * Introduced RGB over I2C, having weird edge case issues at the moment though * Fixed weird I2C edgecase with RGB, although still would like to track down route cause.. * Changed RGB keycodes (static ones) to activate on key-up instead of key-down to elimate weird ghosting issue over I2C * Lots of changes, mainly externalized the Split keyboard code and added logic for only including when needed. - Added makefile option "SPLIT_KEYBOARD" that when = yes will include the split keyboard files and custom matrix - Split keyboard files placed into quantum/split_common/ - Added define option for config files "SPLIT_HAND_PIN" FOr using high/low pin to determine handedness, low = right hand, high = left hand - Cleaned up split logic for RGB and Backlight so it is only exectuted / included when needed * Updated documentation for the new makefile options and #defines specific to split keyboards * Added a bit more info to docs, so people aren't confused * Modifed Let's Split to use externalized code, also added left and right hand eeprom files to the split_common folder * Removed some debugging from eh.c * Small changes to keyboard configs. Also added a default keymap (just a copy of my that_canadian keymap). * Added a README file to the Let's Split Eh? * Changed it so RGB static updates are done on key-up ONLY for split boards rather than all boards. Also fixed leftover un-used variable in rgblight.c * Updated default keymap and my keymap for Let's Split Eh? Updated the comments so it reflects RGB control, and removed audio functions. * Fixed lets_split_eh not having a default version * Removed "eh" references from lets_split folder for now * Took lets_split folder from master to fix travis build errors, weird my local was overriding. * Changed LAYOUT_ortho_4x12_kc -> LAYOUT_kc_ortho_4x12 to match bakingpy and others * Removed rules.mk from my lets_split keymap, not needed * Updated the config_options doc to better explain the usage of "#define SPLIT_HAND_PIN"
5 years ago
  1. # Copyright 2017 Fred Sundvik
  2. #
  3. # This program is free software: you can redistribute it and/or modify
  4. # it under the terms of the GNU General Public License as published by
  5. # the Free Software Foundation, either version 2 of the License, or
  6. # (at your option) any later version.
  7. #
  8. # This program is distributed in the hope that it will be useful,
  9. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. # GNU General Public License for more details.
  12. #
  13. # You should have received a copy of the GNU General Public License
  14. # along with this program. If not, see <http://www.gnu.org/licenses/>.
  15. SERIAL_DIR := $(QUANTUM_DIR)/serial_link
  16. SERIAL_PATH := $(QUANTUM_PATH)/serial_link
  17. SERIAL_SRC := $(wildcard $(SERIAL_PATH)/protocol/*.c)
  18. SERIAL_SRC += $(wildcard $(SERIAL_PATH)/system/*.c)
  19. SERIAL_DEFS += -DSERIAL_LINK_ENABLE
  20. COMMON_VPATH += $(SERIAL_PATH)
  21. ifeq ($(strip $(API_SYSEX_ENABLE)), yes)
  22. OPT_DEFS += -DAPI_SYSEX_ENABLE
  23. SRC += $(QUANTUM_DIR)/api/api_sysex.c
  24. OPT_DEFS += -DAPI_ENABLE
  25. SRC += $(QUANTUM_DIR)/api.c
  26. MIDI_ENABLE=yes
  27. endif
  28. MUSIC_ENABLE := 0
  29. ifeq ($(strip $(AUDIO_ENABLE)), yes)
  30. OPT_DEFS += -DAUDIO_ENABLE
  31. MUSIC_ENABLE := 1
  32. SRC += $(QUANTUM_DIR)/process_keycode/process_audio.c
  33. SRC += $(QUANTUM_DIR)/process_keycode/process_clicky.c
  34. ifeq ($(PLATFORM),AVR)
  35. SRC += $(QUANTUM_DIR)/audio/audio.c
  36. else
  37. SRC += $(QUANTUM_DIR)/audio/audio_arm.c
  38. endif
  39. SRC += $(QUANTUM_DIR)/audio/voices.c
  40. SRC += $(QUANTUM_DIR)/audio/luts.c
  41. endif
  42. ifeq ($(strip $(MIDI_ENABLE)), yes)
  43. OPT_DEFS += -DMIDI_ENABLE
  44. MUSIC_ENABLE := 1
  45. SRC += $(QUANTUM_DIR)/process_keycode/process_midi.c
  46. endif
  47. ifeq ($(MUSIC_ENABLE), 1)
  48. SRC += $(QUANTUM_DIR)/process_keycode/process_music.c
  49. endif
  50. ifeq ($(strip $(COMBO_ENABLE)), yes)
  51. OPT_DEFS += -DCOMBO_ENABLE
  52. SRC += $(QUANTUM_DIR)/process_keycode/process_combo.c
  53. endif
  54. ifeq ($(strip $(STENO_ENABLE)), yes)
  55. OPT_DEFS += -DSTENO_ENABLE
  56. VIRTSER_ENABLE := yes
  57. SRC += $(QUANTUM_DIR)/process_keycode/process_steno.c
  58. endif
  59. ifeq ($(strip $(VIRTSER_ENABLE)), yes)
  60. OPT_DEFS += -DVIRTSER_ENABLE
  61. endif
  62. ifeq ($(strip $(FAUXCLICKY_ENABLE)), yes)
  63. OPT_DEFS += -DFAUXCLICKY_ENABLE
  64. SRC += $(QUANTUM_DIR)/fauxclicky.c
  65. endif
  66. ifeq ($(strip $(POINTING_DEVICE_ENABLE)), yes)
  67. OPT_DEFS += -DPOINTING_DEVICE_ENABLE
  68. OPT_DEFS += -DMOUSE_ENABLE
  69. SRC += $(QUANTUM_DIR)/pointing_device.c
  70. endif
  71. ifeq ($(strip $(UCIS_ENABLE)), yes)
  72. OPT_DEFS += -DUCIS_ENABLE
  73. UNICODE_COMMON = yes
  74. SRC += $(QUANTUM_DIR)/process_keycode/process_ucis.c
  75. endif
  76. ifeq ($(strip $(UNICODEMAP_ENABLE)), yes)
  77. OPT_DEFS += -DUNICODEMAP_ENABLE
  78. UNICODE_COMMON = yes
  79. SRC += $(QUANTUM_DIR)/process_keycode/process_unicodemap.c
  80. endif
  81. ifeq ($(strip $(UNICODE_ENABLE)), yes)
  82. OPT_DEFS += -DUNICODE_ENABLE
  83. UNICODE_COMMON = yes
  84. SRC += $(QUANTUM_DIR)/process_keycode/process_unicode.c
  85. endif
  86. ifeq ($(strip $(UNICODE_COMMON)), yes)
  87. SRC += $(QUANTUM_DIR)/process_keycode/process_unicode_common.c
  88. endif
  89. ifeq ($(strip $(RGBLIGHT_ENABLE)), yes)
  90. OPT_DEFS += -DRGBLIGHT_ENABLE
  91. SRC += $(QUANTUM_DIR)/rgblight.c
  92. CIE1931_CURVE = yes
  93. LED_BREATHING_TABLE = yes
  94. ifeq ($(strip $(RGBLIGHT_CUSTOM_DRIVER)), yes)
  95. OPT_DEFS += -DRGBLIGHT_CUSTOM_DRIVER
  96. else
  97. SRC += ws2812.c
  98. endif
  99. endif
  100. RGB_MATRIX_ENABLE ?= no
  101. VALID_MATRIX_TYPES := yes IS31FL3731 IS31FL3733 custom
  102. ifneq ($(strip $(RGB_MATRIX_ENABLE)), no)
  103. ifeq ($(filter $(RGB_MATRIX_ENABLE),$(VALID_MATRIX_TYPES)),)
  104. $(error RGB_MATRIX_ENABLE="$(RGB_MATRIX_ENABLE)" is not a valid matrix type)
  105. endif
  106. OPT_DEFS += -DRGB_MATRIX_ENABLE
  107. SRC += $(QUANTUM_DIR)/color.c
  108. SRC += $(QUANTUM_DIR)/rgb_matrix.c
  109. SRC += $(QUANTUM_DIR)/rgb_matrix_drivers.c
  110. CIE1931_CURVE = yes
  111. endif
  112. ifeq ($(strip $(RGB_MATRIX_ENABLE)), yes)
  113. RGB_MATRIX_ENABLE = IS31FL3731
  114. endif
  115. ifeq ($(strip $(RGB_MATRIX_ENABLE)), IS31FL3731)
  116. OPT_DEFS += -DIS31FL3731
  117. COMMON_VPATH += $(DRIVER_PATH)/issi
  118. SRC += is31fl3731.c
  119. SRC += i2c_master.c
  120. endif
  121. ifeq ($(strip $(RGB_MATRIX_ENABLE)), IS31FL3733)
  122. OPT_DEFS += -DIS31FL3733
  123. COMMON_VPATH += $(DRIVER_PATH)/issi
  124. SRC += is31fl3733.c
  125. SRC += i2c_master.c
  126. endif
  127. ifeq ($(strip $(TAP_DANCE_ENABLE)), yes)
  128. OPT_DEFS += -DTAP_DANCE_ENABLE
  129. SRC += $(QUANTUM_DIR)/process_keycode/process_tap_dance.c
  130. endif
  131. ifeq ($(strip $(KEY_LOCK_ENABLE)), yes)
  132. OPT_DEFS += -DKEY_LOCK_ENABLE
  133. SRC += $(QUANTUM_DIR)/process_keycode/process_key_lock.c
  134. endif
  135. ifeq ($(strip $(PRINTING_ENABLE)), yes)
  136. OPT_DEFS += -DPRINTING_ENABLE
  137. SRC += $(QUANTUM_DIR)/process_keycode/process_printer.c
  138. SRC += $(TMK_DIR)/protocol/serial_uart.c
  139. endif
  140. ifeq ($(strip $(AUTO_SHIFT_ENABLE)), yes)
  141. OPT_DEFS += -DAUTO_SHIFT_ENABLE
  142. SRC += $(QUANTUM_DIR)/process_keycode/process_auto_shift.c
  143. ifeq ($(strip $(AUTO_SHIFT_MODIFIERS)), yes)
  144. OPT_DEFS += -DAUTO_SHIFT_MODIFIERS
  145. endif
  146. endif
  147. ifeq ($(strip $(SERIAL_LINK_ENABLE)), yes)
  148. SRC += $(patsubst $(QUANTUM_PATH)/%,%,$(SERIAL_SRC))
  149. OPT_DEFS += $(SERIAL_DEFS)
  150. VAPTH += $(SERIAL_PATH)
  151. endif
  152. ifneq ($(strip $(VARIABLE_TRACE)),)
  153. SRC += $(QUANTUM_DIR)/variable_trace.c
  154. OPT_DEFS += -DNUM_TRACED_VARIABLES=$(strip $(VARIABLE_TRACE))
  155. ifneq ($(strip $(MAX_VARIABLE_TRACE_SIZE)),)
  156. OPT_DEFS += -DMAX_VARIABLE_TRACE_SIZE=$(strip $(MAX_VARIABLE_TRACE_SIZE))
  157. endif
  158. endif
  159. ifeq ($(strip $(LCD_ENABLE)), yes)
  160. CIE1931_CURVE = yes
  161. endif
  162. ifeq ($(strip $(BACKLIGHT_ENABLE)), yes)
  163. ifeq ($(strip $(VISUALIZER_ENABLE)), yes)
  164. CIE1931_CURVE = yes
  165. endif
  166. ifeq ($(strip $(BACKLIGHT_CUSTOM_DRIVER)), yes)
  167. OPT_DEFS += -DBACKLIGHT_CUSTOM_DRIVER
  168. endif
  169. endif
  170. ifeq ($(strip $(CIE1931_CURVE)), yes)
  171. OPT_DEFS += -DUSE_CIE1931_CURVE
  172. LED_TABLES = yes
  173. endif
  174. ifeq ($(strip $(LED_BREATHING_TABLE)), yes)
  175. OPT_DEFS += -DUSE_LED_BREATHING_TABLE
  176. LED_TABLES = yes
  177. endif
  178. ifeq ($(strip $(LED_TABLES)), yes)
  179. SRC += $(QUANTUM_DIR)/led_tables.c
  180. endif
  181. ifeq ($(strip $(TERMINAL_ENABLE)), yes)
  182. SRC += $(QUANTUM_DIR)/process_keycode/process_terminal.c
  183. OPT_DEFS += -DTERMINAL_ENABLE
  184. OPT_DEFS += -DUSER_PRINT
  185. endif
  186. ifeq ($(strip $(USB_HID_ENABLE)), yes)
  187. include $(TMK_DIR)/protocol/usb_hid.mk
  188. endif
  189. ifeq ($(strip $(ENCODER_ENABLE)), yes)
  190. SRC += $(QUANTUM_DIR)/encoder.c
  191. OPT_DEFS += -DENCODER_ENABLE
  192. endif
  193. ifeq ($(strip $(HAPTIC_ENABLE)), DRV2605L)
  194. COMMON_VPATH += $(DRIVER_PATH)/haptic
  195. SRC += DRV2605L.c
  196. SRC += i2c_master.c
  197. OPT_DEFS += -DDRV2605L
  198. endif
  199. ifeq ($(strip $(HD44780_ENABLE)), yes)
  200. SRC += drivers/avr/hd44780.c
  201. OPT_DEFS += -DHD44780_ENABLE
  202. endif
  203. ifeq ($(strip $(DYNAMIC_KEYMAP_ENABLE)), yes)
  204. OPT_DEFS += -DDYNAMIC_KEYMAP_ENABLE
  205. SRC += $(QUANTUM_DIR)/dynamic_keymap.c
  206. endif
  207. ifeq ($(strip $(LEADER_ENABLE)), yes)
  208. SRC += $(QUANTUM_DIR)/process_keycode/process_leader.c
  209. OPT_DEFS += -DLEADER_ENABLE
  210. endif
  211. include $(DRIVER_PATH)/qwiic/qwiic.mk
  212. QUANTUM_SRC:= \
  213. $(QUANTUM_DIR)/quantum.c \
  214. $(QUANTUM_DIR)/keymap_common.c \
  215. $(QUANTUM_DIR)/keycode_config.c
  216. ifneq ($(strip $(CUSTOM_MATRIX)), yes)
  217. ifeq ($(strip $(SPLIT_KEYBOARD)), yes)
  218. QUANTUM_SRC += $(QUANTUM_DIR)/split_common/matrix.c
  219. else
  220. QUANTUM_SRC += $(QUANTUM_DIR)/matrix.c
  221. endif
  222. endif
  223. ifeq ($(strip $(SPLIT_KEYBOARD)), yes)
  224. SERIAL_BACKWARD_COMPAT := $(wildcard $(QUANTUM_DIR)/split_common/serial_backward_compatibility.h)
  225. ifneq ($(SERIAL_BACKWARD_COMPAT),)
  226. CONFIG_H += $(SERIAL_BACKWARD_COMPAT)
  227. # $(info CONFIG_H=$(CONFIG_H))
  228. endif
  229. OPT_DEFS += -DSPLIT_KEYBOARD
  230. QUANTUM_SRC += $(QUANTUM_DIR)/split_common/split_flags.c \
  231. $(QUANTUM_DIR)/split_common/split_util.c \
  232. $(QUANTUM_DIR)/split_common/i2c.c \
  233. $(QUANTUM_DIR)/split_common/serial.c
  234. endif