config.h 8.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246
  1. /* Copyright 2021 3araht
  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. */
  16. #pragma once
  17. #include "config_common.h"
  18. /* key matrix size */
  19. #define MATRIX_ROWS 12
  20. #define MATRIX_COLS 7
  21. /*
  22. * Keyboard Matrix Assignments
  23. *
  24. * Change this to how you wired your keyboard
  25. * COLS: AVR pins used for columns, left to right
  26. * ROWS: AVR pins used for rows, top to bottom
  27. * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
  28. * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
  29. *
  30. */
  31. #define MATRIX_ROW_PINS { B5, B4, D7, F6, C6, D4 }
  32. #define MATRIX_COL_PINS { D1, E6, F7, B1, B3, B2, D0 }
  33. #define MASTER_RIGHT
  34. #ifndef MASTER_RIGHT
  35. // SPLIT_HAND_MATRIX_GRID was initially designed to use with left hand side diode D35 mounted and not pressing K7 on the right hand side during boot. However when a USB cable is reconnected immediately, it fails. Decided to use "MASTER_RIGHT" to make it more reliable.
  36. # define SPLIT_HAND_MATRIX_GRID B5, D0
  37. #endif
  38. /* COL2ROW, ROW2COL */
  39. #define DIODE_DIRECTION COL2ROW
  40. /*
  41. * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN.
  42. */
  43. #define SOFT_SERIAL_PIN D2 // or D1, D2, D3, E6
  44. #define SPLIT_USB_DETECT
  45. //#define LED_NUM_LOCK_PIN B0
  46. //#define LED_CAPS_LOCK_PIN B1
  47. //#define LED_SCROLL_LOCK_PIN B2
  48. //#define LED_COMPOSE_PIN B3
  49. //#define LED_KANA_PIN B4
  50. //#define BACKLIGHT_PIN B7
  51. //#define BACKLIGHT_LEVELS 3
  52. //#define BACKLIGHT_BREATHING
  53. #define RGB_DI_PIN D3
  54. //#ifdef RGB_DI_PIN
  55. //# define RGBLED_NUM 16
  56. //# define RGBLIGHT_HUE_STEP 8
  57. //# define RGBLIGHT_SAT_STEP 8
  58. //# define RGBLIGHT_VAL_STEP 8
  59. //# define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */
  60. //# define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */
  61. /*== customize breathing effect ==*/
  62. /*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/
  63. //# define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64
  64. /*==== use exp() and sin() ====*/
  65. //# define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7
  66. //# define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255
  67. //#endif
  68. #ifdef RGB_MATRIX_ENABLE
  69. /* ws2812 RGB MATRIX */
  70. # define RGB_MATRIX_LED_COUNT 76
  71. // reacts to keypresses
  72. # define RGB_MATRIX_KEYPRESSES
  73. // for all fingers used at once.
  74. # define LED_HITS_TO_REMEMBER 10
  75. # define RGB_MATRIX_MAXIMUM_BRIGHTNESS 50
  76. # define RGB_MATRIX_STARTUP_SPD 127
  77. // the above brighness setting has no effect on rgb_matrix_set_color().
  78. // Use darker colors instead.
  79. /* RGB darker COLORS */
  80. # define RGB_DARKWHITE 0x33, 0x33, 0x33
  81. # define RGB_DARKRED 0x33, 0x0, 0x0
  82. # define RGB_DARKCORAL 0x33, 0x18, 0xF
  83. # define RGB_DARKORANGE 0x33, 0x19, 0x0
  84. # define RGB_DARKGOLDENROD 0x2B, 0x21, 0x6
  85. # define RGB_DARKGOLD 0x33, 0x2B, 0x0
  86. # define RGB_DARKYELLOW 0x33, 0x33, 0x0
  87. # define RGB_DARKCHARTREUSE 0x19, 0x33, 0x0
  88. # define RGB_DARKGREEN 0x0, 0x33, 0x0
  89. # define RGB_DARKSPRINGGREEN 0x0, 0x33, 0x19
  90. # define RGB_DARKTURQUOISE 0xE, 0x16, 0x15
  91. # define RGB_DARKTEAL 0x0, 0x19, 0x19
  92. # define RGB_DARKCYAN 0x0, 0x33, 0x33
  93. # define RGB_DARKAZURE 0x1E, 0x31, 0x33
  94. # define RGB_DARKBLUE 0x0, 0x0, 0x33
  95. # define RGB_DARKPURPLE 0x18, 0x0, 0x33
  96. # define RGB_DARKMAGENTA 0x33, 0x0, 0x33
  97. # define RGB_DARKPINK 0x33, 0x19, 0x26
  98. // https://docs.qmk.fm/#/feature_rgb_matrix
  99. // Enable suspend mode.
  100. # define RGB_DISABLE_WHEN_USB_SUSPENDED true
  101. # ifdef CONSOLE_ENABLE
  102. # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE
  103. # else
  104. // #define ENABLE_RGB_MATRIX_ALPHAS_MODS
  105. # define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN
  106. # define ENABLE_RGB_MATRIX_BREATHING
  107. # define ENABLE_RGB_MATRIX_BAND_SAT
  108. # define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT
  109. # define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT
  110. # define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT
  111. # define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS
  112. // #define ENABLE_RGB_MATRIX_TYPING_HEATMAP
  113. # define ENABLE_RGB_MATRIX_DIGITAL_RAIN
  114. # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE
  115. # define ENABLE_RGB_MATRIX_SOLID_REACTIVE
  116. # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE
  117. # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS
  118. # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS
  119. # define ENABLE_RGB_MATRIX_SPLASH
  120. # define ENABLE_RGB_MATRIX_SOLID_SPLASH
  121. // RAINDROPS don't match well with layer LED indicator (oc) using rgb_matrix_set_color().
  122. // #define ENABLE_RGB_MATRIX_RAINDROPS
  123. // #define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS
  124. // Recommendend not to use these.
  125. # ifndef VIA_ENABLE
  126. # define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT
  127. # define ENABLE_RGB_MATRIX_BAND_VAL
  128. # define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL
  129. # define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL
  130. # define ENABLE_RGB_MATRIX_CYCLE_ALL
  131. # define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN
  132. # define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON
  133. # define ENABLE_RGB_MATRIX_CYCLE_OUT_IN
  134. # define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL
  135. # define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL
  136. # define ENABLE_RGB_MATRIX_CYCLE_SPIRAL
  137. # define ENABLE_RGB_MATRIX_DUAL_BEACON
  138. # define ENABLE_RGB_MATRIX_RAINBOW_BEACON
  139. # define ENABLE_RGB_MATRIX_HUE_BREATHING
  140. # define ENABLE_RGB_MATRIX_HUE_PENDULUM
  141. # define ENABLE_RGB_MATRIX_HUE_WAVE
  142. # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE
  143. # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS
  144. # define ENABLE_RGB_MATRIX_MULTISPLASH
  145. # define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH
  146. # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS
  147. # endif
  148. # endif // CONSOLE_ENABLE
  149. #endif // RGB_MATRIX_ENABLE
  150. /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
  151. #define DEBOUNCE 5
  152. /* define if matrix has ghost (lacks anti-ghosting diodes) */
  153. //#define MATRIX_HAS_GHOST
  154. /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
  155. // #define LOCKING_SUPPORT_ENABLE
  156. /* Locking resynchronize hack */
  157. // #define LOCKING_RESYNC_ENABLE
  158. /* If defined, GRAVE_ESC will always act as ESC when CTRL is held.
  159. * This is useful for the Windows task manager shortcut (ctrl+shift+esc).
  160. */
  161. //#define GRAVE_ESC_CTRL_OVERRIDE
  162. /*
  163. * Force NKRO
  164. *
  165. * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved
  166. * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the
  167. * makefile for this to work.)
  168. *
  169. * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N)
  170. * until the next keyboard reset.
  171. *
  172. * NKRO may prevent your keystrokes from being detected in the BIOS, but it is
  173. * fully operational during normal computer usage.
  174. *
  175. * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N)
  176. * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by
  177. * bootmagic, NKRO mode will always be enabled until it is toggled again during a
  178. * power-up.
  179. *
  180. */
  181. //#define FORCE_NKRO
  182. /*
  183. * Feature disable options
  184. * These options are also useful to firmware size reduction.
  185. */
  186. /* disable debug print */
  187. //#define NO_DEBUG
  188. /* disable print */
  189. //#define NO_PRINT
  190. /* disable action features */
  191. //#define NO_ACTION_LAYER
  192. /* 2021/01/22 added to shrink firmware size */
  193. // NO_ACTION_TAPPING -1964 bytes, however, this disables Layer mods...
  194. // #define NO_ACTION_TAPPING
  195. // NO_ACTION_ONESHOT -388 bytes
  196. #define NO_ACTION_ONESHOT
  197. /* Bootmagic Lite key configuration */
  198. //#define BOOTMAGIC_LITE_ROW 0
  199. //#define BOOTMAGIC_LITE_COLUMN 0
  200. #ifdef MIDI_ENABLE
  201. # define MIDI_ADVANCED
  202. // Initial velocity value (avoid using 127 since it is used as a special number in some sound sources.)
  203. # define MIDI_INITIAL_VELOCITY 117
  204. #endif // MIDI_ENABLE
  205. /*
  206. * Encoder options
  207. */
  208. #ifdef ENCODER_ENABLE
  209. # define ENCODERS_PAD_A { }
  210. # define ENCODERS_PAD_B { }
  211. # define ENCODER_RESOLUTIONS { }
  212. # define ENCODERS_PAD_A_RIGHT { F5 }
  213. # define ENCODERS_PAD_B_RIGHT { F4 }
  214. # define ENCODER_RESOLUTIONS_RIGHT { 4 }
  215. # define TAP_CODE_DELAY 10
  216. #endif // ENCODER_ENABLE