Migrate RGB Matrix layout for two boards (#23963)

This commit is contained in:
Ryan 2024-06-23 13:08:57 +10:00 committed by GitHub
parent b4047be3eb
commit e96d6d9bd4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 99 additions and 49 deletions

View file

@ -17,34 +17,6 @@
#include "quantum.h"
#ifdef RGB_MATRIX_ENABLE
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, NO_LED },
{ 20, 21, 22, 23, NO_LED, 24, NO_LED},
{ 25, 26, 27, 28, 29, NO_LED, NO_LED},
{ 30, 31, 32, 33, 34, 35}
}, {
{0,0}, {37,0}, {75,0}, {112,0}, {149,0}, {187,0}, {224,0},
{0,16}, {37,16}, {75,16}, {112,16}, {149,16}, {187,16}, {224,16},
{0,32}, {37,32}, {75,32}, {112,32}, {149,32}, {187,32},
{0,48}, {37,48}, {75,48}, {112,48}, {187,48},
{0,64}, {37,64}, {65,64}, {112,64}, {149,64},
{187,64}, {173,64}, {186,64}, {198,64}, {211,64},{224,64},
}, {
4,4,4,4,4,4,4,
4,4,4,4,4,4,4,
4,4,4,4,4,4,
4,4,4,4,4,
4,4,4,4,4,
4,4,4,4,4,4
} };
#endif
/* OLED */
#ifdef OLED_ENABLE
uint16_t startup_timer = 0;

View file

