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.

146 lines
4.9 KiB

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