config.h 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179
  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 0x0001
  21. #define DEVICE_VER 0x0001
  22. #define MANUFACTURER zvecr
  23. #define PRODUCT split_blackpill
  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 { B11, B10, B1, B0, A7, A6 }
  38. #define MATRIX_ROW_PINS { B15, B14, B13, B12 }
  39. #define MATRIX_COL_PINS_RIGHT { B12, B13, B14, B15, A8, A9 }
  40. #define MATRIX_ROW_PINS_RIGHT { B0, B1, B10, B11 }
  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 B3
  48. #define SOFT_SERIAL_PIN B6
  49. #define SELECT_SOFT_SERIAL_SPEED 0
  50. #define RGB_DI_PIN B4
  51. #define RGBLED_NUM 24
  52. #define RGBLED_SPLIT { 12, 12 }
  53. #define RGBLIGHT_ANIMATIONS
  54. #define WS2812_PWM_DRIVER PWMD3
  55. #define WS2812_PWM_CHANNEL 1
  56. #define WS2812_DMA_STREAM STM32_DMA1_STREAM3
  57. #define WS2812_DMA_CHANNEL 3
  58. /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
  59. #define DEBOUNCE 5
  60. /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
  61. #define LOCKING_SUPPORT_ENABLE
  62. /* Locking resynchronize hack */
  63. #define LOCKING_RESYNC_ENABLE
  64. /* If defined, GRAVE_ESC will always act as ESC when CTRL is held.
  65. * This is userful for the Windows task manager shortcut (ctrl+shift+esc).
  66. */
  67. // #define GRAVE_ESC_CTRL_OVERRIDE
  68. /*
  69. * Force NKRO
  70. *
  71. * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved
  72. * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the
  73. * makefile for this to work.)
  74. *
  75. * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N)
  76. * until the next keyboard reset.
  77. *
  78. * NKRO may prevent your keystrokes from being detected in the BIOS, but it is
  79. * fully operational during normal computer usage.
  80. *
  81. * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N)
  82. * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by
  83. * bootmagic, NKRO mode will always be enabled until it is toggled again during a
  84. * power-up.
  85. *
  86. */
  87. //#define FORCE_NKRO
  88. /*
  89. * Magic Key Options
  90. *
  91. * Magic keys are hotkey commands that allow control over firmware functions of
  92. * the keyboard. They are best used in combination with the HID Listen program,
  93. * found here: https://www.pjrc.com/teensy/hid_listen.html
  94. *
  95. * The options below allow the magic key functionality to be changed. This is
  96. * useful if your keyboard/keypad is missing keys and you want magic key support.
  97. *
  98. */
  99. /* key combination for magic key command */
  100. /* defined by default; to change, uncomment and set to the combination you want */
  101. // #define IS_COMMAND() (get_mods() == MOD_MASK_SHIFT)
  102. /* control how magic key switches layers */
  103. //#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true
  104. //#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true
  105. //#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false
  106. /* override magic key keymap */
  107. //#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS
  108. //#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS
  109. //#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM
  110. //#define MAGIC_KEY_HELP H
  111. //#define MAGIC_KEY_HELP_ALT SLASH
  112. //#define MAGIC_KEY_DEBUG D
  113. //#define MAGIC_KEY_DEBUG_MATRIX X
  114. //#define MAGIC_KEY_DEBUG_KBD K
  115. //#define MAGIC_KEY_DEBUG_MOUSE M
  116. //#define MAGIC_KEY_VERSION V
  117. //#define MAGIC_KEY_STATUS S
  118. //#define MAGIC_KEY_CONSOLE C
  119. //#define MAGIC_KEY_LAYER0 0
  120. //#define MAGIC_KEY_LAYER0_ALT GRAVE
  121. //#define MAGIC_KEY_LAYER1 1
  122. //#define MAGIC_KEY_LAYER2 2
  123. //#define MAGIC_KEY_LAYER3 3
  124. //#define MAGIC_KEY_LAYER4 4
  125. //#define MAGIC_KEY_LAYER5 5
  126. //#define MAGIC_KEY_LAYER6 6
  127. //#define MAGIC_KEY_LAYER7 7
  128. //#define MAGIC_KEY_LAYER8 8
  129. //#define MAGIC_KEY_LAYER9 9
  130. //#define MAGIC_KEY_BOOTLOADER B
  131. //#define MAGIC_KEY_BOOTLOADER_ALT ESC
  132. //#define MAGIC_KEY_LOCK CAPS
  133. //#define MAGIC_KEY_EEPROM E
  134. //#define MAGIC_KEY_EEPROM_CLEAR BSPACE
  135. //#define MAGIC_KEY_NKRO N
  136. //#define MAGIC_KEY_SLEEP_LED Z
  137. /*
  138. * Feature disable options
  139. * These options are also useful to firmware size reduction.
  140. */
  141. /* disable debug print */
  142. //#define NO_DEBUG
  143. /* disable print */
  144. //#define NO_PRINT
  145. /* disable action features */
  146. //#define NO_ACTION_LAYER
  147. //#define NO_ACTION_TAPPING
  148. //#define NO_ACTION_ONESHOT
  149. /* disable these deprecated features by default */
  150. #define NO_ACTION_MACRO
  151. #define NO_ACTION_FUNCTION
  152. /* Bootmagic Lite key configuration */
  153. #define BOOTMAGIC_LITE_ROW 0
  154. #define BOOTMAGIC_LITE_COLUMN 0
  155. #define BOOTMAGIC_LITE_ROW_RIGHT 4
  156. #define BOOTMAGIC_LITE_COLUMN_RIGHT 0