rev1.c 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. /* Copyright 2020 marksard
  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 "rev1.h"
  17. // Optional override functions below.
  18. // You can leave any or all of these undefined.
  19. // These are only required if you want to perform custom actions.
  20. #ifdef RGB_MATRIX_ENABLE
  21. led_config_t g_led_config = { {
  22. { 10, 11, 12, 13, 0 },
  23. { 9, 18, 19, 14, 1 },
  24. { 8, 17, 16, 15, 2 },
  25. { 7, 6, 5, 4, 3 },
  26. { 30, 31, 32, 33, 20 },
  27. { 29, 38, 39, 34, 21 },
  28. { 28, 37, 36, 35, 22 },
  29. { 27, 26, 25, 24, 23 }
  30. }, {
  31. { 100, 0 }, { 100, 21 }, { 100, 43 }, { 100, 64 },
  32. { 75, 64 }, { 50, 64 }, { 25, 64 }, { 0, 64 },
  33. { 0, 43 }, { 0, 21 }, { 0, 0 },
  34. { 25, 0 }, { 50, 0 }, { 75, 0 },
  35. { 75, 21 }, { 75, 43 },
  36. { 50, 43 }, { 25, 43 },
  37. { 25, 21 }, { 50, 21 },
  38. { 125, 0 }, { 125, 21 }, { 125, 43 }, { 125, 64 },
  39. { 150, 64 }, { 175, 64 }, { 200, 64 }, { 225, 64 },
  40. { 225, 43 }, { 225, 21 }, { 225, 0 },
  41. { 200, 0 }, { 175, 0 }, { 150, 0 },
  42. { 150, 21 }, { 150, 43 },
  43. { 175, 43 }, { 200, 43 },
  44. { 200, 21 }, { 150, 21 }
  45. }, {
  46. 4, 4, 4, 1,
  47. 1, 1, 1, 1,
  48. 4, 4, 4, 4,
  49. 4, 4, 4, 4,
  50. 4, 4, 4, 4,
  51. 4, 4, 4, 1,
  52. 1, 1, 1, 1,
  53. 4, 4, 4, 4,
  54. 4, 4, 4, 4,
  55. 4, 4, 4, 4
  56. } };
  57. #endif
  58. __attribute__((weak))
  59. void matrix_init_user(void) {}
  60. void matrix_init_kb(void) {
  61. #ifdef RGB_MATRIX_ENABLE
  62. // if (!is_keyboard_master()) {
  63. // g_led_config = (led_config_t){ {
  64. // { 30, 31, 32, 33, 20 },
  65. // { 29, 38, 39, 34, 21 },
  66. // { 28, 37, 36, 35, 22 },
  67. // { 27, 26, 25, 24, 23 },
  68. // { 10, 11, 12, 13, 0 },
  69. // { 9, 18, 19, 14, 1 },
  70. // { 8, 17, 16, 15, 2 },
  71. // { 7, 6, 5, 4, 3 }
  72. // }, {
  73. // { 125, 0 }, { 125, 21 }, { 125, 43 }, { 125, 64 },
  74. // { 150, 64 }, { 175, 64 }, { 200, 64 }, { 225, 64 },
  75. // { 225, 43 }, { 225, 21 }, { 225, 0 },
  76. // { 200, 0 }, { 175, 0 }, { 150, 0 },
  77. // { 150, 21 }, { 150, 43 },
  78. // { 175, 43 }, { 200, 43 },
  79. // { 200, 21 }, { 150, 21 },
  80. // { 100, 0 }, { 100, 21 }, { 100, 43 }, { 100, 64 },
  81. // { 75, 64 }, { 50, 64 }, { 25, 64 }, { 0, 64 },
  82. // { 0, 43 }, { 0, 21 }, { 0, 0 },
  83. // { 25, 0 }, { 50, 0 }, { 75, 0 },
  84. // { 75, 21 }, { 75, 43 },
  85. // { 50, 43 }, { 25, 43 },
  86. // { 25, 21 }, { 50, 21 }
  87. // }, {
  88. // 4, 4, 4, 1,
  89. // 1, 1, 1, 1,
  90. // 4, 4, 4, 4,
  91. // 4, 4, 4, 4,
  92. // 4, 4, 4, 4,
  93. // 4, 4, 4, 1,
  94. // 1, 1, 1, 1,
  95. // 4, 4, 4, 4,
  96. // 4, 4, 4, 4,
  97. // 4, 4, 4, 4
  98. // } };
  99. // }
  100. #endif
  101. matrix_init_user();
  102. }