config.h 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185
  1. /* Copyright 2020 zvecr <git@zvecr.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. #include "config_common.h"
  18. /* USB Device descriptor parameter */
  19. #define VENDOR_ID 0x5A56
  20. #define PRODUCT_ID 0x0048
  21. #define DEVICE_VER 0x0001
  22. #define MANUFACTURER zvecr
  23. #define PRODUCT zv48
  24. /* key matrix size */
  25. #define MATRIX_ROWS 8 // Rows are doubled-up
  26. #define MATRIX_COLS 6
  27. /*
  28. * Keyboard Matrix Assignments
  29. *
  30. * Change this to how you wired your keyboard
  31. * COLS: AVR pins used for columns, left to right
  32. * ROWS: AVR pins used for rows, top to bottom
  33. * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
  34. * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
  35. *
  36. */
  37. #define MATRIX_COL_PINS { B15, B10, B0, A5, A4, A3 }
  38. #define MATRIX_ROW_PINS { A10, A15, B3, B4 }
  39. #define MATRIX_COL_PINS_RIGHT { B10, B15, A10, A15, B3, B4 }
  40. #define MATRIX_ROW_PINS_RIGHT { B0, A5, A4, A3 }
  41. /* COL2ROW, ROW2COL*/
  42. #define DIODE_DIRECTION COL2ROW
  43. #define MATRIX_IO_DELAY 5
  44. /*
  45. * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN.
  46. */
  47. #define SPLIT_HAND_PIN B9
  48. #define SOFT_SERIAL_PIN B6
  49. //#define SELECT_SOFT_SERIAL_SPEED 0
  50. #define SERIAL_USART_SPEED 921600
  51. #define ENCODERS_PAD_A { B5 }
  52. #define ENCODERS_PAD_B { A2 }
  53. #define RGB_DI_PIN B1
  54. #define RGBLED_NUM 48
  55. #define RGBLED_SPLIT {24, 24}
  56. #define RGBLIGHT_LIMIT_VAL 120
  57. #define RGBLIGHT_ANIMATIONS
  58. #define WS2812_PWM_DRIVER PWMD3
  59. #define WS2812_PWM_CHANNEL 4
  60. #define WS2812_PWM_PAL_MODE 2
  61. #define WS2812_DMA_STREAM STM32_DMA1_STREAM2
  62. #define WS2812_DMA_CHANNEL 5
  63. /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
  64. #define DEBOUNCE 5
  65. /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
  66. #define LOCKING_SUPPORT_ENABLE
  67. /* Locking resynchronize hack */
  68. #define LOCKING_RESYNC_ENABLE
  69. /* If defined, GRAVE_ESC will always act as ESC when CTRL is held.
  70. * This is userful for the Windows task manager shortcut (ctrl+shift+esc).
  71. */
  72. // #define GRAVE_ESC_CTRL_OVERRIDE
  73. /*
  74. * Force NKRO
  75. *
  76. * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved
  77. * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the
  78. * makefile for this to work.)
  79. *
  80. * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N)
  81. * until the next keyboard reset.
  82. *
  83. * NKRO may prevent your keystrokes from being detected in the BIOS, but it is
  84. * fully operational during normal computer usage.
  85. *
  86. * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N)
  87. * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by
  88. * bootmagic, NKRO mode will always be enabled until it is toggled again during a
  89. * power-up.
  90. *
  91. */
  92. //#define FORCE_NKRO
  93. /*
  94. * Magic Key Options
  95. *
  96. * Magic keys are hotkey commands that allow control over firmware functions of
  97. * the keyboard. They are best used in combination with the HID Listen program,
  98. * found here: https://www.pjrc.com/teensy/hid_listen.html
  99. *
  100. * The options below allow the magic key functionality to be changed. This is
  101. * useful if your keyboard/keypad is missing keys and you want magic key support.
  102. *
  103. */
  104. /* key combination for magic key command */
  105. /* defined by default; to change, uncomment and set to the combination you want */
  106. // #define IS_COMMAND() (get_mods() == MOD_MASK_SHIFT)
  107. /* control how magic key switches layers */
  108. //#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true
  109. //#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true
  110. //#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false
  111. /* override magic key keymap */
  112. //#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS
  113. //#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS
  114. //#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM
  115. //#define MAGIC_KEY_HELP H
  116. //#define MAGIC_KEY_HELP_ALT SLASH
  117. //#define MAGIC_KEY_DEBUG D
  118. //#define MAGIC_KEY_DEBUG_MATRIX X
  119. //#define MAGIC_KEY_DEBUG_KBD K
  120. //#define MAGIC_KEY_DEBUG_MOUSE M
  121. //#define MAGIC_KEY_VERSION V
  122. //#define MAGIC_KEY_STATUS S
  123. //#define MAGIC_KEY_CONSOLE C
  124. //#define MAGIC_KEY_LAYER0 0
  125. //#define MAGIC_KEY_LAYER0_ALT GRAVE
  126. //#define MAGIC_KEY_LAYER1 1
  127. //#define MAGIC_KEY_LAYER2 2
  128. //#define MAGIC_KEY_LAYER3 3
  129. //#define MAGIC_KEY_LAYER4 4
  130. //#define MAGIC_KEY_LAYER5 5
  131. //#define MAGIC_KEY_LAYER6 6
  132. //#define MAGIC_KEY_LAYER7 7
  133. //#define MAGIC_KEY_LAYER8 8
  134. //#define MAGIC_KEY_LAYER9 9
  135. //#define MAGIC_KEY_BOOTLOADER B
  136. //#define MAGIC_KEY_BOOTLOADER_ALT ESC
  137. //#define MAGIC_KEY_LOCK CAPS
  138. //#define MAGIC_KEY_EEPROM E
  139. //#define MAGIC_KEY_EEPROM_CLEAR BSPACE
  140. //#define MAGIC_KEY_NKRO N
  141. //#define MAGIC_KEY_SLEEP_LED Z
  142. /*
  143. * Feature disable options
  144. * These options are also useful to firmware size reduction.
  145. */
  146. /* disable debug print */
  147. //#define NO_DEBUG
  148. /* disable print */
  149. //#define NO_PRINT
  150. /* disable action features */
  151. //#define NO_ACTION_LAYER
  152. //#define NO_ACTION_TAPPING
  153. //#define NO_ACTION_ONESHOT
  154. /* disable these deprecated features by default */
  155. #define NO_ACTION_MACRO
  156. #define NO_ACTION_FUNCTION
  157. /* Bootmagic Lite key configuration */
  158. #define BOOTMAGIC_LITE_ROW 0
  159. #define BOOTMAGIC_LITE_COLUMN 0
  160. #define BOOTMAGIC_LITE_ROW_RIGHT 4
  161. #define BOOTMAGIC_LITE_COLUMN_RIGHT 0