forked from mirrors/qmk_userspace
168 lines
4.6 KiB
C
168 lines
4.6 KiB
C
/* Copyright 2024 @ Keychron (https://www.keychron.com)
|
|
*
|
|
* This program is free software: you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License as published by
|
|
* the Free Software Foundation, either version 2 of the License, or
|
|
* (at your option) any later version.
|
|
*
|
|
* This program is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
*/
|
|
|
|
#include "quantum.h"
|
|
|
|
// clang-format off
|
|
#ifdef LED_MATRIX_ENABLE
|
|
const snled27351_led_t g_snled27351_leds[LED_MATRIX_LED_COUNT] = {
|
|
/* Refer to SNLED27351 manual for these locations
|
|
* driver
|
|
* | LED address
|
|
* | | */
|
|
{0, F_1},
|
|
{0, F_2},
|
|
{0, F_3},
|
|
{0, F_4},
|
|
{0, F_5},
|
|
{0, F_6},
|
|
{0, F_7},
|
|
{0, F_8},
|
|
{0, F_9},
|
|
{0, F_10},
|
|
{0, F_11},
|
|
{0, F_12},
|
|
{0, F_13},
|
|
{0, F_14},
|
|
{0, F_15},
|
|
{0, F_16},
|
|
{0, A_8},
|
|
{0, A_9},
|
|
{0, A_10},
|
|
|
|
{0, E_1},
|
|
{0, E_2},
|
|
{0, E_3},
|
|
{0, E_4},
|
|
{0, E_5},
|
|
{0, E_6},
|
|
{0, E_7},
|
|
{0, E_8},
|
|
{0, E_9},
|
|
{0, E_10},
|
|
{0, E_11},
|
|
{0, E_12},
|
|
{0, E_13},
|
|
{0, E_15},
|
|
{0, E_16},
|
|
{0, H_7},
|
|
{0, H_8},
|
|
{0, H_9},
|
|
{0, H_10},
|
|
|
|
{0, D_1},
|
|
{0, D_2},
|
|
{0, D_3},
|
|
{0, D_4},
|
|
{0, D_5},
|
|
{0, D_6},
|
|
{0, D_7},
|
|
{0, D_8},
|
|
{0, D_9},
|
|
{0, D_10},
|
|
{0, D_11},
|
|
{0, D_12},
|
|
{0, D_13},
|
|
{0, D_15},
|
|
{0, D_16},
|
|
{0, H_12},
|
|
{0, H_13},
|
|
{0, H_14},
|
|
{0, H_15},
|
|
|
|
{0, C_1},
|
|
{0, C_2},
|
|
{0, C_3},
|
|
{0, C_4},
|
|
{0, C_5},
|
|
{0, C_6},
|
|
{0, C_7},
|
|
{0, C_8},
|
|
{0, C_9},
|
|
{0, C_10},
|
|
{0, C_11},
|
|
{0, C_12},
|
|
{0, C_14},
|
|
{0, C_16},
|
|
{0, G_7},
|
|
{0, G_8},
|
|
{0, G_9},
|
|
|
|
{0, B_1},
|
|
{0, B_3},
|
|
{0, B_4},
|
|
{0, B_5},
|
|
{0, B_6},
|
|
{0, B_7},
|
|
{0, B_8},
|
|
{0, B_9},
|
|
{0, B_10},
|
|
{0, B_11},
|
|
{0, B_12},
|
|
{0, B_13},
|
|
{0, B_15},
|
|
{0, G_10},
|
|
{0, G_11},
|
|
{0, G_12},
|
|
{0, G_13},
|
|
|
|
{0, A_1},
|
|
{0, A_2},
|
|
{0, A_3},
|
|
{0, A_7},
|
|
{0, A_11},
|
|
{0, A_12},
|
|
{0, A_13},
|
|
{0, A_14},
|
|
{0, A_15},
|
|
{0, A_16},
|
|
{0, G_14},
|
|
{0, G_16},
|
|
|
|
};
|
|
|
|
#define __ NO_LED
|
|
|
|
led_config_t g_led_config = {
|
|
{
|
|
// Key Matrix to LED Index
|
|
{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, __ },
|
|
{ 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, __, 32, 33, 34, 35, 36, 37 },
|
|
{ 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, __, 51, 52, 53, 54, 55, 56 },
|
|
{ 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, __, 69, __, 70, 71, 72, 73, __ },
|
|
{ 74, __, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, __, 86, __, 87, 88, 89, 90 },
|
|
{ 91, 92, 93, __, __, __, 94, __, __, __, 95, 96, 97, 98, 99,100,101,__, 102, __ },
|
|
},
|
|
{
|
|
// LED Index to Physical Position
|
|
{0, 0}, {12, 0}, {24, 0}, {36, 0}, {48, 0}, {60, 0}, {72, 0}, {84, 0}, {96, 0}, {108, 0}, {120, 0}, {132, 0}, {144, 0}, {156, 0}, {168, 0}, {180, 0},{192, 0},{203, 0},{213, 0},
|
|
{0,13}, {12,13}, {24,13}, {36,13}, {48,13}, {60,13}, {72,13}, {84,13}, {96,13}, {108,13}, {120,13}, {132,13}, {144,13}, {162,13}, {180,13},{192,13},{203,13},{213,13},{224,13},
|
|
{2,26}, {18,26}, {30,26}, {42,26}, {54,26}, {66,26}, {78,26}, {90,26}, {102,26},{114,26}, {126,26}, {138,26}, {150,26}, {164,26}, {180,26},{192,26},{203,26},{213,26},{224,32},
|
|
{4,39}, {22,39}, {34,39}, {46,39}, {58,39}, {70,39}, {82,39}, {94,39}, {106,39},{118,39}, {130,39}, {142,39}, {163,39}, {180,39},{192,39},{203,39},{213,39},
|
|
{8,51}, {28,51}, {40,51}, {52,51}, {64,51}, {76,51}, {88,51}, {100,51},{112,51}, {124,51}, {136,51}, {148,51}, {168,51}, {192,51},{203,51},{213,51},{224,57},
|
|
{1,64}, {16,64}, {30,64}, {78,64}, {120,64}, {132,64}, {144,64}, {156,64}, {168,64}, {180,64},{197,64}, {213,64},
|
|
},
|
|
{
|
|
// LED Index to Flag
|
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
}
|
|
};
|
|
#endif
|