config.h 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  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. #include "config_common.h"
  17. /* key matrix size */
  18. // Rows are doubled-up
  19. #define MATRIX_ROWS 8
  20. #define MATRIX_COLS 6
  21. #define DIODE_DIRECTION COL2ROW
  22. // wiring of each half
  23. #define MATRIX_ROW_PINS { F4, F5, B1, B3, D1, D0, D7, E6 }
  24. #define MATRIX_COL_PINS { D3, D2, B4, F6, F7, B2 }
  25. /* Set 0 if debouncing isn't needed */
  26. #define DEBOUNCE 5
  27. #define QMK_ESC_OUTPUT D3
  28. #define QMK_ESC_INPUT B1
  29. #define PHYSICAL_LEDS_ENABLE
  30. #ifdef BACKLIGHT_ENABLE
  31. #define BACKLIGHT_PIN C6
  32. #define BACKLIGHT_LEVELS 5
  33. #define BACKLIGHT_BREATHING //not working with splits right now
  34. #define BREATHING_PERIOD 6
  35. #endif
  36. /* ws2812 RGB LED */
  37. #define RGB_DI_PIN D4
  38. #define RGBLIGHT_TIMER
  39. #define RGBLED_NUM 7 // Number of LEDs
  40. #define RGBLIGHT_ANIMATIONS //not working with splits right now
  41. #define RGBLIGHT_SLEEP
  42. #define RGBLIGHT_SPLIT
  43. #ifndef IOS_DEVICE_ENABLE
  44. #if RGBLED_NUM <= 6
  45. #define RGBLIGHT_LIMIT_VAL 255
  46. #else
  47. #define RGBLIGHT_LIMIT_VAL 130
  48. #endif
  49. #define RGBLIGHT_VAL_STEP 8
  50. #else
  51. #if RGBLED_NUM <= 6
  52. #define RGBLIGHT_LIMIT_VAL 90
  53. #else
  54. #define RGBLIGHT_LIMIT_VAL 45
  55. #endif
  56. #define RGBLIGHT_VAL_STEP 4
  57. #endif
  58. #define RGBLIGHT_HUE_STEP 10
  59. #define RGBLIGHT_SAT_STEP 17
  60. #if defined(RGBLIGHT_ENABLE) && !defined(IOS_DEVICE_ENABLE)
  61. #define USB_MAX_POWER_CONSUMPTION 400
  62. #else
  63. // iOS device need lessthan 100
  64. #define USB_MAX_POWER_CONSUMPTION 100
  65. #endif
  66. #define NUM_LOCK_LED_PIN B6
  67. #define CAPS_LOCK_LED_PIN B5
  68. // #define SCROLL_LOCK_LED_PIN B6
  69. // #define NUM_NMOSFET //uncomment this if you using n-mosfet
  70. // #define CAPS_NMOSFET //uncomment this if you using n-mosfet
  71. // #define SCROLL_NMOSFET //uncomment this if you using n-mosfet
  72. // #define NUM_INVERT // uncomment this if you want to reverse logic of numlock
  73. // This will make it light up only when lock is off
  74. // (Doesn't work on mac. There is no num lock, so it will be always off and lit)
  75. #ifdef NUM_NMOSFET
  76. #define RESET_NUM_LOCK_LED() writePinLow(NUM_LOCK_LED_PIN)
  77. #ifdef NUM_INVERT
  78. #define UPDATE_NUM_LOCK_LED() writePin(NUM_LOCK_LED_PIN, !led_state.num_lock)
  79. #else
  80. #define UPDATE_NUM_LOCK_LED() writePin(NUM_LOCK_LED_PIN, led_state.num_lock)
  81. #endif // NUM_INVERT
  82. #else
  83. #define RESET_NUM_LOCK_LED() writePinHigh(NUM_LOCK_LED_PIN)
  84. #ifdef NUM_INVERT
  85. #define UPDATE_NUM_LOCK_LED() writePin(NUM_LOCK_LED_PIN, led_state.num_lock)
  86. #else
  87. #define UPDATE_NUM_LOCK_LED() writePin(NUM_LOCK_LED_PIN, !led_state.num_lock)
  88. #endif // NUM_INVERT
  89. #endif // NUM_NMOSFET
  90. #ifdef CAPS_NMOSFET
  91. #define RESET_CAPS_LOCK_LED() writePinLow(CAPS_LOCK_LED_PIN)
  92. #define UPDATE_CAPS_LOCK_LED() writePin(CAPS_LOCK_LED_PIN, led_state.caps_lock)
  93. #else
  94. #define RESET_CAPS_LOCK_LED() writePinHigh(CAPS_LOCK_LED_PIN)
  95. #define UPDATE_CAPS_LOCK_LED() writePin(CAPS_LOCK_LED_PIN, !led_state.caps_lock)
  96. #endif // CAPS_NMOSFET
  97. #ifdef SCROLL_NMOSFET
  98. #define RESET_SCROLL_LOCK_LED() writePinLow(SCROLL_LOCK_LED_PIN)
  99. #define UPDATE_SCROLL_LOCK_LED() writePin(SCROLL_LOCK_LED_PIN, led_state.scroll_lock)
  100. #else
  101. #define RESET_SCROLL_LOCK_LED() writePinHigh(SCROLL_LOCK_LED_PIN)
  102. #define UPDATE_SCROLL_LOCK_LED() writePin(SCROLL_LOCK_LED_PIN, !led_state.scroll_lock)
  103. #endif // SCROLL_NMOSFET