@ -46,7 +46,50 @@
},
"driver": "ws2812",
"max_brightness": 200,
"sleep": true
"sleep": true,
"layout": [
{"matrix": [0, 0], "x": 0, "y": 0, "flags": 4},
{"matrix": [0, 1], "x": 37, "y": 0, "flags": 4},
{"matrix": [0, 2], "x": 75, "y": 0, "flags": 4},
{"matrix": [0, 3], "x": 112, "y": 0, "flags": 4},
{"matrix": [0, 4], "x": 149, "y": 0, "flags": 4},
{"matrix": [0, 5], "x": 187, "y": 0, "flags": 4},
{"matrix": [0, 6], "x": 224, "y": 0, "flags": 4},
{"matrix": [1, 0], "x": 0, "y": 16, "flags": 4},
{"matrix": [1, 1], "x": 37, "y": 16, "flags": 4},
{"matrix": [1, 2], "x": 75, "y": 16, "flags": 4},
{"matrix": [1, 3], "x": 112, "y": 16, "flags": 4},
{"matrix": [1, 4], "x": 149, "y": 16, "flags": 4},
{"matrix": [1, 5], "x": 187, "y": 16, "flags": 4},
{"matrix": [1, 6], "x": 224, "y": 16, "flags": 4},
{"matrix": [2, 0], "x": 0, "y": 32, "flags": 4},
{"matrix": [2, 1], "x": 37, "y": 32, "flags": 4},
{"matrix": [2, 2], "x": 75, "y": 32, "flags": 4},
{"matrix": [2, 3], "x": 112, "y": 32, "flags": 4},
{"matrix": [2, 4], "x": 149, "y": 32, "flags": 4},
{"matrix": [2, 5], "x": 187, "y": 32, "flags": 4},
{"matrix": [3, 0], "x": 0, "y": 48, "flags": 4},
{"matrix": [3, 1], "x": 37, "y": 48, "flags": 4},
{"matrix": [3, 2], "x": 75, "y": 48, "flags": 4},
{"matrix": [3, 3], "x": 112, "y": 48, "flags": 4},
{"matrix": [3, 5], "x": 187, "y": 48, "flags": 4},
{"matrix": [4, 0], "x": 18, "y": 64, "flags": 4},
{"matrix": [4, 1], "x": 75, "y": 64, "flags": 4},
{"matrix": [4, 2], "x": 149, "y": 64, "flags": 4},
{"matrix": [4, 3], "x": 187, "y": 64, "flags": 4},
{"matrix": [4, 4], "x": 224, "y": 64, "flags": 4},
{"x": 224, "y": 56, "flags": 2},
{"x": 112, "y": 56, "flags": 2},
{"x": 0, "y": 56, "flags": 2},
{"x": 0, "y": 8, "flags": 2},
{"x": 112, "y": 8, "flags": 2},
{"x": 224, "y": 8, "flags": 2}
]
},
"features": {
"bootmagic": true,

View file

@ -58,7 +58,61 @@
},
"driver": "ws2812",
"max_brightness": 120,
"sleep": true
"sleep": true,
"layout": [
{"matrix": [3, 11], "x": 223, "y": 63, "flags": 1},
{"matrix": [3, 10], "x": 203, "y": 63, "flags": 1},
{"matrix": [3, 9], "x": 183, "y": 63, "flags": 1},
{"matrix": [3, 8], "x": 162, "y": 63, "flags": 1},
{"matrix": [3, 7], "x": 142, "y": 63, "flags": 1},
{"matrix": [3, 6], "x": 122, "y": 63, "flags": 4},
{"x": 112, "y": 63, "flags": 4},
{"matrix": [3, 5], "x": 101, "y": 63, "flags": 4},
{"matrix": [3, 4], "x": 81, "y": 63, "flags": 1},
{"matrix": [3, 3], "x": 61, "y": 63, "flags": 1},
{"matrix": [3, 2], "x": 40, "y": 63, "flags": 1},
{"matrix": [3, 1], "x": 20, "y": 63, "flags": 1},
{"matrix": [3, 0], "x": 0, "y": 63, "flags": 1},
{"matrix": [2, 0], "x": 0, "y": 42, "flags": 1},
{"matrix": [2, 1], "x": 20, "y": 42, "flags": 4},
{"matrix": [2, 2], "x": 40, "y": 42, "flags": 4},
{"matrix": [2, 3], "x": 61, "y": 42, "flags": 4},
{"matrix": [2, 4], "x": 81, "y": 42, "flags": 4},
{"matrix": [2, 5], "x": 101, "y": 42, "flags": 4},
{"matrix": [2, 6], "x": 122, "y": 42, "flags": 4},
{"matrix": [2, 7], "x": 142, "y": 42, "flags": 4},
{"matrix": [2, 8], "x": 162, "y": 42, "flags": 4},
{"matrix": [2, 9], "x": 183, "y": 42, "flags": 4},
{"matrix": [2, 10], "x": 203, "y": 42, "flags": 4},
{"matrix": [2, 11], "x": 223, "y": 42, "flags": 1},
{"matrix": [1, 11], "x": 223, "y": 21, "flags": 1},
{"matrix": [1, 10], "x": 203, "y": 21, "flags": 4},
{"matrix": [1, 9], "x": 183, "y": 21, "flags": 4},
{"matrix": [1, 8], "x": 162, "y": 21, "flags": 4},
{"matrix": [1, 7], "x": 142, "y": 21, "flags": 4},
{"matrix": [1, 6], "x": 122, "y": 21, "flags": 4},
{"matrix": [1, 5], "x": 101, "y": 21, "flags": 4},
{"matrix": [1, 4], "x": 81, "y": 21, "flags": 4},
{"matrix": [1, 3], "x": 61, "y": 21, "flags": 4},
{"matrix": [1, 2], "x": 40, "y": 21, "flags": 4},
{"matrix": [1, 1], "x": 20, "y": 21, "flags": 4},
{"matrix": [1, 0], "x": 0, "y": 21, "flags": 1},
{"matrix": [0, 0], "x": 0, "y": 0, "flags": 1},
{"matrix": [0, 1], "x": 20, "y": 0, "flags": 4},
{"matrix": [0, 2], "x": 40, "y": 0, "flags": 4},
{"matrix": [0, 3], "x": 61, "y": 0, "flags": 4},
{"matrix": [0, 4], "x": 81, "y": 0, "flags": 4},
{"matrix": [0, 5], "x": 101, "y": 0, "flags": 4},
{"matrix": [0, 6], "x": 122, "y": 0, "flags": 4},
{"matrix": [0, 7], "x": 142, "y": 0, "flags": 4},
{"matrix": [0, 8], "x": 162, "y": 0, "flags": 4},
{"matrix": [0, 9], "x": 183, "y": 0, "flags": 4},
{"matrix": [0, 10], "x": 203, "y": 0, "flags": 4},
{"matrix": [0, 11], "x": 223, "y": 0, "flags": 1},
]
},
"matrix_pins": {
"cols": ["D3", "D5", "D4", "D6", "D7", "B4", "B5", "B6", "C6", "C7", "F7", "F6", "E6"],

View file

@ -67,25 +67,6 @@ bool oled_task_kb(void) {
#endif
#ifdef RGB_MATRIX_ENABLE
// clang-format off
led_config_t g_led_config = { {
{ 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48 },
{ 36, 35, 34, 33, 32, 31, 30, 29, 28, 27, 26, 25 },
{ 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24 },
{ 12, 11, 10, 9, 8, 7, 5, 4, 3, 2, 1, 0}
}, {
{ 223, 63 }, { 203, 63 }, { 183, 63 }, { 162, 63 }, { 142, 63 }, { 122, 63 }, { 112, 63 }, { 101, 63 }, { 81, 63 }, { 61, 63 }, { 40, 63 }, { 20, 63 }, { 0, 63 },
{ 0, 42 }, { 20, 42 }, { 40, 42 }, { 61, 42 }, { 81, 42 }, { 101, 42 }, { 122, 42 }, { 142, 42 }, { 162, 42 }, { 183, 42 }, { 203, 42 }, { 223, 42 },
{ 223, 21 }, { 203, 21 }, { 183, 21 }, { 162, 21 }, { 142, 21 }, { 122, 21 }, { 101, 21 }, { 81, 21 }, { 61, 21 }, { 40, 21 }, { 20, 21 }, { 0, 21 },
{ 0, 0 }, { 20, 0 }, { 40, 0 }, { 61, 0 }, { 81, 0 }, { 101, 0 }, { 122, 0 }, { 142, 0 }, { 162, 0 }, { 183, 0 }, { 203, 0 }, { 223, 0 }
}, {
1, 1, 1, 1, 1, 4,4,4, 1, 1, 1, 1, 1,
1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1,
1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1,
1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1
} };
// clang-format on
# ifdef VIA_ENABLE
bool via_layout_2u = false;