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