rev1.c (2288B)
1 /* Copyright 2020 cmdremily 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 17 #include "quantum.h" 18 19 #ifdef RGB_MATRIX_ENABLE 20 const is31fl3731_led_t PROGMEM g_is31fl3731_leds[IS31FL3731_LED_COUNT] = { 21 /* Refer to IS31 manual for these locations 22 * driver 23 * | R location 24 * | | G location 25 * | | | B location 26 * | | | | */ 27 // clang-format off 28 {0, C4_1, C5_1, C6_1}, 29 {0, C4_2, C5_2, C6_2}, 30 {0, C4_3, C5_3, C6_3}, 31 {0, C1_4, C2_4, C3_4}, 32 {0, C4_9, C5_9, C6_9}, 33 {0, C4_10, C5_10, C6_10}, 34 {0, C4_11, C5_11, C6_11}, 35 {0, C1_12, C2_12, C3_12}, 36 37 {0, C7_1, C8_1, C9_1}, 38 {0, C7_2, C8_2, C9_2}, 39 {0, C7_3, C8_3, C9_3}, 40 {0, C7_4, C8_4, C9_4}, 41 {0, C7_9, C8_9, C9_9}, 42 {0, C7_10, C8_10, C9_10}, 43 {0, C7_11, C8_11, C9_11}, 44 {0, C7_12, C8_12, C9_12}, 45 46 {0, C1_5, C2_5, C3_5}, 47 {0, C1_6, C2_6, C3_6}, 48 {0, C1_7, C2_7, C3_7}, 49 {0, C1_8, C2_8, C3_8}, 50 {0, C1_13, C2_13, C3_13}, 51 {0, C1_14, C2_14, C3_14}, 52 {0, C1_15, C2_15, C3_15}, 53 {0, C1_16, C2_16, C3_16}, 54 55 {0, C7_5, C8_5, C9_5}, 56 {0, C7_6, C8_6, C9_6}, 57 {0, C4_7, C5_7, C6_7}, 58 {0, C4_8, C5_8, C6_8}, 59 {0, C7_13, C8_13, C9_13}, 60 {0, C7_14, C8_14, C9_14}, 61 {0, C4_15, C5_15, C6_15}, 62 {0, C4_16, C5_16, C6_16}, 63 // clang-format on 64 }; 65 66 void keyboard_pre_init_kb(void) { 67 // Light power LED 68 gpio_set_pin_output(POWER_LED_PIN); 69 gpio_write_pin_low(POWER_LED_PIN); 70 71 // We don't use this feature of the IS31FL3731 but it is electrically connected 72 // Make sure not to drive it 73 gpio_set_pin_input(IS31FL3731_IRQ_PIN); 74 75 keyboard_pre_init_user(); 76 } 77 78 #endif