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.

173 lines
4.3 KiB

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