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.

139 lines
4.7 KiB

  1. /*
  2. Copyright 2019 Yiancar
  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 0x8968
  18. #define PRODUCT_ID 0x4E4B
  19. #define DEVICE_VER 0x0001
  20. #define MANUFACTURER Yiancar-Designs
  21. #define PRODUCT NK65
  22. #define DESCRIPTION A 65-percent, tool-free RGB keyboard
  23. /* key matrix size */
  24. #define MATRIX_ROWS 5
  25. #define MATRIX_COLS 15
  26. #define MATRIX_ROW_PINS { B3, B4, B5, A8, A4 }
  27. #define MATRIX_COL_PINS { A13, A10, A9, A14, A15, B8, B9, C13, C14, C15, A0, A1, A2, A3, A5 }
  28. // To enable debugger set A13 A14 -> A5 A7
  29. /* COL2ROW, ROW2COL*/
  30. #define DIODE_DIRECTION COL2ROW
  31. /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
  32. #define DEBOUNCE 5
  33. /* define if matrix has ghost (lacks anti-ghosting diodes) */
  34. //#define MATRIX_HAS_GHOST
  35. /* If defined, GRAVE_ESC will always act as ESC when CTRL is held.
  36. * This is userful for the Windows task manager shortcut (ctrl+shift+esc).
  37. */
  38. // #define GRAVE_ESC_CTRL_OVERRIDE
  39. /*
  40. * Force NKRO
  41. *
  42. * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved
  43. * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the
  44. * makefile for this to work.)
  45. *
  46. * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N)
  47. * until the next keyboard reset.
  48. *
  49. * NKRO may prevent your keystrokes from being detected in the BIOS, but it is
  50. * fully operational during normal computer usage.
  51. *
  52. * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N)
  53. * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by
  54. * bootmagic, NKRO mode will always be enabled until it is toggled again during a
  55. * power-up.
  56. *
  57. */
  58. //#define FORCE_NKRO
  59. /*
  60. * Magic Key Options
  61. *
  62. * Magic keys are hotkey commands that allow control over firmware functions of
  63. * the keyboard. They are best used in combination with the HID Listen program,
  64. * found here: https://www.pjrc.com/teensy/hid_listen.html
  65. *
  66. * The options below allow the magic key functionality to be changed. This is
  67. * useful if your keyboard/keypad is missing keys and you want magic key support.
  68. *
  69. */
  70. /* Backlight options */
  71. #define RGB_BACKLIGHT_ENABLED 1
  72. #define RGB_BACKLIGHT_NK65
  73. // they aren't really used if RGB_BACKLIGHT_HS60 defined
  74. #define RGB_BACKLIGHT_USE_SPLIT_BACKSPACE 0
  75. #define RGB_BACKLIGHT_USE_SPLIT_LEFT_SHIFT 0
  76. #define RGB_BACKLIGHT_USE_SPLIT_RIGHT_SHIFT 0
  77. #define RGB_BACKLIGHT_USE_7U_SPACEBAR 0
  78. #define RGB_BACKLIGHT_USE_ISO_ENTER 0
  79. #define RGB_BACKLIGHT_DISABLE_HHKB_BLOCKER_LEDS 0
  80. // disable backlight when USB suspended (PC sleep/hibernate/shutdown)
  81. #define RGB_BACKLIGHT_DISABLE_WHEN_USB_SUSPENDED 0
  82. // disable backlight after timeout in minutes, 0 = no timeout
  83. #define RGB_BACKLIGHT_DISABLE_AFTER_TIMEOUT 0
  84. // the default brightness
  85. #define RGB_BACKLIGHT_BRIGHTNESS 255
  86. // the default effect (RGB test)
  87. #define RGB_BACKLIGHT_EFFECT 6
  88. // the default effect speed (0-3)
  89. #define RGB_BACKLIGHT_EFFECT_SPEED 0
  90. // the default color1 and color2
  91. #define RGB_BACKLIGHT_COLOR_1 { .h = 0, .s = 255 }
  92. #define RGB_BACKLIGHT_COLOR_2 { .h = 127, .s = 255 }
  93. #define DRIVER_COUNT 2
  94. #define DRIVER_LED_TOTAL 128
  95. // These define which keys in the matrix are alphas/mods
  96. // Used for backlight effects so colors are different for
  97. // alphas vs. mods
  98. // Each value is for a row, bit 0 is column 0
  99. // Alpha=0 Mod=1
  100. #define RGB_BACKLIGHT_ALPHAS_MODS_ROW_0 0b0110000000000001
  101. #define RGB_BACKLIGHT_ALPHAS_MODS_ROW_1 0b0100000000000001
  102. #define RGB_BACKLIGHT_ALPHAS_MODS_ROW_2 0b0110000000000001
  103. #define RGB_BACKLIGHT_ALPHAS_MODS_ROW_3 0b0111000000000001
  104. #define RGB_BACKLIGHT_ALPHAS_MODS_ROW_4 0b0111111000000111
  105. #define RGB_BACKLIGHT_CAPS_LOCK_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 }
  106. #define RGB_BACKLIGHT_LAYER_1_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 }
  107. #define RGB_BACKLIGHT_LAYER_2_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 }
  108. #define RGB_BACKLIGHT_LAYER_3_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 }
  109. // Backlight config starts after VIA's EEPROM usage,
  110. // dynamic keymaps start after this.
  111. #define VIA_EEPROM_CUSTOM_CONFIG_SIZE 31