config.h 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168
  1. /*
  2. Copyright 2012 Jun Wako <wakojun@gmail.com>
  3. Copyright 2015 Jack Humbert
  4. This program is free software: you can redistribute it and/or modify
  5. it under the terms of the GNU General Public License as published by
  6. the Free Software Foundation, either version 2 of the License, or
  7. (at your option) any later version.
  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. You should have received a copy of the GNU General Public License
  13. along with this program. If not, see <http://www.gnu.org/licenses/>.
  14. */
  15. #ifndef REV2_CONFIG_H
  16. #define REV2_CONFIG_H
  17. /* USB Device descriptor parameter */
  18. #define VENDOR_ID 0xFEED
  19. #define PRODUCT_ID 0x3060
  20. #define DEVICE_VER 0x0001
  21. #define MANUFACTURER Yushakobo
  22. #define PRODUCT Helix Beta
  23. #define DESCRIPTION A split keyboard for the cheap makers
  24. #define PREVENT_STUCK_MODIFIERS
  25. #define TAPPING_FORCE_HOLD
  26. #define TAPPING_TERM 100
  27. /* Use I2C or Serial */
  28. #define USE_I2C
  29. #define USE_SERIAL
  30. //#define USE_MATRIX_I2C
  31. /* Select hand configuration */
  32. #define MASTER_LEFT
  33. // #define MASTER_RIGHT
  34. // #define EE_HANDS
  35. // Helix keyboard OLED support
  36. // see ./rules.mk: OLED_ENABLE=yes or no
  37. #ifdef OLED_ENABLE
  38. #define SSD1306OLED
  39. #endif
  40. /* Select rows configuration */
  41. // Rows are 4 or 5
  42. // #define HELIX_ROWS 5 see ./rules.mk
  43. /* key matrix size */
  44. // Rows are doubled-up
  45. #if HELIX_ROWS == 4
  46. #define MATRIX_ROWS 8
  47. #define MATRIX_ROW_PINS { D4, C6, D7, E6 }
  48. #else
  49. #define MATRIX_ROWS 10
  50. #define MATRIX_ROW_PINS { D4, C6, D7, E6, B4 }
  51. #endif
  52. // wiring of each half
  53. #define MATRIX_COLS 7
  54. #define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2 }
  55. // #define MATRIX_COL_PINS { B2, B3, B1, F7, F6, F5, F4 } //uncomment this line and comment line above if you need to reverse left-to-right key order
  56. /* define if matrix has ghost */
  57. //#define MATRIX_HAS_GHOST
  58. /* number of backlight levels */
  59. // #define BACKLIGHT_LEVELS 3
  60. /* Set 0 if debouncing isn't needed */
  61. #define DEBOUNCING_DELAY 5
  62. /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
  63. //#define LOCKING_SUPPORT_ENABLE
  64. /* Locking resynchronize hack */
  65. //#define LOCKING_RESYNC_ENABLE
  66. /* key combination for command */
  67. #define IS_COMMAND() ( \
  68. keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
  69. )
  70. /* ws2812 RGB LED */
  71. #define RGB_DI_PIN D3
  72. #define RGBLIGHT_TIMER
  73. //#define RGBLED_NUM 12 // Number of LEDs. see ./keymaps/default/config.h
  74. #define ws2812_PORTREG PORTD
  75. #define ws2812_DDRREG DDRD
  76. // Helix keyboard RGB LED support
  77. //#define RGBLIGHT_ANIMATIONS : see ./rules.mk: LED_ANIMATIONS = yes or no
  78. // see ./rules.mk: LED_BACK_ENABLE or LED_UNDERGLOW_ENABLE set yes
  79. #ifdef RGBLED_BACK
  80. #if HELIX_ROWS == 4
  81. #define RGBLED_NUM 25
  82. #else
  83. #define RGBLED_NUM 32
  84. #endif
  85. #else
  86. #define RGBLED_NUM 6
  87. #endif
  88. #ifndef IOS_DEVICE_ENABLE
  89. #if RGBLED_NUM <= 6
  90. #define RGBLIGHT_LIMIT_VAL 255
  91. #else
  92. #if HELIX_ROWS == 4
  93. #define RGBLIGHT_LIMIT_VAL 130
  94. #else
  95. #define RGBLIGHT_LIMIT_VAL 120
  96. #endif
  97. #endif
  98. #define RGBLIGHT_VAL_STEP 17
  99. #else
  100. #if RGBLED_NUM <= 6
  101. #define RGBLIGHT_LIMIT_VAL 90
  102. #else
  103. #if HELIX_ROWS == 4
  104. #define RGBLIGHT_LIMIT_VAL 45
  105. #else
  106. #define RGBLIGHT_LIMIT_VAL 35
  107. #endif
  108. #endif
  109. #define RGBLIGHT_VAL_STEP 4
  110. #endif
  111. #define RGBLIGHT_HUE_STEP 10
  112. #define RGBLIGHT_SAT_STEP 17
  113. #if defined(RGBLIGHT_ENABLE) && !defined(IOS_DEVICE_ENABLE)
  114. // USB_MAX_POWER_CONSUMPTION value for Helix keyboard
  115. // 120 RGBoff, OLEDoff
  116. // 120 OLED
  117. // 330 RGB 6
  118. // 300 RGB 32
  119. // 310 OLED & RGB 32
  120. #define USB_MAX_POWER_CONSUMPTION 400
  121. #else
  122. // fix iPhone and iPad power adapter issue
  123. // iOS device need lessthan 100
  124. #define USB_MAX_POWER_CONSUMPTION 100
  125. #endif
  126. /*
  127. * Feature disable options
  128. * These options are also useful to firmware size reduction.
  129. */
  130. /* disable debug print */
  131. // #define NO_DEBUG
  132. /* disable print */
  133. // #define NO_PRINT
  134. /* disable action features */
  135. //#define NO_ACTION_LAYER
  136. //#define NO_ACTION_TAPPING
  137. //#define NO_ACTION_ONESHOT
  138. //#define NO_ACTION_MACRO
  139. //#define NO_ACTION_FUNCTION
  140. #endif