Migrate g_led_config to DD (D) (#25560)

This commit is contained in:
Jack Sangdahl 2025-09-09 02:58:45 -06:00 committed by GitHub
parent 4b1b83f42f
commit 330d195f9a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
32 changed files with 967 additions and 436 deletions

View file

@ -1,43 +0,0 @@
/* Copyright 2022 Leo Deng (@myst729)
*
* 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"
#ifdef RGB_MATRIX_ENABLE
led_config_t g_led_config = {
{
/* Key Matrix to LED Index */
{ 17, 16, 15, NO_LED, NO_LED, 7, 6, 5 },
{ 21, 17, 16, 15, 7, 6, 5, 1 },
{ 19, 18, 13, 11, 9, 4, 3, NO_LED }
},
{
/* LED Index to Physical Position */
// Switch LEDs
{224,14}, {224,24}, {224,33}, {212,57}, {192,57}, {192,38}, {172,38}, {152,38},
{152,57}, {142,57}, {132,57}, {112,57}, {92,57}, {82,57}, {72,57},
{72,38}, {52,38}, {32,38}, {32,57}, {12,57}, {0,33}, {0,24}, {0,14},
// Underglow LEDs
{0,0}, {92,0}, {132,0}, {224,0}, {222,64}, {172,64}, {72,64}, {2,64},
},
{
/* LED Index to Flag */
2, 4, 2, 4, 4, 4, 4, 4,
2, 4, 2, 4, 2, 4, 2,
4, 4, 4, 4, 4, 2, 4, 2,
2, 2, 2, 2, 2, 2, 2, 2
}
};
#endif

View file

