config.h 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205
  1. /* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com>
  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. // Use custom magic number so that when switching branches, EEPROM always gets reset
  18. #define EECONFIG_MAGIC_NUMBER (uint16_t)0x1339
  19. /* Set Polling rate to 1000Hz */
  20. #define USB_POLLING_INTERVAL_MS 1
  21. #if defined(SPLIT_KEYBOARD)
  22. # define SPLIT_MODS_ENABLE
  23. # define SPLIT_TRANSPORT_MIRROR
  24. # define SERIAL_USE_MULTI_TRANSACTION
  25. // # define SPLIT_NUM_TRANSACTIONS_KB 2
  26. #endif
  27. #ifdef AUDIO_ENABLE
  28. # define AUDIO_CLICKY
  29. # define STARTUP_SONG SONG(RICK_ROLL)
  30. # define GOODBYE_SONG SONG(SONIC_RING)
  31. # define DEFAULT_LAYER_SONGS \
  32. { SONG(QWERTY_SOUND), SONG(COLEMAK_SOUND), SONG(DVORAK_SOUND), SONG(OVERWATCH_THEME) }
  33. # define AUDIO_CLICKY_FREQ_RANDOMNESS 1.5f
  34. # define UNICODE_SONG_MAC SONG(RICK_ROLL)
  35. # define UNICODE_SONG_LNX SONG(RICK_ROLL)
  36. # define UNICODE_SONG_WIN SONG(RICK_ROLL)
  37. # define UNICODE_SONG_BSD SONG(RICK_ROLL)
  38. # define UNICODE_SONG_WINC SONG(RICK_ROLL)
  39. #endif // !AUDIO_ENABLE
  40. #ifdef RGBLIGHT_ENABLE
  41. # define RGBLIGHT_SLEEP
  42. # if defined(__AVR__) && !defined(__AVR_AT90USB1286__)
  43. # undef RGBLIGHT_ANIMATIONS
  44. # define RGBLIGHT_EFFECT_BREATHING
  45. # define RGBLIGHT_EFFECT_SNAKE
  46. # define RGBLIGHT_EFFECT_KNIGHT
  47. # else
  48. # define RGBLIGHT_ANIMATIONS
  49. # endif
  50. # define RGBLIGHT_EFFECT_TWINKLE_LIFE 250
  51. # define RGBLIGHT_EFFECT_TWINKLE_PROBABILITY 1/24
  52. #endif // RGBLIGHT_ENABLE
  53. #ifdef RGB_MATRIX_ENABLE
  54. # define RGB_MATRIX_KEYPRESSES // reacts to keypresses (will slow down matrix scan by a lot)
  55. // # define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (not recommened)
  56. # define RGB_MATRIX_FRAMEBUFFER_EFFECTS
  57. // # define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
  58. # define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended
  59. // # define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200 // limits maximum brightness of LEDs to 200 out of 255. If not defined maximum brightness is set to 255
  60. // # define EECONFIG_RGB_MATRIX (uint32_t *)16
  61. # if defined(__AVR__) && !defined(__AVR_AT90USB1286__) && !defined(KEYBOARD_launchpad)
  62. # define DISABLE_RGB_MATRIX_ALPHAS_MODS
  63. # define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN
  64. # define DISABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT
  65. # define DISABLE_RGB_MATRIX_BREATHING
  66. # define DISABLE_RGB_MATRIX_BAND_SAT
  67. # define DISABLE_RGB_MATRIX_BAND_VAL
  68. # define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT
  69. # define DISABLE_RGB_MATRIX_BAND_PINWHEEL_VAL
  70. # define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT
  71. # define DISABLE_RGB_MATRIX_BAND_SPIRAL_VAL
  72. # define DISABLE_RGB_MATRIX_CYCLE_ALL
  73. # define DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT
  74. # define DISABLE_RGB_MATRIX_CYCLE_UP_DOWN
  75. // # define DISABLE_RGB_MATRIX_CYCLE_OUT_IN
  76. // # define DISABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL
  77. # define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON
  78. # define DISABLE_RGB_MATRIX_DUAL_BEACON
  79. # define DISABLE_RGB_MATRIX_CYCLE_PINWHEEL
  80. # define DISABLE_RGB_MATRIX_CYCLE_SPIRAL
  81. # define DISABLE_RGB_MATRIX_RAINBOW_BEACON
  82. # define DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS
  83. # define DISABLE_RGB_MATRIX_RAINDROPS
  84. # define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS
  85. // # define DISABLE_RGB_MATRIX_TYPING_HEATMAP
  86. # define DISABLE_RGB_MATRIX_DIGITAL_RAIN
  87. # define DISABLE_RGB_MATRIX_SOLID_REACTIVE
  88. # define DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE
  89. # define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE
  90. # define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE
  91. # define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS
  92. # define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS
  93. # define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS
  94. # define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS
  95. # define DISABLE_RGB_MATRIX_SPLASH
  96. # define DISABLE_RGB_MATRIX_MULTISPLASH
  97. # define DISABLE_RGB_MATRIX_SOLID_SPLASH
  98. # define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH
  99. # endif // AVR
  100. #endif // RGB_MATRIX_ENABLE
  101. #ifdef OLED_DRIVER_ENABLE
  102. # ifdef SPLIT_KEYBOARD
  103. # define OLED_UPDATE_INTERVAL 60
  104. # else
  105. # define OLED_UPDATE_INTERVAL 15
  106. # endif
  107. # define OLED_DISABLE_TIMEOUT
  108. # ifdef OLED_FONT_H
  109. # undef OLED_FONT_H
  110. # endif
  111. # define OLED_FONT_H "drashna_font.h"
  112. # define OLED_FONT_END 255
  113. // # define OLED_FONT_5X5
  114. // # define OLED_FONT_AZTECH
  115. // # define OLED_FONT_BMPLAIN
  116. // # define OLED_FONT_SUPER_DIGG
  117. // # define OLED_LOGO_GMK_BAD
  118. // # define OLED_LOGO_HUE_MANITEE
  119. // # define OLED_LOGO_CORNE
  120. // # define OLED_LOGO_GOTHAM
  121. # define OLED_LOGO_SCIFI
  122. #endif
  123. #ifndef ONESHOT_TAP_TOGGLE
  124. # define ONESHOT_TAP_TOGGLE 2
  125. #endif // !ONESHOT_TAP_TOGGLE
  126. #ifndef ONESHOT_TIMEOUT
  127. # define ONESHOT_TIMEOUT 3000
  128. #endif // !ONESHOT_TIMEOUT
  129. #ifdef QMK_KEYS_PER_SCAN
  130. # undef QMK_KEYS_PER_SCAN
  131. # define QMK_KEYS_PER_SCAN 2
  132. #endif // !QMK_KEYS_PER_SCAN
  133. // this makes it possible to do rolling combos (zx) with keys that
  134. // convert to other keys on hold (z becomes ctrl when you hold it,
  135. // and when this option isn't enabled, z rapidly followed by x
  136. // actually sends Ctrl-x. That's bad.)
  137. #define IGNORE_MOD_TAP_INTERRUPT
  138. #undef PERMISSIVE_HOLD
  139. //#define TAPPING_FORCE_HOLD
  140. //#define RETRO_TAPPING
  141. #ifndef KEYBOARD_kyria_rev1
  142. # define TAPPING_TERM_PER_KEY
  143. #endif
  144. #define FORCE_NKRO
  145. #ifndef TAPPING_TOGGLE
  146. # define TAPPING_TOGGLE 1
  147. #endif
  148. #ifdef TAPPING_TERM
  149. # undef TAPPING_TERM
  150. #endif // TAPPING_TERM
  151. #if defined(KEYBOARD_ergodox_ez)
  152. # define TAPPING_TERM 185
  153. #elif defined(KEYBOARD_crkbd)
  154. # define TAPPING_TERM 200
  155. #else
  156. # define TAPPING_TERM 175
  157. #endif
  158. #define TAP_CODE_DELAY 5
  159. /* Disable unused and unneeded features to reduce on firmware size */
  160. #ifdef LOCKING_SUPPORT_ENABLE
  161. # undef LOCKING_SUPPORT_ENABLE
  162. #endif
  163. #ifdef LOCKING_RESYNC_ENABLE
  164. # undef LOCKING_RESYNC_ENABLE
  165. #endif
  166. #ifdef CONVERT_TO_PROTON_C
  167. // pins that are available but not present on Pro Micro
  168. # define A3 PAL_LINE(GPIOA, 3)
  169. # define A4 PAL_LINE(GPIOA, 4)
  170. # define A5 PAL_LINE(GPIOA, 5)
  171. # define A6 PAL_LINE(GPIOA, 6)
  172. # define A7 PAL_LINE(GPIOA, 7)
  173. # define A8 PAL_LINE(GPIOA, 8)
  174. # define A13 PAL_LINE(GPIOA, 13)
  175. # define A14 PAL_LINE(GPIOA, 14)
  176. # define A15 PAL_LINE(GPIOA, 15)
  177. # define B10 PAL_LINE(GPIOB, 10)
  178. # define B11 PAL_LINE(GPIOB, 11)
  179. # define B12 PAL_LINE(GPIOB, 12)
  180. # define C13 PAL_LINE(GPIOC, 13)
  181. # define C14 PAL_LINE(GPIOC, 14)
  182. # define C15 PAL_LINE(GPIOC, 15)
  183. #endif