config.h 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148
  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 0x04D8
  18. #define PRODUCT_ID 0xEA3B
  19. #define DEVICE_VER 0x0001
  20. #define MANUFACTURER 25KEYS
  21. #define PRODUCT zinc rev.A
  22. #define TAPPING_FORCE_HOLD
  23. #define TAPPING_TERM 100
  24. /* Use I2C or Serial */
  25. #define USE_SERIAL
  26. #define SOFT_SERIAL_PIN D2
  27. /* Select hand configuration */
  28. #define MASTER_LEFT
  29. //#define MASTER_RIGHT
  30. //#define EE_HANDS
  31. /* key matrix size */
  32. // Rows are doubled-up
  33. #define MATRIX_ROWS 8
  34. #define MATRIX_ROW_PINS { D4, C6, D7, E6 }
  35. // wiring of each half
  36. #define MATRIX_COLS 6
  37. #define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3}
  38. #define DIODE_DIRECTION COL2ROW
  39. /* Set 0 if debouncing isn't needed */
  40. #define DEBOUNCE 5
  41. /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
  42. //#define LOCKING_SUPPORT_ENABLE
  43. /* Locking resynchronize hack */
  44. //#define LOCKING_RESYNC_ENABLE
  45. /* ws2812 RGB LED */
  46. #define RGB_DI_PIN D3
  47. // RGB LED support
  48. //#define RGBLIGHT_ANIMATIONS : see ./rules.mk: LED_ANIMATIONS = yes or no
  49. // see ./rules.mk: LED_BACK_ENABLE or LED_UNDERGLOW_ENABLE set yes
  50. #ifdef RGBLIGHT_ENABLE
  51. #define RGBLIGHT_SPLIT
  52. #ifdef RGBLED_BACK
  53. #ifdef RGBLED_CONT
  54. #define RGBLED_NUM 48
  55. #define RGBLED_SPLIT { 24, 24 }
  56. #else
  57. #define RGBLED_NUM 24
  58. #endif
  59. #else
  60. #ifdef RGBLED_BOTH
  61. #ifdef RGBLED_CONT
  62. #define RGBLED_NUM 60
  63. #define RGBLED_SPLIT { 30, 30 }
  64. // #define RGBLIGHT_LED_MAP {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29}
  65. #else
  66. #define RGBLED_NUM 30
  67. #endif
  68. #else
  69. #ifdef RGBLED_CONT
  70. #define RGBLED_NUM 12
  71. #define RGBLED_SPLIT { 6, 6 }
  72. #else
  73. #define RGBLED_NUM 6
  74. #endif
  75. #endif
  76. #endif
  77. #endif
  78. #ifndef IOS_DEVICE_ENABLE
  79. #if (RGBLED_NUM <= 6) || (defined(RGBLED_CONT) && (RGBLED_NUM <= 12))
  80. #define RGBLIGHT_LIMIT_VAL 255
  81. #else
  82. #if (RGBLED_NUM <= 16) || (defined(RGBLED_CONT) && (RGBLED_NUM <= 32))
  83. #define RGBLIGHT_LIMIT_VAL 130
  84. #else
  85. #define RGBLIGHT_LIMIT_VAL 120
  86. #endif
  87. #endif
  88. #define RGBLIGHT_VAL_STEP 17
  89. #else
  90. #if (RGBLED_NUM <= 6) || (defined(RGBLED_CONT) && (RGBLED_NUM <= 12))
  91. #define RGBLIGHT_LIMIT_VAL 90
  92. #else
  93. #if (RGBLED_NUM <= 16) || (defined(RGBLED_CONT) && (RGBLED_NUM <= 32))
  94. #define RGBLIGHT_LIMIT_VAL 45
  95. #else
  96. #define RGBLIGHT_LIMIT_VAL 35
  97. #endif
  98. #endif
  99. #define RGBLIGHT_VAL_STEP 4
  100. #endif
  101. #define RGBLIGHT_HUE_STEP 10
  102. #define RGBLIGHT_SAT_STEP 17
  103. #if defined(RGBLIGHT_ENABLE) && !defined(IOS_DEVICE_ENABLE)
  104. // USB_MAX_POWER_CONSUMPTION value
  105. // 120 RGBoff
  106. // 330 RGB 6
  107. // 300 RGB 32
  108. #define USB_MAX_POWER_CONSUMPTION 400
  109. #else
  110. // fix iPhone and iPad power adapter issue
  111. // iOS device need lessthan 100
  112. #define USB_MAX_POWER_CONSUMPTION 100
  113. #endif
  114. /*
  115. * Feature disable options
  116. * These options are also useful to firmware size reduction.
  117. */
  118. /* disable debug print */
  119. // #define NO_DEBUG
  120. /* disable print */
  121. // #define NO_PRINT
  122. /* disable action features */
  123. //#define NO_ACTION_LAYER
  124. //#define NO_ACTION_TAPPING
  125. //#define NO_ACTION_ONESHOT
  126. //#define NO_ACTION_MACRO
  127. //#define NO_ACTION_FUNCTION