config.h 3.6 KB

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