config.h 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  1. /*
  2. This is the c configuration file for the keymap
  3. Copyright 2012 Jun Wako <wakojun@gmail.com>
  4. Copyright 2015 Jack Humbert
  5. This program is free software: you can redistribute it and/or modify
  6. it under the terms of the GNU General Public License as published by
  7. the Free Software Foundation, either version 2 of the License, or
  8. (at your option) any later version.
  9. This program is distributed in the hope that it will be useful,
  10. but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. GNU General Public License for more details.
  13. You should have received a copy of the GNU General Public License
  14. along with this program. If not, see <http://www.gnu.org/licenses/>.
  15. */
  16. #ifndef CONFIG_USER_H
  17. #define CONFIG_USER_H
  18. #include "../../config.h"
  19. /* Use I2C or Serial */
  20. #define USE_I2C
  21. #define USE_SERIAL
  22. //#define USE_MATRIX_I2C
  23. /* Select hand configuration */
  24. #define MASTER_LEFT
  25. // #define MASTER_RIGHT
  26. // #define EE_HANDS
  27. // Helix keyboard OLED support
  28. // see ./rules.mk: OLED_ENABLE=yes or no
  29. #ifdef OLED_ENABLE
  30. #define SSD1306OLED
  31. #endif
  32. /* Select rows configuration */
  33. #define HELIX_ROWS 5
  34. /* key matrix size */
  35. // Rows are doubled-up
  36. #if HELIX_ROWS == 4
  37. #define MATRIX_ROWS 8
  38. #define MATRIX_COLS 7
  39. #define MATRIX_ROW_PINS { D4, C6, D7, E6 }
  40. #elif HELIX_ROWS == 5
  41. #define MATRIX_ROWS 10
  42. #define MATRIX_COLS 7
  43. #define MATRIX_ROW_PINS { D4, C6, D7, E6, B4 }
  44. #else
  45. #error "expected HELIX_ROWS 4 or 5"
  46. #endif
  47. #define USE_SERIAL_PD2
  48. #define PREVENT_STUCK_MODIFIERS
  49. #define TAPPING_FORCE_HOLD
  50. #define TAPPING_TERM 100
  51. #undef RGBLED_NUM
  52. // Helix keyboard RGB LED support
  53. //#define RGBLIGHT_ANIMATIONS : see ./rules.mk: LED_ANIMATIONS = yes or no
  54. // see ./rules.mk: LED_BACK_ENABLE or LED_UNDERGLOW_ENABLE set yes
  55. #ifdef RGBLED_BACK
  56. #if HELIX_ROWS == 4
  57. #define RGBLED_NUM 25
  58. #elif HELIX_ROWS == 5
  59. #define RGBLED_NUM 32
  60. #endif
  61. #else
  62. #define RGBLED_NUM 6
  63. #endif
  64. #ifndef IOS_DEVICE_ENABLE
  65. #if RGBLED_NUM <= 6
  66. #define RGBLIGHT_LIMIT_VAL 255
  67. #else
  68. #if HELIX_ROWS == 5
  69. #define RGBLIGHT_LIMIT_VAL 120
  70. #else
  71. #define RGBLIGHT_LIMIT_VAL 130
  72. #endif
  73. #endif
  74. #define RGBLIGHT_VAL_STEP 17
  75. #else
  76. #if RGBLED_NUM <= 6
  77. #define RGBLIGHT_LIMIT_VAL 90
  78. #else
  79. #if HELIX_ROWS == 5
  80. #define RGBLIGHT_LIMIT_VAL 35
  81. #else
  82. #define RGBLIGHT_LIMIT_VAL 45
  83. #endif
  84. #endif
  85. #define RGBLIGHT_VAL_STEP 4
  86. #endif
  87. #define RGBLIGHT_HUE_STEP 10
  88. #define RGBLIGHT_SAT_STEP 17
  89. #if defined(RGBLIGHT_ENABLE) && !defined(IOS_DEVICE_ENABLE)
  90. // USB_MAX_POWER_CONSUMPTION value for Helix keyboard
  91. // 120 RGBoff, OLEDoff
  92. // 120 OLED
  93. // 330 RGB 6
  94. // 300 RGB 32
  95. // 310 OLED & RGB 32
  96. #define USB_MAX_POWER_CONSUMPTION 400
  97. #else
  98. // fix iPhone and iPad power adapter issue
  99. // iOS device need lessthan 100
  100. #define USB_MAX_POWER_CONSUMPTION 100
  101. #endif
  102. #endif /* CONFIG_USER_H */