config.h 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243
  1. /*
  2. Copyright 2020 yushakobo
  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. This program is distributed in the hope that it will be useful,
  8. but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10. GNU General Public License for more details.
  11. You should have received a copy of the GNU General Public License
  12. along with this program. If not, see <http://www.gnu.org/licenses/>.
  13. */
  14. #pragma once
  15. #include "config_common.h"
  16. #include <stdio.h>
  17. /* USB Device descriptor parameter */
  18. #define VENDOR_ID 0x3265 //yushakobo
  19. #define PRODUCT_ID 0x0004 //Helix rev3 4rows
  20. #define DEVICE_VER 0x0001
  21. #define MANUFACTURER yushakobo
  22. #define PRODUCT Helix rev3 4rows
  23. /* key matrix size */
  24. #define MATRIX_ROWS 8
  25. #define MATRIX_COLS 7
  26. /*
  27. * Keyboard Matrix Assignments
  28. *
  29. * Change this to how you wired your keyboard
  30. * COLS: AVR pins used for columns, left to right
  31. * ROWS: AVR pins used for rows, top to bottom
  32. * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
  33. * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
  34. *
  35. */
  36. #define MATRIX_ROW_PINS { D4, C6, D7, E6 }
  37. #define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2 }
  38. #define UNUSED_PINS
  39. /* COL2ROW, ROW2COL*/
  40. #define DIODE_DIRECTION COL2ROW
  41. /* Split hand configration */
  42. #define SPLIT_HAND_MATRIX_GRID D7,B2
  43. #define SPLIT_HAND_MATRIX_GRID_LOW_IS_RIGHT
  44. /* Dip switch on matrix grid */
  45. #define DIP_SWITCH_MATRIX_GRID { {0,6}, {1,6}, {5,6}, {6,6} }
  46. /*
  47. * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN.
  48. */
  49. #define SOFT_SERIAL_PIN D2 // or D1, D2, D3, E6
  50. #define RGB_DI_PIN D3
  51. #define RGBLED_NUM 50 // Number of LEDs
  52. #ifdef RGB_MATRIX_ENABLE
  53. #define DRIVER_LED_TOTAL RGBLED_NUM
  54. # define RGB_MATRIX_KEYPRESSES // reacts to keypresses
  55. // # define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses)
  56. // # define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
  57. # define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
  58. # define RGB_MATRIX_FRAMEBUFFER_EFFECTS
  59. // # define RGB_MATRIX_LED_PROCESS_LIMIT (DRIVER_LED_TOTAL + 4) / 5 // limits the number of LEDs to process in an animation per task run (increases keyboard responsiveness)
  60. // # define RGB_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness)
  61. # define RGB_MATRIX_MAXIMUM_BRIGHTNESS 150 // limits maximum brightness of LEDs to 150 out of 255. Higher may cause the controller to crash.
  62. # define RGB_MATRIX_HUE_STEP 8
  63. # define RGB_MATRIX_SAT_STEP 8
  64. # define RGB_MATRIX_VAL_STEP 8
  65. # define RGB_MATRIX_SPD_STEP 10
  66. #endif
  67. #ifdef RGBLIGHT_ENABLE
  68. #define RGBLIGHT_SPLIT
  69. #define RGBLED_SPLIT { 25, 25 }
  70. // #define RGBLIGHT_HUE_STEP 8
  71. // #define RGBLIGHT_SAT_STEP 8
  72. // #define RGBLIGHT_VAL_STEP 8
  73. #define RGBLIGHT_LIMIT_VAL 120 /* The maximum brightness level */
  74. // #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */
  75. // /*== all animations enable ==*/
  76. // #define RGBLIGHT_ANIMATIONS
  77. // /*== or choose animations ==*/
  78. // #define RGBLIGHT_EFFECT_BREATHING
  79. #define RGBLIGHT_EFFECT_RAINBOW_MOOD
  80. #define RGBLIGHT_EFFECT_RAINBOW_SWIRL
  81. // #define RGBLIGHT_EFFECT_SNAKE
  82. // #define RGBLIGHT_EFFECT_KNIGHT
  83. // #define RGBLIGHT_EFFECT_CHRISTMAS
  84. #define RGBLIGHT_EFFECT_STATIC_GRADIENT
  85. #define RGBLIGHT_EFFECT_RGB_TEST
  86. // #define RGBLIGHT_EFFECT_ALTERNATING
  87. #endif
  88. /* Custom font */
  89. #define OLED_FONT_H "keyboards/helix/common/glcdfont.c"
  90. /* Encorder */
  91. #define ENCODERS_PAD_A { B6 }
  92. #define ENCODERS_PAD_B { B5 }
  93. /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
  94. #define DEBOUNCE 5
  95. /* define if matrix has ghost (lacks anti-ghosting diodes) */
  96. //#define MATRIX_HAS_GHOST
  97. /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
  98. #define LOCKING_SUPPORT_ENABLE
  99. /* Locking resynchronize hack */
  100. #define LOCKING_RESYNC_ENABLE
  101. /* If defined, GRAVE_ESC will always act as ESC when CTRL is held.
  102. * This is userful for the Windows task manager shortcut (ctrl+shift+esc).
  103. */
  104. // #define GRAVE_ESC_CTRL_OVERRIDE
  105. /*
  106. * Force NKRO
  107. *
  108. * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved
  109. * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the
  110. * makefile for this to work.)
  111. *
  112. * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N)
  113. * until the next keyboard reset.
  114. *
  115. * NKRO may prevent your keystrokes from being detected in the BIOS, but it is
  116. * fully operational during normal computer usage.
  117. *
  118. * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N)
  119. * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by
  120. * bootmagic, NKRO mode will always be enabled until it is toggled again during a
  121. * power-up.
  122. *
  123. */
  124. //#define FORCE_NKRO
  125. /*
  126. * Magic Key Options
  127. *
  128. * Magic keys are hotkey commands that allow control over firmware functions of
  129. * the keyboard. They are best used in combination with the HID Listen program,
  130. * found here: https://www.pjrc.com/teensy/hid_listen.html
  131. *
  132. * The options below allow the magic key functionality to be changed. This is
  133. * useful if your keyboard/keypad is missing keys and you want magic key support.
  134. *
  135. */
  136. /* key combination for magic key command */
  137. /* defined by default; to change, uncomment and set to the combination you want */
  138. // #define IS_COMMAND() (get_mods() == MOD_MASK_SHIFT)
  139. /* control how magic key switches layers */
  140. //#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true
  141. //#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true
  142. //#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false
  143. /* override magic key keymap */
  144. //#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS
  145. //#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS
  146. //#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM
  147. //#define MAGIC_KEY_HELP H
  148. //#define MAGIC_KEY_HELP_ALT SLASH
  149. //#define MAGIC_KEY_DEBUG D
  150. //#define MAGIC_KEY_DEBUG_MATRIX X
  151. //#define MAGIC_KEY_DEBUG_KBD K
  152. //#define MAGIC_KEY_DEBUG_MOUSE M
  153. //#define MAGIC_KEY_VERSION V
  154. //#define MAGIC_KEY_STATUS S
  155. //#define MAGIC_KEY_CONSOLE C
  156. //#define MAGIC_KEY_LAYER0 0
  157. //#define MAGIC_KEY_LAYER0_ALT GRAVE
  158. //#define MAGIC_KEY_LAYER1 1
  159. //#define MAGIC_KEY_LAYER2 2
  160. //#define MAGIC_KEY_LAYER3 3
  161. //#define MAGIC_KEY_LAYER4 4
  162. //#define MAGIC_KEY_LAYER5 5
  163. //#define MAGIC_KEY_LAYER6 6
  164. //#define MAGIC_KEY_LAYER7 7
  165. //#define MAGIC_KEY_LAYER8 8
  166. //#define MAGIC_KEY_LAYER9 9
  167. //#define MAGIC_KEY_BOOTLOADER B
  168. //#define MAGIC_KEY_BOOTLOADER_ALT ESC
  169. //#define MAGIC_KEY_LOCK CAPS
  170. //#define MAGIC_KEY_EEPROM E
  171. //#define MAGIC_KEY_EEPROM_CLEAR BSPACE
  172. //#define MAGIC_KEY_NKRO N
  173. //#define MAGIC_KEY_SLEEP_LED Z
  174. /*
  175. * Feature disable options
  176. * These options are also useful to firmware size reduction.
  177. */
  178. /* disable debug print */
  179. //#define NO_DEBUG
  180. /* disable print */
  181. //#define NO_PRINT
  182. /* disable action features */
  183. //#define NO_ACTION_LAYER
  184. //#define NO_ACTION_TAPPING
  185. //#define NO_ACTION_ONESHOT
  186. /* disable these deprecated features by default */
  187. #define NO_ACTION_MACRO
  188. #define NO_ACTION_FUNCTION
  189. /*
  190. * MIDI options
  191. */
  192. /* enable basic MIDI features:
  193. - MIDI notes can be sent when in Music mode is on
  194. */
  195. //#define MIDI_BASIC
  196. /* enable advanced MIDI features:
  197. - MIDI notes can be added to the keymap
  198. - Octave shift and transpose
  199. - Virtual sustain, portamento, and modulation wheel
  200. - etc.
  201. */
  202. //#define MIDI_ADVANCED
  203. /* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
  204. //#define MIDI_TONE_KEYCODE_OCTAVES 1
  205. /* Bootmagic Lite key configuration */
  206. // #define BOOTMAGIC_LITE_ROW 0
  207. // #define BOOTMAGIC_LITE_COLUMN 0