@ -15,7 +15,40 @@
"solid_reactive_multinexus": true,
"solid_multisplash": true
},
"driver": "ws2812"
"driver": "ws2812",
"layout": [
{"x": 224, "y": 14, "flags": 2},
{"matrix": [1, 7], "x": 224, "y": 24, "flags": 4},
{"x": 224, "y": 33, "flags": 2},
{"matrix": [2, 6], "x": 212, "y": 57, "flags": 4},
{"matrix": [2, 5], "x": 192, "y": 57, "flags": 4},
{"matrix": [1, 6], "x": 192, "y": 38, "flags": 4},
{"matrix": [1, 5], "x": 172, "y": 38, "flags": 4},
{"matrix": [1, 4], "x": 152, "y": 38, "flags": 4},
{"x": 152, "y": 57, "flags": 2},
{"matrix": [2, 4], "x": 142, "y": 57, "flags": 4},
{"x": 132, "y": 57, "flags": 2},
{"matrix": [2, 3], "x": 112, "y": 57, "flags": 4},
{"x": 92, "y": 57, "flags": 2},
{"matrix": [2, 2], "x": 82, "y": 57, "flags": 4},
{"x": 72, "y": 57, "flags": 2},
{"matrix": [1, 3], "x": 72, "y": 38, "flags": 4},
{"matrix": [1, 2], "x": 52, "y": 38, "flags": 4},
{"matrix": [1, 1], "x": 32, "y": 38, "flags": 4},
{"matrix": [2, 1], "x": 32, "y": 57, "flags": 4},
{"matrix": [2, 0], "x": 12, "y": 57, "flags": 4},
{"x": 0, "y": 33, "flags": 2},
{"matrix": [1, 0], "x": 0, "y": 24, "flags": 4},
{"x": 0, "y": 14, "flags": 2},
{"x": 0, "y": 0, "flags": 2},
{"x": 92, "y": 0, "flags": 2},
{"x": 132, "y": 0, "flags": 2},
{"x": 224, "y": 0, "flags": 2},
{"x": 222, "y": 64, "flags": 2},
{"x": 172, "y": 64, "flags": 2},
{"x": 72, "y": 64, "flags": 2},
{"x": 2, "y": 64, "flags": 2}
]
},
"features": {
"backlight": true,

View file

@ -57,6 +57,38 @@
"animation": "cycle_all"
},
"driver": "ws2812",
"layout": [
{"matrix": [0, 0], "x": 4, "y": 4, "flags": 4},
{"matrix": [0, 1], "x": 28, "y": 4, "flags": 4},
{"matrix": [0, 2], "x": 52, "y": 4, "flags": 4},
{"matrix": [0, 3], "x": 76, "y": 4, "flags": 4},
{"matrix": [0, 4], "x": 100, "y": 4, "flags": 4},
{"matrix": [1, 4], "x": 100, "y": 32, "flags": 4},
{"matrix": [1, 3], "x": 76, "y": 32, "flags": 4},
{"matrix": [1, 2], "x": 52, "y": 32, "flags": 4},
{"matrix": [1, 1], "x": 28, "y": 32, "flags": 4},
{"matrix": [1, 0], "x": 4, "y": 32, "flags": 4},
{"matrix": [2, 0], "x": 4, "y": 60, "flags": 4},
{"matrix": [2, 1], "x": 28, "y": 60, "flags": 4},
{"matrix": [2, 2], "x": 52, "y": 60, "flags": 4},
{"matrix": [2, 3], "x": 76, "y": 60, "flags": 4},
{"matrix": [2, 4], "x": 100, "y": 60, "flags": 4},
{"matrix": [5, 4], "x": 124, "y": 60, "flags": 4},
{"matrix": [5, 3], "x": 148, "y": 60, "flags": 4},
{"matrix": [5, 2], "x": 172, "y": 60, "flags": 4},
{"matrix": [5, 1], "x": 196, "y": 60, "flags": 4},
{"matrix": [5, 0], "x": 220, "y": 60, "flags": 4},
{"matrix": [4, 0], "x": 220, "y": 32, "flags": 4},
{"matrix": [4, 1], "x": 196, "y": 32, "flags": 4},
{"matrix": [4, 2], "x": 172, "y": 32, "flags": 4},
{"matrix": [4, 3], "x": 148, "y": 32, "flags": 4},
{"matrix": [4, 4], "x": 124, "y": 32, "flags": 4},
{"matrix": [3, 4], "x": 124, "y": 4, "flags": 4},
{"matrix": [3, 3], "x": 148, "y": 4, "flags": 4},
{"matrix": [3, 2], "x": 172, "y": 4, "flags": 4},
{"matrix": [3, 1], "x": 196, "y": 4, "flags": 4},
{"matrix": [3, 0], "x": 220, "y": 4, "flags": 4}
],
"max_brightness": 200
},
"matrix_pins": {

View file

@ -15,38 +15,6 @@
*/
#include "quantum.h"
#ifdef RGB_MATRIX_ENABLE
led_config_t g_led_config = {
{
/* Key Matrix to LED Index */
{ 0, 1, 2, 3, 4 },
{ 9, 8, 7, 6, 5 },
{ 10, 11, 12, 13, 14 },
{ 29, 28, 27, 26, 25 },
{ 20, 21, 22, 23, 24 },
{ 19, 18, 17, 16, 15 },
},
{
/* LED Index to Physical Position */
// Switch LEDs
{4,4}, {28,4}, {52,4}, {76,4}, {100,4},
{100,32}, {76,32}, {52,32}, {28,32}, {4,32},
{4,60}, {28,60}, {52,60}, {76,60}, {100,60},
{124,60}, {148,60}, {172,60}, {196,60}, {220,60},
{220,32}, {196,32}, {172,32}, {148,32}, {124,32},
{124,4}, {148,4}, {172,4}, {196,4}, {220,4},
// Underglow LEDs
},
{
/* LED Index to Flag */
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
void board_init(void) {
// Remap B11 AF to TIM2_CH4
AFIO->MAPR |= AFIO_MAPR_TIM2_REMAP_PARTIALREMAP2;