You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

159 lines
4.8 KiB

8 years ago
8 years ago
8 years ago
7 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
6 years ago
6 years ago
8 years ago
8 years ago
  1. /*
  2. Copyright 2012 Jun Wako <wakojun@gmail.com>
  3. Copyright 2013 Oleg Kostyuk <cub.uanic@gmail.com>
  4. Copyright 2015 ZSA Technology Labs Inc (@zsa)
  5. Copyright 2020 Christopher Courtney <drashna@live.com> (@drashna)
  6. This program is free software: you can redistribute it and/or modify
  7. it under the terms of the GNU General Public License as published by
  8. the Free Software Foundation, either version 2 of the License, or
  9. (at your option) any later version.
  10. This program is distributed in the hope that it will be useful,
  11. but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. GNU General Public License for more details.
  14. You should have received a copy of the GNU General Public License
  15. along with this program. If not, see <http://www.gnu.org/licenses/>.
  16. */
  17. #pragma once
  18. #include "config_common.h"
  19. /* USB Device descriptor parameter */
  20. #define VENDOR_ID 0x3297
  21. #define DEVICE_VER 0x0001
  22. #define MANUFACTURER ZSA Technology Labs
  23. #define PRODUCT_ID 0x4974
  24. #define PRODUCT ErgoDox EZ
  25. /* key matrix size */
  26. #define MATRIX_ROWS 14
  27. #define MATRIX_ROWS_PER_SIDE (MATRIX_ROWS / 2)
  28. #define MATRIX_COLS 6
  29. #define COL_EXPANDED { true, true, true, true, true, true, true, false, false, false, false, false, false, false }
  30. #define MATRIX_ONBOARD_ROW_PINS { 0, 0, 0, 0, 0, 0, 0, B0, B1, B2, B3, D2, D3, C6 }
  31. #define MATRIX_ONBOARD_COL_PINS { F0, F1, F4, F5, F6, F7 }
  32. #define DIODE_DIRECTION COL2ROW
  33. #define EXPANDER_COL_REGISTER GPIOB
  34. #define EXPANDER_ROW_REGISTER GPIOA
  35. #define MATRIX_EXPANDER_COL_PINS { 5, 4, 3, 2, 1, 0 }
  36. #define MATRIX_EXPANDER_ROW_PINS { 0, 1, 2, 3, 4, 5, 6 }
  37. #define MOUSEKEY_INTERVAL 20
  38. #define MOUSEKEY_DELAY 0
  39. #define MOUSEKEY_TIME_TO_MAX 60
  40. #define MOUSEKEY_MAX_SPEED 7
  41. #define MOUSEKEY_WHEEL_DELAY 0
  42. #define DEBOUNCE 30
  43. #define TAPPING_TOGGLE 1
  44. /* define if matrix has ghost */
  45. //#define MATRIX_HAS_GHOST
  46. #define TAPPING_TERM 200
  47. /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
  48. #define LOCKING_SUPPORT_ENABLE
  49. /* Locking resynchronize hack */
  50. #define LOCKING_RESYNC_ENABLE
  51. /* key combination for command */
  52. #define IS_COMMAND() ( \
  53. get_mods() == (MOD_BIT(KC_LCTL) | MOD_BIT(KC_RCTL)) || \
  54. get_mods() == (MOD_BIT(KC_LSFT) | MOD_BIT(KC_RSFT)) \
  55. )
  56. /* number of backlight levels */
  57. #define BACKLIGHT_LEVELS 3
  58. #ifndef LED_BRIGHTNESS_LO
  59. #define LED_BRIGHTNESS_LO 15
  60. #endif
  61. #ifndef LED_BRIGHTNESS_HI
  62. #define LED_BRIGHTNESS_HI 255
  63. #endif
  64. #define LED_BRIGHTNESS_DEFAULT (LED_BRIGHTNESS_HI)
  65. /* ws2812 RGB LED */
  66. #define RGB_DI_PIN D7
  67. #define RGBLIGHT_ANIMATIONS
  68. #define RGBLIGHT_HUE_STEP 12
  69. #define RGBLIGHT_SAT_STEP 255
  70. #define RGBLIGHT_VAL_STEP 12
  71. // Pick one of the modes
  72. // Defaults to 15 mirror, for legacy behavior
  73. // #define ERGODOX_LED_15 // Addresses 15 LEDs, but same position on both halves
  74. // #define ERGODOX_LED_15_MIRROR // Addresses 15 LEDs, but are mirrored
  75. // #define ERGODOX_LED_30 // Addresses all 30 LED individually
  76. /* fix space cadet rollover issue */
  77. #define DISABLE_SPACE_CADET_ROLLOVER
  78. #define RGBW
  79. #define RGBLIGHT_SLEEP
  80. /*
  81. * The debounce filtering reports a key/switch change directly,
  82. * without any extra delay. After that the debounce logic will filter
  83. * all further changes, until the key/switch reports the same state for
  84. * the given count of scans.
  85. * So a perfect switch will get a short debounce period and
  86. * a bad key will get a much longer debounce period.
  87. * The result is an adaptive debouncing period for each switch.
  88. *
  89. * If you don't define it here, the matrix code will default to
  90. * 5, which is now closer to 10ms, but still plenty according to
  91. * manufacturer specs.
  92. */
  93. // RGB backlight
  94. #define DRIVER_ADDR_1 0b1110100
  95. #define DRIVER_ADDR_2 0b1110111
  96. #define DRIVER_COUNT 2
  97. #define DRIVER_1_LED_TOTAL 24
  98. #define DRIVER_2_LED_TOTAL 24
  99. #define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)
  100. #define RGB_MATRIX_LED_PROCESS_LIMIT 5
  101. #define RGB_MATRIX_LED_FLUSH_LIMIT 26
  102. #define RGB_DISABLE_WHEN_USB_SUSPENDED
  103. // #define RGBLIGHT_COLOR_LAYER_0 0x00, 0x00, 0xFF
  104. /* #define RGBLIGHT_COLOR_LAYER_1 0x00, 0x00, 0xFF */
  105. /* #define RGBLIGHT_COLOR_LAYER_2 0xFF, 0x00, 0x00 */
  106. /* #define RGBLIGHT_COLOR_LAYER_3 0x00, 0xFF, 0x00 */
  107. /* #define RGBLIGHT_COLOR_LAYER_4 0xFF, 0xFF, 0x00 */
  108. /* #define RGBLIGHT_COLOR_LAYER_5 0x00, 0xFF, 0xFF */
  109. /* #define RGBLIGHT_COLOR_LAYER_6 0xFF, 0x00, 0xFF */
  110. /* #define RGBLIGHT_COLOR_LAYER_7 0xFF, 0xFF, 0xFF */
  111. /*
  112. * Feature disable options
  113. * These options are also useful to firmware size reduction.
  114. */
  115. /* disable debug print */
  116. // #define NO_DEBUG
  117. /* disable print */
  118. // #define NO_PRINT
  119. /* disable action features */
  120. //#define NO_ACTION_LAYER
  121. //#define NO_ACTION_TAPPING
  122. //#define NO_ACTION_ONESHOT
  123. #define NO_ACTION_MACRO
  124. #define NO_ACTION_FUNCTION
  125. //#define DEBUG_MATRIX_SCAN_RATE