config.h 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. /*
  2. Copyright 2022 Moritz Plattner
  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. /* Enable NKRO by default*/
  16. #define FORCE_NKRO
  17. /* Use 3 dynamic keymap layers */
  18. #define DYNAMIC_KEYMAP_LAYER_COUNT 3
  19. /* i2C Config */
  20. #define I2C_DRIVER I2CD1
  21. #define I2C1_SCL_PIN B6
  22. #define I2C1_SDA_PIN B7
  23. #define I2C1_SCL_PAL_MODE 4
  24. #define I2C1_SDA_PAL_MODE 4
  25. #define I2C1_DUTY_CYCLE FAST_DUTY_CYCLE_16_9
  26. #define I2C1_CLOCK_SPEED 400000
  27. /* RGB Matrix driver config */
  28. #define DRIVER_COUNT 2
  29. #define DRIVER_ADDR_1 0b1010000
  30. #define DRIVER_ADDR_2 0b1010011
  31. #define DRIVER_1_LED_TOTAL 46
  32. #define DRIVER_2_LED_TOTAL 39
  33. #define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)
  34. #define RGB_MATRIX_LED_FLUSH_LIMIT 32
  35. #define RGB_DISABLE_WHEN_USB_SUSPENDED
  36. #define RGB_MATRIX_DEFAULT_SPD 40
  37. #define RGB_MATRIX_DEFAULT_VAL 220
  38. #define RGB_MATRIX_DEFAULT_MODE RGB_MATRIX_CUSTOM_SINGLE_COLOR_RAINDROPS
  39. #define RGB_MATRIX_KEYPRESSES
  40. #define RGB_MATRIX_FRAMEBUFFER_EFFECTS
  41. // RGB Matrix Animation modes. Explicitly enabled
  42. // For full list of effects, see:
  43. // https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects
  44. #define ENABLE_RGB_MATRIX_ALPHAS_MODS // 2 Alphas and mods have different colors
  45. #define ENABLE_RGB_MATRIX_BREATHING // 3 Breath a static color
  46. #define ENABLE_RGB_MATRIX_CYCLE_ALL // 4 Cycle all colors
  47. #define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN // 5 Cycle vertically
  48. #define ENABLE_RGB_MATRIX_CYCLE_SPIRAL // 6 Cycle in a spirals
  49. #define ENABLE_RGB_MATRIX_TYPING_HEATMAP // 7 Heatmap of typing speed
  50. #define ENABLE_RGB_MATRIX_SOLID_REACTIVE // 8 Static background, pressed keys light up
  51. #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE // 9 Pressed keys and nearby keys light up
  52. #define ENABLE_RGB_MATRIX_CUSTOM_SINGLE_COLOR_RAINDROPS // 0 Single color raindrops, random keys lighting up at randomized intensity
  53. #define ENABLE_RGB_MATRIX_CUSTOM_STATIC_GAME_MODE // - Game mode sets the entire matrix (static) once, then stops LED refreshes
  54. #define INDICATOR_MAX_BRIGHTNESS 255
  55. #ifdef RGB_MATRIX_MAXIMUM_BRIGHTNESS
  56. #undef INDICATOR_MAX_BRIGHTNESS
  57. #define INDICATOR_MAX_BRIGHTNESS RGB_MATRIX_MAXIMUM_BRIGHTNESS
  58. #endif
  59. /* Define indicator LED indices, used for lighting effects */
  60. #define W_LED_INDEX 33
  61. #define A_LED_INDEX 47
  62. #define S_LED_INDEX 48
  63. #define D_LED_INDEX 49
  64. #define CAPS_LED_INDEX 46
  65. #define WIN_LED_INDEX 76
  66. #define ANV_A_LED_INDEX 15
  67. #define ANV_N_LED_INDEX 30
  68. #define ANV_V_LED_INDEX 45
  69. #define ANV_I_LED_INDEX 59
  70. #define ANV_L_LED_INDEX 74
  71. #define NUM_1_LED_INDEX 17
  72. #define NUM_2_LED_INDEX 18
  73. #define NUM_3_LED_INDEX 19
  74. #define NUM_4_LED_INDEX 20
  75. #define NUM_5_LED_INDEX 21
  76. #define M_LED_INDEX 68
  77. #define K_LED_INDEX 54
  78. #define O_LED_INDEX 40
  79. #define NUM_0_LED_INDEX 26
  80. #define P_LED_INDEX 41
  81. #define SCLN_LED_INDEX 56
  82. #define SLSH_LED_INDEX 71
  83. /* Since the typing heatmap is broken on duplex matrix boards, force it to "slim" mode */
  84. #ifdef ENABLE_RGB_MATRIX_TYPING_HEATMAP
  85. #define RGB_MATRIX_TYPING_HEATMAP_SLIM
  86. #endif
  87. /* Set HSE clock since it differs from F411 default */
  88. #define STM32_HSECLK 16000000