config.h 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154
  1. /*
  2. Copyright 2015 Jun Wako <wakojun@gmail.com>
  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. /* USB Device descriptor parameter */
  16. #define SERIAL_NUM "Unavailable"
  17. /* Temporary solution for matrix delay */
  18. #define IGNORE_ATOMIC_BLOCK
  19. /* Avoid out-of-bounds errors when SmartEEPROM is not enabled */
  20. #define EEPROM_SIZE 1024
  21. /* MCU Port name definitions */
  22. #define PA 0
  23. #define PB 1
  24. /* This Shift Register expands available hardware output lines to control additional peripherals */
  25. /* It uses four lines from the MCU to provide 16 output lines */
  26. /* Shift Register Clock configuration (MCU to ShiftRegister.RCLK) */
  27. #define SR_EXP_RCLK_PIN B14
  28. /* Shift Register Output Enable configuration (MCU to ShiftRegister.OE_N) */
  29. #define SR_EXP_OE_PIN B15
  30. /* SERCOM port to use for Shift Register SPI */
  31. /* DATAOUT and SCLK must be configured to use hardware pins of this port */
  32. #define SPI_SERCOM SERCOM2
  33. /* Shift Register SPI Data Out configuration (MCU.SERCOMx.PAD[0] to ShiftRegister.SER) */
  34. #define SPI_DATAOUT_PIN A12
  35. #define SPI_DATAOUT_MUX 2
  36. /* Shift Register SPI Serial Clock configuration (MCU.SERCOMx.PAD[1] to ShiftRegister.SRCLK) */
  37. #define SPI_SCLK_PIN A13
  38. #define SPI_SCLK_MUX 2
  39. /* Debug LED (Small LED Located near MCU) */
  40. #define DEBUG_LED_ENABLE 1
  41. #define DEBUG_LED_PORT PA
  42. #define DEBUG_LED_PIN 27
  43. /* Additional debugging ports */
  44. /* PCB M21 */
  45. #define DEBUG_PORT1_ENABLE 1
  46. #define DEBUG_PORT1_PORT PB
  47. #define DEBUG_PORT1_PIN 3
  48. /* PCB M23 */
  49. #define DEBUG_PORT2_ENABLE 1
  50. #define DEBUG_PORT2_PORT PB
  51. #define DEBUG_PORT2_PIN 17
  52. /* PCB M25 */
  53. #define DEBUG_PORT3_ENABLE 1
  54. #define DEBUG_PORT3_PORT PA
  55. #define DEBUG_PORT3_PIN 20
  56. /* Debug Boot Tracing - During boot sequence, ground this pin to halt and display debug code using Debug LED */
  57. /* This is useful in determining which hardware device may have malfunctioned or is improperly configured */
  58. /* Feature is automatically disabled after successful boot */
  59. /* PCB M27 */
  60. #define DEBUG_BOOT_TRACING_ENABLE 1
  61. #define DEBUG_BOOT_TRACING_PORT PB
  62. #define DEBUG_BOOT_TRACING_PIN 23
  63. /* USB2422 config */
  64. #define USB2422_ADDRESS 0x58
  65. #define USB2422_VENDOR_ID 0x04D8
  66. #define USB2422_PRODUCT_ID 0xEEC5
  67. #define USB2422_DEVICE_VER 0x0101
  68. #define USB2422_MANUFACTURER "Massdrop Inc."
  69. #define USB2422_PRODUCT "Massdrop Hub"
  70. #define USB2422_ACTIVE_PIN A18
  71. /*
  72. * Feature disable options
  73. * These options are also useful to firmware size reduction.
  74. */
  75. /* disable debug print */
  76. //#define NO_DEBUG
  77. /* disable print */
  78. //#define NO_PRINT
  79. /* disable action features */
  80. //#define NO_ACTION_LAYER
  81. //#define NO_ACTION_TAPPING
  82. //#define NO_ACTION_ONESHOT
  83. #define RGB_MATRIX_KEYPRESSES
  84. #define RGB_MATRIX_LED_PROCESS_LIMIT 15
  85. #define RGB_MATRIX_LED_FLUSH_LIMIT 10
  86. // RGB Matrix Animation modes. Explicitly enabled
  87. // For full list of effects, see:
  88. // https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects
  89. # define ENABLE_RGB_MATRIX_ALPHAS_MODS
  90. # define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN
  91. # define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT
  92. # define ENABLE_RGB_MATRIX_BREATHING
  93. # define ENABLE_RGB_MATRIX_BAND_SAT
  94. # define ENABLE_RGB_MATRIX_BAND_VAL
  95. # define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT
  96. # define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL
  97. # define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT
  98. # define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL
  99. # define ENABLE_RGB_MATRIX_CYCLE_ALL
  100. # define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT
  101. # define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN
  102. # define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON
  103. # define ENABLE_RGB_MATRIX_CYCLE_OUT_IN
  104. # define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL
  105. # define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL
  106. # define ENABLE_RGB_MATRIX_CYCLE_SPIRAL
  107. # define ENABLE_RGB_MATRIX_DUAL_BEACON
  108. # define ENABLE_RGB_MATRIX_RAINBOW_BEACON
  109. # define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS
  110. # define ENABLE_RGB_MATRIX_RAINDROPS
  111. # define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS
  112. # define ENABLE_RGB_MATRIX_HUE_BREATHING
  113. # define ENABLE_RGB_MATRIX_HUE_PENDULUM
  114. # define ENABLE_RGB_MATRIX_HUE_WAVE
  115. # define ENABLE_RGB_MATRIX_PIXEL_RAIN
  116. # define ENABLE_RGB_MATRIX_PIXEL_FLOW
  117. # define ENABLE_RGB_MATRIX_PIXEL_FRACTAL
  118. // enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined
  119. # define ENABLE_RGB_MATRIX_TYPING_HEATMAP
  120. # define ENABLE_RGB_MATRIX_DIGITAL_RAIN
  121. // enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined
  122. # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE
  123. # define ENABLE_RGB_MATRIX_SOLID_REACTIVE
  124. # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE
  125. # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE
  126. # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS
  127. # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS
  128. # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS
  129. # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS
  130. # define ENABLE_RGB_MATRIX_SPLASH
  131. # define ENABLE_RGB_MATRIX_MULTISPLASH
  132. # define ENABLE_RGB_MATRIX_SOLID_SPLASH
  133. # define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH
  134. #include "config_led.h"