config.h 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160
  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. /*
  18. * Keyboard Matrix Assignments
  19. *
  20. * Change this to how you wired your keyboard
  21. * COLS: AVR pins used for columns, left to right
  22. * ROWS: AVR pins used for rows, top to bottom
  23. * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
  24. * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
  25. *
  26. */
  27. #define MATRIX_ROW_PINS { B5, B4, D7, F6, C6, D4 }
  28. #define MATRIX_COL_PINS { D1, E6, F7, B1, B3, B2, D0 }
  29. #define MASTER_RIGHT
  30. #ifndef MASTER_RIGHT
  31. // 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.
  32. # define SPLIT_HAND_MATRIX_GRID B5, D0
  33. #endif
  34. /* COL2ROW, ROW2COL */
  35. #define DIODE_DIRECTION COL2ROW
  36. #define SPLIT_USB_DETECT
  37. #define RGB_DI_PIN D3
  38. #ifdef RGB_MATRIX_ENABLE
  39. /* ws2812 RGB MATRIX */
  40. # define RGB_MATRIX_LED_COUNT 76
  41. // reacts to keypresses
  42. # define RGB_MATRIX_KEYPRESSES
  43. // for all fingers used at once.
  44. # define LED_HITS_TO_REMEMBER 10
  45. # define RGB_MATRIX_MAXIMUM_BRIGHTNESS 50
  46. # define RGB_MATRIX_DEFAULT_SPD 127
  47. // the above brighness setting has no effect on rgb_matrix_set_color().
  48. // Use darker colors instead.
  49. /* RGB darker COLORS */
  50. # define RGB_DARKWHITE 0x33, 0x33, 0x33
  51. # define RGB_DARKRED 0x33, 0x0, 0x0
  52. # define RGB_DARKCORAL 0x33, 0x18, 0xF
  53. # define RGB_DARKORANGE 0x33, 0x19, 0x0
  54. # define RGB_DARKGOLDENROD 0x2B, 0x21, 0x6
  55. # define RGB_DARKGOLD 0x33, 0x2B, 0x0
  56. # define RGB_DARKYELLOW 0x33, 0x33, 0x0
  57. # define RGB_DARKCHARTREUSE 0x19, 0x33, 0x0
  58. # define RGB_DARKGREEN 0x0, 0x33, 0x0
  59. # define RGB_DARKSPRINGGREEN 0x0, 0x33, 0x19
  60. # define RGB_DARKTURQUOISE 0xE, 0x16, 0x15
  61. # define RGB_DARKTEAL 0x0, 0x19, 0x19
  62. # define RGB_DARKCYAN 0x0, 0x33, 0x33
  63. # define RGB_DARKAZURE 0x1E, 0x31, 0x33
  64. # define RGB_DARKBLUE 0x0, 0x0, 0x33
  65. # define RGB_DARKPURPLE 0x18, 0x0, 0x33
  66. # define RGB_DARKMAGENTA 0x33, 0x0, 0x33
  67. # define RGB_DARKPINK 0x33, 0x19, 0x26
  68. // https://docs.qmk.fm/#/feature_rgb_matrix
  69. // Enable suspend mode.
  70. # define RGB_DISABLE_WHEN_USB_SUSPENDED true
  71. # ifdef CONSOLE_ENABLE
  72. # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE
  73. # else
  74. // #define ENABLE_RGB_MATRIX_ALPHAS_MODS
  75. # define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN
  76. # define ENABLE_RGB_MATRIX_BREATHING
  77. # define ENABLE_RGB_MATRIX_BAND_SAT
  78. # define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT
  79. # define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT
  80. # define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT
  81. # define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS
  82. // #define ENABLE_RGB_MATRIX_TYPING_HEATMAP
  83. # define ENABLE_RGB_MATRIX_DIGITAL_RAIN
  84. # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE
  85. # define ENABLE_RGB_MATRIX_SOLID_REACTIVE
  86. # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE
  87. # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS
  88. # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS
  89. # define ENABLE_RGB_MATRIX_SPLASH
  90. # define ENABLE_RGB_MATRIX_SOLID_SPLASH
  91. // RAINDROPS don't match well with layer LED indicator (oc) using rgb_matrix_set_color().
  92. // #define ENABLE_RGB_MATRIX_RAINDROPS
  93. // #define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS
  94. // Recommendend not to use these.
  95. # ifndef VIA_ENABLE
  96. # define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT
  97. # define ENABLE_RGB_MATRIX_BAND_VAL
  98. # define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL
  99. # define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL
  100. # define ENABLE_RGB_MATRIX_CYCLE_ALL
  101. # define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN
  102. # define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON
  103. # define ENABLE_RGB_MATRIX_CYCLE_OUT_IN
  104. # define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL
  105. # define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL
  106. # define ENABLE_RGB_MATRIX_CYCLE_SPIRAL
  107. # define ENABLE_RGB_MATRIX_DUAL_BEACON
  108. # define ENABLE_RGB_MATRIX_RAINBOW_BEACON
  109. # define ENABLE_RGB_MATRIX_HUE_BREATHING
  110. # define ENABLE_RGB_MATRIX_HUE_PENDULUM
  111. # define ENABLE_RGB_MATRIX_HUE_WAVE
  112. # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE
  113. # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS
  114. # define ENABLE_RGB_MATRIX_MULTISPLASH
  115. # define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH
  116. # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS
  117. # endif
  118. # endif // CONSOLE_ENABLE
  119. #endif // RGB_MATRIX_ENABLE
  120. /*
  121. * Feature disable options
  122. * These options are also useful to firmware size reduction.
  123. */
  124. /* disable debug print */
  125. //#define NO_DEBUG
  126. /* disable print */
  127. //#define NO_PRINT
  128. /* disable action features */
  129. //#define NO_ACTION_LAYER
  130. /* 2021/01/22 added to shrink firmware size */
  131. // NO_ACTION_TAPPING -1964 bytes, however, this disables Layer mods...
  132. // #define NO_ACTION_TAPPING
  133. // NO_ACTION_ONESHOT -388 bytes
  134. #define NO_ACTION_ONESHOT
  135. #ifdef MIDI_ENABLE
  136. # define MIDI_ADVANCED
  137. // Initial velocity value (avoid using 127 since it is used as a special number in some sound sources.)
  138. # define MIDI_INITIAL_VELOCITY 117
  139. #endif // MIDI_ENABLE
  140. #define TAP_CODE_DELAY 10