Move LED Matrix LED config to data driven (#24122)

This commit is contained in:
Ryan 2024-07-19 08:13:49 +10:00 committed by GitHub
parent 8b46500a74
commit 7b4e806c25
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
17 changed files with 685 additions and 382 deletions

View file

@ -31,30 +31,6 @@ const is31fl3731_led_t PROGMEM g_is31fl3731_leds[IS31FL3731_LED_COUNT] = {
{ 0, C6_1 }, { 0, C6_2 }, { 0, C6_3 }, { 0, C6_7 }, { 0, C6_11 }, { 0, C6_12 }, { 0, C6_14 }, { 0, C6_15 }, { 0, C6_16 },
};
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, NO_LED, 29, 30},
{31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, NO_LED, 45},
{46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, NO_LED, 59, 60},
{61, 62, 63, NO_LED, NO_LED, NO_LED, 64, NO_LED, NO_LED, NO_LED, 65, 66, NO_LED, 67, 68, 69},
}, {
//LED Index to Physical Positon
{0, 0}, {15, 0}, {30, 0}, {45, 0}, {60, 0}, {75, 0}, {90, 0}, {105, 0}, {119, 0}, {134, 0}, {149, 0}, {164, 0}, {179, 0}, {194, 0}, {209, 0}, {224, 0},
{0,16}, {15, 16}, {30, 16}, {45, 16}, {60, 16}, {75, 16}, {90, 16}, {105,16}, {119,16}, {134,16}, {149,16}, {164,16}, {179,16}, {209,16}, {224,16},
{0,32}, {15, 32}, {30, 32}, {45, 32}, {60, 32}, {75, 32}, {90, 32}, {105,32}, {119,32}, {134,32}, {149,32}, {164,32}, {179,32}, {194,32}, {224,32},
{0,48}, {15, 48}, {30, 48}, {45, 48}, {60, 48}, {75, 48}, {90, 48}, {105,48}, {119,48}, {134,48}, {149,48}, {164,48}, {179,48}, {209,48}, {224,48},
{0,64}, {15, 64}, {30, 64}, {90, 64}, {149,64}, {164,64}, {194,64}, {209,64}, {224,64},
}, {
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,
}
};
bool led_matrix_indicators_kb(void) {
if (!led_matrix_indicators_user()) {
return false;
@ -63,4 +39,4 @@ bool led_matrix_indicators_kb(void) {
led_matrix_set_value(31, 0xFF);
}
return true;
}
}