config.h 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  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. /* Use I2C or Serial */
  19. #define USE_I2C
  20. #define USE_SERIAL
  21. //#define USE_MATRIX_I2C
  22. /* Select hand configuration */
  23. #define MASTER_LEFT
  24. // #define MASTER_RIGHT
  25. // #define EE_HANDS
  26. // Helix keyboard OLED support
  27. // see ./rules.mk: OLED_ENABLE=yes or no
  28. #ifdef OLED_ENABLE
  29. #define SSD1306OLED
  30. #endif
  31. /* Select rows configuration */
  32. // Rows are 4 or 5
  33. // #define HELIX_ROWS 5 see ./rules.mk
  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 PREVENT_STUCK_MODIFIERS
  48. #define TAPPING_FORCE_HOLD
  49. #define TAPPING_TERM 100
  50. // Helix keyboard RGB LED support
  51. //#define RGBLIGHT_ANIMATIONS : see ./rules.mk: LED_ANIMATIONS = yes or no
  52. // see ./rules.mk: LED_BACK_ENABLE or LED_UNDERGLOW_ENABLE set yes
  53. #ifdef RGBLED_BACK
  54. #if HELIX_ROWS == 4
  55. #define RGBLED_NUM 25
  56. #elif HELIX_ROWS == 5
  57. #define RGBLED_NUM 32
  58. #endif
  59. #else
  60. #define RGBLED_NUM 6
  61. #endif
  62. #ifndef IOS_DEVICE_ENABLE
  63. #if RGBLED_NUM <= 6
  64. #define RGBLIGHT_LIMIT_VAL 255
  65. #else
  66. #if HELIX_ROWS == 5
  67. #define RGBLIGHT_LIMIT_VAL 120
  68. #else
  69. #define RGBLIGHT_LIMIT_VAL 130
  70. #endif
  71. #endif
  72. #define RGBLIGHT_VAL_STEP 17
  73. #else
  74. #if RGBLED_NUM <= 6
  75. #define RGBLIGHT_LIMIT_VAL 90
  76. #else
  77. #if HELIX_ROWS == 5
  78. #define RGBLIGHT_LIMIT_VAL 35
  79. #else
  80. #define RGBLIGHT_LIMIT_VAL 45
  81. #endif
  82. #endif
  83. #define RGBLIGHT_VAL_STEP 4
  84. #endif
  85. #define RGBLIGHT_HUE_STEP 10
  86. #define RGBLIGHT_SAT_STEP 17
  87. #if defined(RGBLIGHT_ENABLE) && !defined(IOS_DEVICE_ENABLE)
  88. // USB_MAX_POWER_CONSUMPTION value for Helix keyboard
  89. // 120 RGBoff, OLEDoff
  90. // 120 OLED
  91. // 330 RGB 6
  92. // 300 RGB 32
  93. // 310 OLED & RGB 32
  94. #define USB_MAX_POWER_CONSUMPTION 400
  95. #else
  96. // fix iPhone and iPad power adapter issue
  97. // iOS device need lessthan 100
  98. #define USB_MAX_POWER_CONSUMPTION 100
  99. #endif
  100. #endif /* CONFIG_USER_H */