logo

qmk_firmware

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

numpad.c (2523B)


  1. /* Copyright 2021 Shulin Huang <mumu@x-bows.com>
  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, C3_3, C2_3, C1_3}, // L01
  20. {0, C3_4, C2_4, C1_4}, // L02
  21. {0, C9_5, C8_5, C7_5}, // L03
  22. {0, C9_6, C8_6, C7_6}, // L04
  23. {0, C6_1, C5_1, C4_1}, // L05
  24. {0, C6_2, C5_2, C4_2}, // L06
  25. {0, C6_3, C5_3, C4_3}, // L07
  26. {0, C6_6, C5_6, C4_6}, // L08
  27. {0, C9_1, C8_1, C7_1}, // L09
  28. {0, C9_2, C8_2, C7_2}, // L10
  29. {0, C9_3, C8_3, C7_3}, // L11
  30. {0, C9_4, C8_4, C7_4}, // L12
  31. {0, C3_11, C2_11, C1_11}, // L13
  32. {0, C3_12, C2_12, C1_12}, // L14
  33. {0, C3_13, C2_13, C1_13}, // L15
  34. {0, C3_14, C2_14, C1_14}, // L16
  35. {0, C6_9, C5_9, C4_9}, // L17
  36. {0, C6_10, C5_10, C4_10}, // L18
  37. {0, C6_11, C5_11, C4_11}, // L19
  38. {0, C6_14, C5_14, C4_14}, // L20
  39. {0, C6_16, C5_16, C4_16}, // L21
  40. {0, C6_15, C5_15, C4_15}, // L22
  41. };
  42. led_config_t g_led_config = { {
  43. { 0, 1, 2, 3 },
  44. { 4, 5, 6, 7 },
  45. { 8, 9, 10, 11 },
  46. { 12, 13, 14, 15 },
  47. { 16, 17, 18, 19 },
  48. { 20, NO_LED, 21, NO_LED}
  49. }, {
  50. {0,0}, {20,0}, {40,0}, {60,0},
  51. {0,13}, {20,13}, {40,13}, {60,13},
  52. {0,25}, {20,25}, {40,25}, {60,25},
  53. {0,38}, {20,38}, {40,38}, {60,38},
  54. {0,50}, {20,50}, {40,50}, {60,57},
  55. {10,63}, {40,63}
  56. }, {
  57. 4, 4, 4, 4,
  58. 4, 4, 4, 4,
  59. 4, 4, 4, 4,
  60. 4, 4, 4, 4,
  61. 4, 4, 4, 4,
  62. 4, 4,
  63. } };
  64. bool rgb_matrix_indicators_kb(void) {
  65. if (!rgb_matrix_indicators_user()) {
  66. return false;
  67. }
  68. if (host_keyboard_led_state().num_lock) {
  69. rgb_matrix_set_color(4, 0xFF, 0xFF, 0xFF);
  70. }
  71. return true;
  72. }
  73. #endif