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