config.h 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211
  1. /*
  2. Copyright 2012 Jun Wako <wakojun@gmail.com>
  3. Copyright 2013 Oleg Kostyuk <cub.uanic@gmail.com>
  4. Copyright 2015 ZSA Technology Labs Inc (@zsa)
  5. Copyright 2020 Christopher Courtney <drashna@live.com> (@drashna)
  6. This program is free software: you can redistribute it and/or modify
  7. it under the terms of the GNU General Public License as published by
  8. the Free Software Foundation, either version 2 of the License, or
  9. (at your option) any later version.
  10. This program is distributed in the hope that it will be useful,
  11. but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. GNU General Public License for more details.
  14. You should have received a copy of the GNU General Public License
  15. along with this program. If not, see <http://www.gnu.org/licenses/>.
  16. */
  17. #pragma once
  18. #include "config_common.h"
  19. /* key matrix size */
  20. #define MATRIX_ROWS 14
  21. #define MATRIX_ROWS_PER_SIDE (MATRIX_ROWS / 2)
  22. #define MATRIX_COLS 6
  23. #define COL_EXPANDED { true, true, true, true, true, true, true, false, false, false, false, false, false, false }
  24. #define MATRIX_ONBOARD_ROW_PINS { 0, 0, 0, 0, 0, 0, 0, B0, B1, B2, B3, D2, D3, C6 }
  25. #define MATRIX_ONBOARD_COL_PINS { F0, F1, F4, F5, F6, F7 }
  26. #define DIODE_DIRECTION COL2ROW
  27. #define EXPANDER_COL_REGISTER GPIOB
  28. #define EXPANDER_ROW_REGISTER GPIOA
  29. #define MATRIX_EXPANDER_COL_PINS { 5, 4, 3, 2, 1, 0 }
  30. #define MATRIX_EXPANDER_ROW_PINS { 0, 1, 2, 3, 4, 5, 6 }
  31. #define MOUSEKEY_INTERVAL 20
  32. #define MOUSEKEY_DELAY 0
  33. #define MOUSEKEY_TIME_TO_MAX 60
  34. #define MOUSEKEY_MAX_SPEED 7
  35. #define MOUSEKEY_WHEEL_DELAY 400
  36. #define MOUSEKEY_WHEEL_INTERVAL MOUSEKEY_INTERVAL
  37. #define MOUSEKEY_WHEEL_MAX_SPEED MOUSEKEY_MAX_SPEED
  38. #define MOUSEKEY_WHEEL_TIME_TO_MAX MOUSEKEY_TIME_TO_MAX
  39. #define DEBOUNCE 30
  40. #define TAPPING_TOGGLE 1
  41. /* define if matrix has ghost */
  42. //#define MATRIX_HAS_GHOST
  43. #define TAPPING_TERM 200
  44. #define IGNORE_MOD_TAP_INTERRUPT // this makes it possible to do rolling combos (zx) with keys that convert to other keys on hold (z becomes ctrl when you hold it, and when this option isn't enabled, z rapidly followed by x actually sends Ctrl-x. That's bad.)
  45. /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
  46. #define LOCKING_SUPPORT_ENABLE
  47. /* Locking resynchronize hack */
  48. #define LOCKING_RESYNC_ENABLE
  49. /* key combination for command */
  50. #define IS_COMMAND() ( \
  51. get_mods() == (MOD_BIT(KC_LCTL) | MOD_BIT(KC_RCTL)) || \
  52. get_mods() == (MOD_BIT(KC_LSFT) | MOD_BIT(KC_RSFT)) \
  53. )
  54. /* number of backlight levels */
  55. #define BACKLIGHT_LEVELS 3
  56. #ifndef LED_BRIGHTNESS_LO
  57. #define LED_BRIGHTNESS_LO 15
  58. #endif
  59. #ifndef LED_BRIGHTNESS_HI
  60. #define LED_BRIGHTNESS_HI 255
  61. #endif
  62. #define LED_BRIGHTNESS_DEFAULT (LED_BRIGHTNESS_HI)
  63. /* ws2812 RGB LED */
  64. #define RGB_DI_PIN D7
  65. #define RGBLIGHT_EFFECT_BREATHING
  66. #define RGBLIGHT_EFFECT_RAINBOW_MOOD
  67. #define RGBLIGHT_EFFECT_RAINBOW_SWIRL
  68. #define RGBLIGHT_EFFECT_SNAKE
  69. #define RGBLIGHT_EFFECT_KNIGHT
  70. #define RGBLIGHT_EFFECT_CHRISTMAS
  71. #define RGBLIGHT_EFFECT_STATIC_GRADIENT
  72. #define RGBLIGHT_EFFECT_RGB_TEST
  73. #define RGBLIGHT_EFFECT_ALTERNATING
  74. #define RGBLIGHT_EFFECT_TWINKLE
  75. #define RGBLIGHT_HUE_STEP 12
  76. #define RGBLIGHT_SAT_STEP 255
  77. #define RGBLIGHT_VAL_STEP 12
  78. // Pick one of the modes
  79. // Defaults to 15 mirror, for legacy behavior
  80. // #define ERGODOX_LED_15 // Addresses 15 LEDs, but same position on both halves
  81. // #define ERGODOX_LED_15_MIRROR // Addresses 15 LEDs, but are mirrored
  82. // #define ERGODOX_LED_30 // Addresses all 30 LED individually
  83. /* fix space cadet rollover issue */
  84. #define DISABLE_SPACE_CADET_ROLLOVER
  85. #define RGBW
  86. #define RGBLIGHT_SLEEP
  87. /*
  88. * The debounce filtering reports a key/switch change directly,
  89. * without any extra delay. After that the debounce logic will filter
  90. * all further changes, until the key/switch reports the same state for
  91. * the given count of scans.
  92. * So a perfect switch will get a short debounce period and
  93. * a bad key will get a much longer debounce period.
  94. * The result is an adaptive debouncing period for each switch.
  95. *
  96. * If you don't define it here, the matrix code will default to
  97. * 5, which is now closer to 10ms, but still plenty according to
  98. * manufacturer specs.
  99. */
  100. // RGB backlight
  101. #define DRIVER_ADDR_1 0b1110100
  102. #define DRIVER_ADDR_2 0b1110111
  103. #define DRIVER_COUNT 2
  104. #define DRIVER_1_LED_TOTAL 24
  105. #define DRIVER_2_LED_TOTAL 24
  106. #define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)
  107. #define RGB_MATRIX_LED_PROCESS_LIMIT 5
  108. #define RGB_MATRIX_LED_FLUSH_LIMIT 26
  109. #define RGB_DISABLE_WHEN_USB_SUSPENDED
  110. // RGB Matrix Animation modes. Explicitly enabled
  111. // For full list of effects, see:
  112. // https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects
  113. #define ENABLE_RGB_MATRIX_ALPHAS_MODS
  114. #define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN
  115. #define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT
  116. #define ENABLE_RGB_MATRIX_BREATHING
  117. #define ENABLE_RGB_MATRIX_BAND_SAT
  118. #define ENABLE_RGB_MATRIX_BAND_VAL
  119. #define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT
  120. #define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL
  121. #define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT
  122. #define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL
  123. #define ENABLE_RGB_MATRIX_CYCLE_ALL
  124. #define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT
  125. #define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN
  126. #define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON
  127. #define ENABLE_RGB_MATRIX_CYCLE_OUT_IN
  128. #define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL
  129. #define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL
  130. #define ENABLE_RGB_MATRIX_CYCLE_SPIRAL
  131. #define ENABLE_RGB_MATRIX_DUAL_BEACON
  132. #define ENABLE_RGB_MATRIX_RAINBOW_BEACON
  133. #define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS
  134. #define ENABLE_RGB_MATRIX_RAINDROPS
  135. #define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS
  136. #define ENABLE_RGB_MATRIX_HUE_BREATHING
  137. #define ENABLE_RGB_MATRIX_HUE_PENDULUM
  138. #define ENABLE_RGB_MATRIX_HUE_WAVE
  139. #define ENABLE_RGB_MATRIX_PIXEL_RAIN
  140. #define ENABLE_RGB_MATRIX_PIXEL_FLOW
  141. #define ENABLE_RGB_MATRIX_PIXEL_FRACTAL
  142. // enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined
  143. #define ENABLE_RGB_MATRIX_TYPING_HEATMAP
  144. #define ENABLE_RGB_MATRIX_DIGITAL_RAIN
  145. // enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined
  146. #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE
  147. #define ENABLE_RGB_MATRIX_SOLID_REACTIVE
  148. #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE
  149. #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE
  150. #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS
  151. #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS
  152. #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS
  153. #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS
  154. #define ENABLE_RGB_MATRIX_SPLASH
  155. #define ENABLE_RGB_MATRIX_MULTISPLASH
  156. #define ENABLE_RGB_MATRIX_SOLID_SPLASH
  157. #define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH
  158. // #define RGBLIGHT_COLOR_LAYER_0 0x00, 0x00, 0xFF
  159. /* #define RGBLIGHT_COLOR_LAYER_1 0x00, 0x00, 0xFF */
  160. /* #define RGBLIGHT_COLOR_LAYER_2 0xFF, 0x00, 0x00 */
  161. /* #define RGBLIGHT_COLOR_LAYER_3 0x00, 0xFF, 0x00 */
  162. /* #define RGBLIGHT_COLOR_LAYER_4 0xFF, 0xFF, 0x00 */
  163. /* #define RGBLIGHT_COLOR_LAYER_5 0x00, 0xFF, 0xFF */
  164. /* #define RGBLIGHT_COLOR_LAYER_6 0xFF, 0x00, 0xFF */
  165. /* #define RGBLIGHT_COLOR_LAYER_7 0xFF, 0xFF, 0xFF */
  166. /*
  167. * Feature disable options
  168. * These options are also useful to firmware size reduction.
  169. */
  170. /* disable debug print */
  171. // #define NO_DEBUG
  172. /* disable print */
  173. // #define NO_PRINT
  174. /* disable action features */
  175. //#define NO_ACTION_LAYER
  176. //#define NO_ACTION_TAPPING
  177. //#define NO_ACTION_ONESHOT
  178. //#define DEBUG_MATRIX_SCAN_RATE