logo

qmk_firmware

custom branch of QMK firmware git clone https://anongit.hacktivis.me/git/qmk_firmware.git

rev1.c (3627B)


  1. /* Copyright 2020 Mechlovin'
  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. led_config_t g_led_config = { {
  19. //Key Matrix to LED Index
  20. {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13},
  21. {29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 15},
  22. {30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 16, 43},
  23. {59, 57, 56, 55, 54, 53, 52, 51, 50, 49, 48, 47, 46, 44},
  24. {60, 61, 62, NO_LED, 63, NO_LED, 64, NO_LED, 67, NO_LED, 68, 69, 70, 71}
  25. }, {
  26. //LED Index to Physical Positon
  27. { 0, 0}, { 16, 0}, { 32, 0 }, { 48, 0 }, { 64, 0}, { 80, 0}, { 96, 0}, { 112, 0}, { 128, 0}, { 144, 0}, { 160, 0}, { 176, 0}, {192, 0}, {208, 0}, {216, 0},
  28. {220, 0}, {211, 16}, {200,16 }, {176,16 }, {160,16}, {144,16}, {128,16}, { 112,16}, { 96,16}, { 80,16}, { 64,16}, { 48,16}, {32, 16}, {16, 16}, {0,16},
  29. { 0, 32}, { 16, 32}, { 32,32 }, { 48,32 }, { 64,32}, { 80,32}, { 96,32}, { 112,32}, { 128,32}, { 144,32}, { 160,32}, { 176,32}, {192, 32}, {208, 32}, {224,48},
  30. {208, 48}, {192, 48}, {160,48 }, {144,48 }, {128,48}, {112,48}, {96,48}, { 80,48}, { 64,48}, { 48,48}, { 32,48}, { 16,48}, {8, 48}, {0, 48}, {0,48},
  31. { 0, 64}, { 16, 64}, { 32,64 }, { 48,64 }, { 64,64}, { 80,64}, { 96,64}, { 112,64}, { 144,64}, { 160,64}, { 192,64}, { 224,64},
  32. }, {
  33. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  34. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  35. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  36. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  37. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  38. } };
  39. bool rgb_matrix_indicators_kb(void) {
  40. if (!rgb_matrix_indicators_user()) {
  41. return false;
  42. }
  43. if (host_keyboard_led_state().caps_lock) {
  44. rgb_matrix_set_color(30, 255, 255, 255);
  45. }
  46. return true;
  47. }
  48. #endif