config.h 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. /*
  2. Copyright 2021 Takeshi Nishio
  3. This program is free software: you can redistribute it and/or modify
  4. it under the terms of the GNU General Public License as published by
  5. the Free Software Foundation, either version 2 of the License, or
  6. (at your option) any later version.
  7. This program is distributed in the hope that it will be useful,
  8. but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10. GNU General Public License for more details.
  11. You should have received a copy of the GNU General Public License
  12. along with this program. If not, see <http://www.gnu.org/licenses/>.
  13. */
  14. #pragma once
  15. #include "config_common.h"
  16. /* USB Device descriptor parameter */
  17. #define VENDOR_ID 0xB9DD
  18. #define PRODUCT_ID 0x176A
  19. #define DEVICE_VER 0x0040
  20. #define MANUFACTURER jpskenn
  21. #define PRODUCT Unison
  22. /* key matrix size */
  23. /* NOTE: With Round-Robin matrix, set same size for both. */
  24. #define MATRIX_ROWS 10
  25. #define MATRIX_COLS 10
  26. /* key matrix pins */
  27. /* NOTE: With Round-Robin matrix, set same pins for both. */
  28. #define MATRIX_ROW_PINS { B3, E6, F1, F5, F7, B2, F0, F4, F6, C7 }
  29. #define MATRIX_COL_PINS { B3, E6, F1, F5, F7, B2, F0, F4, F6, C7 }
  30. #define UNUSED_PINS
  31. #define DIODE_DIRECTION COL2ROW
  32. /* Rotary Encoder */
  33. #ifdef ENCODER_ENABLE
  34. #define ENCODERS_PAD_A { B0, D2, D5, D6, B4 }
  35. #define ENCODERS_PAD_B { B1, D3, D4, D7, B5 }
  36. #define ENCODER_RESOLUTION 4 //the default & suggested is 4
  37. #endif
  38. /* Audio */
  39. #ifdef AUDIO_ENABLE
  40. #define AUDIO_PIN C6
  41. #define AUDIO_PIN_ALT B6
  42. #define AUDIO_CLICKY
  43. #define MUSIC_MAP
  44. #endif
  45. /* RGB Lighting */
  46. #define RGB_DI_PIN B7
  47. #ifdef RGB_DI_PIN
  48. #define RGBLED_NUM 7 // Layer Indicator(2) + Rotary Encoder(5)
  49. #define RGBLIGHT_LED_MAP {1, 2, 0, 3, 4, 5, 6} // align LEDs from Left to Right
  50. #define RGBLIGHT_HUE_STEP 4
  51. #define RGBLIGHT_SAT_STEP 8
  52. #define RGBLIGHT_VAL_STEP 8
  53. #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */
  54. // #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */
  55. /*== Lighting Layers ==*/
  56. #define RGBLIGHT_LAYERS
  57. // #define RGBLIGHT_MAX_LAYERS 2
  58. #define RGBLIGHT_LAYERS_OVERRIDE_RGB_OFF // Overriding RGB Lighting on/off status
  59. /*== all animations enable ==*/
  60. // #define RGBLIGHT_ANIMATIONS
  61. /*== or choose animations ==*/
  62. #define RGBLIGHT_EFFECT_BREATHING
  63. #define RGBLIGHT_EFFECT_RAINBOW_MOOD
  64. #define RGBLIGHT_EFFECT_RAINBOW_SWIRL
  65. // #define RGBLIGHT_EFFECT_SNAKE
  66. // #define RGBLIGHT_EFFECT_KNIGHT
  67. // #define RGBLIGHT_EFFECT_CHRISTMAS
  68. // #define RGBLIGHT_EFFECT_STATIC_GRADIENT
  69. // #define RGBLIGHT_EFFECT_RGB_TEST
  70. // #define RGBLIGHT_EFFECT_ALTERNATING
  71. #define RGBLIGHT_EFFECT_TWINKLE
  72. // /*== customize breathing effect ==*/
  73. // /*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/
  74. // #define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64
  75. // /*==== use exp() and sin() ====*/
  76. // #define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7
  77. // #define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255
  78. #endif
  79. /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
  80. #define DEBOUNCE 5
  81. /*
  82. * BOOTMAGIC Lite
  83. * Hold Left-Top key to enter bootloader.
  84. *
  85. * NOTE:
  86. * With Round-Robin matrix, diagonal position is always High.
  87. * So, the default (0,0) is always judged as hold and keyboard enters bootloader.
  88. * To prevent this, set specific position for it.
  89. */
  90. #define BOOTMAGIC_LITE_ROW 5
  91. #define BOOTMAGIC_LITE_COLUMN 0
  92. /*
  93. * Feature disable options
  94. * These options are also useful to firmware size reduction.
  95. */
  96. /* disable debug print */
  97. //#define NO_DEBUG
  98. /* disable print */
  99. //#define NO_PRINT
  100. /* disable action features */
  101. //#define NO_ACTION_LAYER
  102. //#define NO_ACTION_TAPPING
  103. //#define NO_ACTION_ONESHOT
  104. /* disable these deprecated features by default */
  105. #define NO_ACTION_MACRO
  106. #define NO_ACTION_FUNCTION