config.h 8.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262
  1. /*
  2. Copyright 2019 SwanMatch
  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. /* USB Device descriptor parameter */
  17. #define VENDOR_ID 0x16C0
  18. #define PRODUCT_ID 0x27DB
  19. #define DEVICE_VER 0x0001
  20. #define MANUFACTURER SwanMatch
  21. #define PRODUCT SilverBullet44
  22. /* key matrix size */
  23. #define MATRIX_ROWS 8
  24. #define MATRIX_COLS 6
  25. /*
  26. * Keyboard Matrix Assignments
  27. *
  28. * Change this to how you wired your keyboard
  29. * COLS: AVR pins used for columns, left to right
  30. * ROWS: AVR pins used for rows, top to bottom
  31. * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
  32. * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
  33. *
  34. */
  35. #define MATRIX_ROW_PINS { D4, C6, D7, E6 }
  36. #define MATRIX_COL_PINS { B3, B1, F7, F6, F5, F4 }
  37. #define UNUSED_PINS
  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 MASTER_RIGHT
  45. // #define BACKLIGHT_PIN B7
  46. // #define BACKLIGHT_BREATHING
  47. // #define BACKLIGHT_LEVELS 3
  48. #define RGB_DI_PIN D3
  49. #ifdef RGB_DI_PIN
  50. //#define RGBLIGHT_SPLIT
  51. #define RGBLED_SPLIT {26, 26}
  52. #define RGBLED_NUM 52
  53. #ifdef RGB_MATRIX_ENABLE
  54. #define DRIVER_LED_TOTAL 52
  55. #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 150
  56. #define RGB_MATRIX_HUE_STEP 8
  57. #define RGB_MATRIX_SAT_STEP 8
  58. #define RGB_MATRIX_VAL_STEP 8
  59. #define RGB_MATRIX_SPD_STEP 8
  60. #define RGB_MATRIX_FRAMEBUFFER_EFFECTS
  61. #define RGB_MATRIX_KEYPRESSES // reacts to keypresses
  62. #define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_TYPING_HEATMAP
  63. #else
  64. #define RGBLIGHT_LED_MAP { 0,1,2,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,3,4,5,6, \
  65. 26,27,28,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,29,30,31,32 }
  66. #define RGBLIGHT_HUE_STEP 8
  67. #define RGBLIGHT_SAT_STEP 8
  68. #define RGBLIGHT_VAL_STEP 8
  69. #define RGBLIGHT_LIMIT_VAL 150 /* The maximum brightness level */
  70. //#define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */
  71. /*== all animations enable ==*/
  72. // #define RGBLIGHT_ANIMATIONS
  73. /*== or choose animations ==*/
  74. #define RGBLIGHT_EFFECT_BREATHING
  75. #define RGBLIGHT_EFFECT_RAINBOW_MOOD
  76. #define RGBLIGHT_EFFECT_RAINBOW_SWIRL
  77. #define RGBLIGHT_EFFECT_SNAKE
  78. // #define RGBLIGHT_EFFECT_KNIGHT
  79. // #define RGBLIGHT_EFFECT_CHRISTMAS
  80. // #define RGBLIGHT_EFFECT_STATIC_GRADIENT
  81. // #define RGBLIGHT_EFFECT_RGB_TEST
  82. // #define RGBLIGHT_EFFECT_ALTERNATING
  83. /*== customize breathing effect ==*/
  84. /*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/
  85. #define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64
  86. /*==== use exp() and sin() ====*/
  87. #define RGBLIGHT_EFFECT_BREATHE_CENTER 2 // 1 to 2.7
  88. #define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255
  89. /*== customize snake effect ==*/
  90. #define RGBLIGHT_EFFECT_SNAKE_LENGTH RGBLED_NUM
  91. /*== customize knight effect ==*/
  92. #define RGBLIGHT_EFFECT_KNIGHT_LENGTH 6
  93. #endif
  94. #endif
  95. /* Audio */
  96. #ifdef AUDIO_ENABLE
  97. #define AUDIO_PIN B6
  98. #define STARTUP_SONG SONG(STARTUP_SOUND)
  99. #define AUDIO_CLICKY
  100. #define AUDIO_CLICKY_FREQ_RANDOMNESS 1.0f
  101. #endif
  102. /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
  103. #define DEBOUNCE 10
  104. //#define RETRO_TAPPING
  105. #ifdef MOUSEKEY_ENABLE
  106. #define MOUSEKEY_INTERVAL 20
  107. #define MOUSEKEY_MAX_SPEED 5
  108. #define MOUSEKEY_TIME_TO_MAX 60
  109. #endif
  110. /* define if matrix has ghost (lacks anti-ghosting diodes) */
  111. //#define MATRIX_HAS_GHOST
  112. /* number of backlight levels */
  113. /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
  114. //#define LOCKING_SUPPORT_ENABLE
  115. /* Locking resynchronize hack */
  116. //#define LOCKING_RESYNC_ENABLE
  117. /* If defined, GRAVE_ESC will always act as ESC when CTRL is held.
  118. * This is userful for the Windows task manager shortcut (ctrl+shift+esc).
  119. */
  120. // #define GRAVE_ESC_CTRL_OVERRIDE
  121. /*
  122. * Force NKRO
  123. *
  124. * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved
  125. * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the
  126. * makefile for this to work.)
  127. *
  128. * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N)
  129. * until the next keyboard reset.
  130. *
  131. * NKRO may prevent your keystrokes from being detected in the BIOS, but it is
  132. * fully operational during normal computer usage.
  133. *
  134. * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N)
  135. * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by
  136. * bootmagic, NKRO mode will always be enabled until it is toggled again during a
  137. * power-up.
  138. *
  139. */
  140. //#define FORCE_NKRO
  141. /*
  142. * Magic Key Options
  143. *
  144. * Magic keys are hotkey commands that allow control over firmware functions of
  145. * the keyboard. They are best used in combination with the HID Listen program,
  146. * found here: https://www.pjrc.com/teensy/hid_listen.html
  147. *
  148. * The options below allow the magic key functionality to be changed. This is
  149. * useful if your keyboard/keypad is missing keys and you want magic key support.
  150. *
  151. */
  152. /* key combination for magic key command */
  153. /* defined by default; to change, uncomment and set to the combination you want */
  154. // #define IS_COMMAND() (get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)))
  155. /* control how magic key switches layers */
  156. //#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true
  157. //#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true
  158. //#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false
  159. /* override magic key keymap */
  160. //#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS
  161. //#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS
  162. //#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM
  163. //#define MAGIC_KEY_HELP H
  164. //#define MAGIC_KEY_HELP_ALT SLASH
  165. //#define MAGIC_KEY_DEBUG D
  166. //#define MAGIC_KEY_DEBUG_MATRIX X
  167. //#define MAGIC_KEY_DEBUG_KBD K
  168. //#define MAGIC_KEY_DEBUG_MOUSE M
  169. //#define MAGIC_KEY_VERSION V
  170. //#define MAGIC_KEY_STATUS S
  171. //#define MAGIC_KEY_CONSOLE C
  172. //#define MAGIC_KEY_LAYER0 0
  173. //#define MAGIC_KEY_LAYER0_ALT GRAVE
  174. //#define MAGIC_KEY_LAYER1 1
  175. //#define MAGIC_KEY_LAYER2 2
  176. //#define MAGIC_KEY_LAYER3 3
  177. //#define MAGIC_KEY_LAYER4 4
  178. //#define MAGIC_KEY_LAYER5 5
  179. //#define MAGIC_KEY_LAYER6 6
  180. //#define MAGIC_KEY_LAYER7 7
  181. //#define MAGIC_KEY_LAYER8 8
  182. //#define MAGIC_KEY_LAYER9 9
  183. //#define MAGIC_KEY_BOOTLOADER B
  184. //#define MAGIC_KEY_BOOTLOADER_ALT ESC
  185. //#define MAGIC_KEY_LOCK CAPS
  186. //#define MAGIC_KEY_EEPROM E
  187. //#define MAGIC_KEY_EEPROM_CLEAR BSPACE
  188. //#define MAGIC_KEY_NKRO N
  189. //#define MAGIC_KEY_SLEEP_LED Z
  190. /*
  191. * Feature disable options
  192. * These options are also useful to firmware size reduction.
  193. */
  194. /* disable debug print */
  195. //#define NO_DEBUG
  196. /* disable print */
  197. //#define NO_PRINT
  198. /* disable action features */
  199. //#define NO_ACTION_LAYER
  200. //#define NO_ACTION_TAPPING
  201. //#define NO_ACTION_ONESHOT
  202. /* disable these deprecated features by default */
  203. #define NO_ACTION_MACRO
  204. #define NO_ACTION_FUNCTION
  205. /*
  206. * MIDI options
  207. */
  208. /* enable basic MIDI features:
  209. - MIDI notes can be sent when in Music mode is on
  210. */
  211. //#define MIDI_BASIC
  212. /* enable advanced MIDI features:
  213. - MIDI notes can be added to the keymap
  214. - Octave shift and transpose
  215. - Virtual sustain, portamento, and modulation wheel
  216. - etc.
  217. */
  218. //#define MIDI_ADVANCED
  219. /* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
  220. //#define MIDI_TONE_KEYCODE_OCTAVES 1
  221. /* Bootmagic Lite key configuration */
  222. // #define BOOTMAGIC_LITE_ROW 0
  223. // #define BOOTMAGIC_LITE_COLUMN 0