v2.c 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. /* Copyright 2020 DZTECH <moyi4681@live.cn>
  2. *
  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. *
  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. *
  13. * You should have received a copy of the GNU General Public License
  14. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  15. */
  16. #include "quantum.h"
  17. #ifdef RGB_MATRIX_ENABLE
  18. const is31fl3731_led_t PROGMEM g_is31fl3731_leds[IS31FL3731_LED_COUNT] = {
  19. { 0, C8_8, C7_8, C6_8 },
  20. { 0, C9_8, C7_7, C6_7 },
  21. { 0, C9_7, C8_7, C6_6 },
  22. { 0, C9_6, C8_6, C7_6 },
  23. { 0, C9_5, C8_5, C7_5 },
  24. { 0, C9_4, C8_4, C7_4 },
  25. { 0, C9_3, C8_3, C7_3 },
  26. { 0, C9_2, C8_2, C7_2 },
  27. { 0, C9_1, C8_1, C7_1 },
  28. { 0, C2_9, C3_9, C4_9 },
  29. { 0, C1_9, C3_10, C4_10 },
  30. { 0, C1_10, C2_10, C4_11 },
  31. { 0, C1_11, C2_11, C3_11 },
  32. { 0, C1_13, C2_13, C3_13 },
  33. { 0, C1_14, C2_14, C3_14 },
  34. { 0, C1_7, C2_7, C3_7 },
  35. { 0, C1_6, C2_6, C3_6 },
  36. { 0, C1_5, C2_5, C3_5 },
  37. { 0, C1_4, C2_4, C3_4 },
  38. { 0, C1_3, C2_3, C3_3 },
  39. { 0, C1_2, C2_2, C4_3 },
  40. { 0, C1_1, C3_2, C4_2 },
  41. { 0, C2_1, C3_1, C4_1 },
  42. { 0, C9_9, C8_9, C7_9 },
  43. { 0, C9_10, C8_10, C7_10 },
  44. { 0, C9_11, C8_11, C7_11 },
  45. { 0, C9_12, C8_12, C7_12 },
  46. { 0, C9_13, C8_13, C7_13 },
  47. { 0, C9_14, C8_14, C7_14 },
  48. { 0, C1_15, C2_15, C3_15 },
  49. { 0, C1_8, C2_8, C3_8 },
  50. { 1, C9_6, C8_6, C7_6 },
  51. { 1, C9_5, C8_5, C7_5 },
  52. { 1, C9_4, C8_4, C7_4 },
  53. { 1, C9_3, C8_3, C7_3 },
  54. { 1, C9_2, C8_2, C7_2 },
  55. { 1, C9_1, C8_1, C7_1 },
  56. { 1, C2_9, C3_9, C4_9 },
  57. { 1, C1_9, C3_10, C4_10 },
  58. { 1, C1_10, C2_10, C4_11 },
  59. { 1, C1_11, C2_11, C3_11 },
  60. { 1, C1_12, C2_12, C3_12 },
  61. { 1, C1_13, C2_13, C3_13 },
  62. { 0, C1_16, C2_16, C3_16 },
  63. { 1, C9_8, C7_7, C6_7 },
  64. { 1, C1_5, C2_5, C3_5 },
  65. { 1, C1_4, C2_4, C3_4 },
  66. { 1, C1_3, C2_3, C3_3 },
  67. { 1, C1_2, C2_2, C4_3 },
  68. { 1, C1_1, C3_2, C4_2 },
  69. { 1, C9_9, C8_9, C7_9 },
  70. { 1, C9_10, C8_10, C7_10 },
  71. { 1, C9_11, C8_11, C7_11 },
  72. { 1, C9_12, C8_12, C7_12 },
  73. { 1, C1_14, C2_14, C3_14 },
  74. { 1, C1_15, C2_15, C3_15 },
  75. { 1, C1_16, C2_16, C3_16 },
  76. { 0, C9_15, C8_15, C6_14 },
  77. { 1, C8_8, C7_8, C6_8 },
  78. { 1, C1_8, C2_8, C3_8 },
  79. { 1, C1_7, C2_7, C3_7 },
  80. { 1, C2_1, C3_1, C4_1 },
  81. { 1, C9_14, C8_14, C7_14 },
  82. { 1, C9_15, C8_15, C6_14 },
  83. { 1, C9_16, C7_15, C6_15 },
  84. { 1, C8_16, C7_16, C6_16 },
  85. { 0, C8_16, C7_16, C6_16 },
  86. { 0, C9_16, C7_15, C6_15 }
  87. };
  88. bool rgb_matrix_indicators_kb(void) {
  89. if (!rgb_matrix_indicators_user()) {
  90. return false;
  91. }
  92. if (host_keyboard_led_state().caps_lock) {
  93. rgb_matrix_set_color(30, 0xFF, 0xFF, 0xFF);
  94. }
  95. return true;
  96. }
  97. #endif