You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

219 lines
7.4 KiB

  1. /*
  2. Copyright 2021 @wekey
  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 0x5559
  18. #define PRODUCT_ID 0x0001
  19. #define DEVICE_VER 0x0001
  20. #define MANUFACTURER @wekey
  21. #define PRODUCT We27
  22. /* key matrix size */
  23. #define MATRIX_ROWS 6
  24. #define MATRIX_COLS 5
  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 { F1, D7, B4, B5, B6, F6 }
  36. #define MATRIX_COL_PINS { F4, F5, C7, D6, D4 }
  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 D0 // or D1, D2, D3, E6
  44. #ifdef RGB_MATRIX_ENABLE
  45. // The pin connected to the data pin of the LEDs
  46. #define RGB_DI_PIN C6
  47. // The number of LEDs connected
  48. #define DRIVER_LED_TOTAL 27
  49. #define RGB_MATRIX_KEYPRESSES // reacts to keypresses
  50. #define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses)
  51. #define RGB_MATRIX_STARTUP_HUE 108 // Sets the default hue value, if none has been set
  52. #define RGB_MATRIX_STARTUP_SAT 255 // Sets the default saturation value, if none has been set
  53. #define RGB_MATRIX_STARTUP_VAL RGB_MATRIX_MAXIMUM_BRIGHTNESS // Sets the default brightness value, if none has been set
  54. #define RGB_MATRIX_STARTUP_SPD 127 // Sets the default animation speed, if none has been set
  55. #define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_SOLID_COLOR // Sets the default mode, if none has been set
  56. #define DISABLE_RGB_MATRIX_ALPHAS_MODS
  57. #define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN
  58. #define DISABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT
  59. #define DISABLE_RGB_MATRIX_BREATHING
  60. #define DISABLE_RGB_MATRIX_BAND_SAT // *
  61. #define DISABLE_RGB_MATRIX_BAND_VAL
  62. #define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT
  63. #define DISABLE_RGB_MATRIX_BAND_PINWHEEL_VAL
  64. #define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT
  65. #define DISABLE_RGB_MATRIX_BAND_SPIRAL_VAL
  66. #define DISABLE_RGB_MATRIX_CYCLE_ALL
  67. #define DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT
  68. #define DISABLE_RGB_MATRIX_CYCLE_UP_DOWN
  69. #define DISABLE_RGB_MATRIX_CYCLE_OUT_IN
  70. #define DISABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL
  71. // #define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON // *
  72. #define DISABLE_RGB_MATRIX_CYCLE_PINWHEEL
  73. #define DISABLE_RGB_MATRIX_CYCLE_SPIRAL
  74. #define DISABLE_RGB_MATRIX_DUAL_BEACON
  75. #define DISABLE_RGB_MATRIX_RAINBOW_BEACON
  76. #define DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS
  77. #define DISABLE_RGB_MATRIX_RAINDROPS
  78. #define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS
  79. #define DISABLE_RGB_MATRIX_HUE_BREATHING
  80. #define DISABLE_RGB_MATRIX_HUE_PENDULUM
  81. #define DISABLE_RGB_MATRIX_HUE_WAVE
  82. #define DISABLE_RGB_MATRIX_TYPING_HEATMAP
  83. #define DISABLE_RGB_MATRIX_DIGITAL_RAIN
  84. #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE
  85. #define DISABLE_RGB_MATRIX_SOLID_REACTIVE
  86. #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE
  87. #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE
  88. #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS
  89. #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS
  90. #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS
  91. #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS
  92. #define DISABLE_RGB_MATRIX_SPLASH
  93. #define DISABLE_RGB_MATRIX_MULTISPLASH
  94. #define DISABLE_RGB_MATRIX_SOLID_SPLASH
  95. #define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH
  96. #endif
  97. #ifdef ENCODER_ENABLE
  98. #define ENCODERS_PAD_A { D3 }
  99. #define ENCODERS_PAD_B { D2 }
  100. #define ENCODER_RESOLUTION 2
  101. #define ENCODERS 1
  102. #define ENCODERS_CW_KEY { { 4, 5 } }
  103. #define ENCODERS_CCW_KEY { { 4, 3 } }
  104. #endif
  105. //#define LED_NUM_LOCK_PIN B0
  106. //#define LED_CAPS_LOCK_PIN B1
  107. //#define LED_SCROLL_LOCK_PIN B2
  108. //#define LED_COMPOSE_PIN B3
  109. //#define LED_KANA_PIN B4
  110. //#define BACKLIGHT_PIN B7
  111. //#define BACKLIGHT_LEVELS 3
  112. //#define BACKLIGHT_BREATHING
  113. //#define RGB_DI_PIN E2
  114. //#ifdef RGB_DI_PIN
  115. //# define RGBLED_NUM 16
  116. //# define RGBLIGHT_HUE_STEP 8
  117. //# define RGBLIGHT_SAT_STEP 8
  118. //# define RGBLIGHT_VAL_STEP 8
  119. //# define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */
  120. //# define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */
  121. /*== all animations enable ==*/
  122. //# define RGBLIGHT_ANIMATIONS
  123. /*== or choose animations ==*/
  124. //# define RGBLIGHT_EFFECT_BREATHING
  125. //# define RGBLIGHT_EFFECT_RAINBOW_MOOD
  126. //# define RGBLIGHT_EFFECT_RAINBOW_SWIRL
  127. //# define RGBLIGHT_EFFECT_SNAKE
  128. //# define RGBLIGHT_EFFECT_KNIGHT
  129. //# define RGBLIGHT_EFFECT_CHRISTMAS
  130. //# define RGBLIGHT_EFFECT_STATIC_GRADIENT
  131. //# define RGBLIGHT_EFFECT_RGB_TEST
  132. //# define RGBLIGHT_EFFECT_ALTERNATING
  133. /*== customize breathing effect ==*/
  134. /*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/
  135. //# define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64
  136. /*==== use exp() and sin() ====*/
  137. //# define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7
  138. //# define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255
  139. //#endif
  140. /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
  141. #define DEBOUNCE 5
  142. /* define if matrix has ghost (lacks anti-ghosting diodes) */
  143. //#define MATRIX_HAS_GHOST
  144. /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
  145. #define LOCKING_SUPPORT_ENABLE
  146. /* Locking resynchronize hack */
  147. #define LOCKING_RESYNC_ENABLE
  148. /* If defined, GRAVE_ESC will always act as ESC when CTRL is held.
  149. * This is useful for the Windows task manager shortcut (ctrl+shift+esc).
  150. */
  151. //#define GRAVE_ESC_CTRL_OVERRIDE
  152. /*
  153. * Force NKRO
  154. *
  155. * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved
  156. * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the
  157. * makefile for this to work.)
  158. *
  159. * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N)
  160. * until the next keyboard reset.
  161. *
  162. * NKRO may prevent your keystrokes from being detected in the BIOS, but it is
  163. * fully operational during normal computer usage.
  164. *
  165. * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N)
  166. * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by
  167. * bootmagic, NKRO mode will always be enabled until it is toggled again during a
  168. * power-up.
  169. *
  170. */
  171. //#define FORCE_NKRO
  172. /*
  173. * Feature disable options
  174. * These options are also useful to firmware size reduction.
  175. */
  176. /* disable debug print */
  177. //#define NO_DEBUG
  178. /* disable print */
  179. //#define NO_PRINT
  180. /* disable action features */
  181. //#define NO_ACTION_LAYER
  182. //#define NO_ACTION_TAPPING
  183. //#define NO_ACTION_ONESHOT
  184. /* disable these deprecated features by default */
  185. #define NO_ACTION_MACRO
  186. #define NO_ACTION_FUNCTION
  187. /* Bootmagic Lite key configuration */
  188. //#define BOOTMAGIC_LITE_ROW 0
  189. //#define BOOTMAGIC_LITE_COLUMN 0