Migrate RGB Matrix config to info.json - A (#22798)

This commit is contained in:
Joel Challis 2024-01-02 03:05:08 +00:00 committed by GitHub
parent 0a6913b682
commit 60f0132bd5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
38 changed files with 458 additions and 618 deletions

View file

@ -1,21 +0,0 @@
/*
Copyright 2022 Ramon Imbao
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/>.
*/
#pragma once
/* RGB Matrix setup */
#define RGB_MATRIX_LED_COUNT 2

View file

@ -13,7 +13,8 @@
"extrakey": true,
"console": false,
"command": false,
"nkro": false
"nkro": false,
"rgb_matrix": true
},
"usb": {
"vid": "0xABA7",
@ -25,7 +26,11 @@
"driver": "vendor"
},
"rgb_matrix": {
"driver": "ws2812"
"driver": "ws2812",
"layout": [
{"matrix": [3, 0], "x": 5, "y": 40, "flags": 8},
{"matrix": [0, 15], "x": 211, "y": 0, "flags": 8}
]
},
"processor": "RP2040",
"bootloader": "rp2040",

View file

@ -16,21 +16,7 @@
#include "quantum.h"
led_config_t g_led_config = {{
// Key Matrix to LED Index
{ NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, 1, NO_LED },
{ NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED },
{ NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED },
{ 0, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED },
{ NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED },
{ NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED }
}, {
// LED Index to Physical Position
{ 5, 40 }, { 211, 0 }
}, {
// LED Index to Flag
LED_FLAG_INDICATOR, LED_FLAG_INDICATOR
}};
#ifdef RGB_MATRIX_ENABLE
bool rgb_matrix_indicators_advanced_kb(uint8_t led_min, uint8_t led_max) {
if (!rgb_matrix_indicators_advanced_user(led_min, led_max)) {
@ -45,3 +31,5 @@ bool rgb_matrix_indicators_advanced_kb(uint8_t led_min, uint8_t led_max) {
return true;
}
#endif

View file

@ -1,2 +1 @@
# RGB Matrix
RGB_MATRIX_ENABLE = yes
# This file intentionally left blank