config.h 4.0 KB

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