From 2818085d3fffb645e1835326104534ee94b03fdb Mon Sep 17 00:00:00 2001 From: Jack Sangdahl Date: Tue, 9 Sep 2025 03:08:20 -0600 Subject: [PATCH] Migrate `g_led_config` to DD (P) (#25622) --- keyboards/paprikman/albacore/albacore.c | 30 ----- keyboards/paprikman/albacore/keyboard.json | 10 ++ keyboards/percent/canoe_gen2/canoe_gen2.c | 119 ------------------ keyboards/percent/canoe_gen2/keyboard.json | 79 ++++++++++++ keyboards/phage_studio/pila87/keyboard.json | 93 ++++++++++++++ keyboards/phage_studio/pila87/pila87.c | 23 ---- .../phase_studio/titan65/hotswap/hotswap.c | 42 ------- .../titan65/hotswap/keyboard.json | 69 ++++++++++ keyboards/planck/light/keyboard.json | 51 ++++++++ keyboards/planck/light/light.c | 19 --- keyboards/planck/rev6/keyboard.json | 11 ++ keyboards/planck/rev6/rev6.c | 29 +---- keyboards/planck/rev6_drop/keyboard.json | 11 ++ keyboards/planck/rev6_drop/rev6_drop.c | 30 +---- keyboards/planck/rev7/keyboard.json | 11 ++ keyboards/planck/rev7/rev7.c | 30 +---- keyboards/preonic/rev3/keyboard.json | 13 +- keyboards/preonic/rev3/rev3.c | 29 ----- keyboards/preonic/rev3_drop/keyboard.json | 13 +- keyboards/preonic/rev3_drop/rev3_drop.c | 29 ----- 20 files changed, 362 insertions(+), 379 deletions(-) delete mode 100644 keyboards/paprikman/albacore/albacore.c delete mode 100644 keyboards/percent/canoe_gen2/canoe_gen2.c delete mode 100644 keyboards/phase_studio/titan65/hotswap/hotswap.c diff --git a/keyboards/paprikman/albacore/albacore.c b/keyboards/paprikman/albacore/albacore.c deleted file mode 100644 index b6cf742a11..0000000000 --- a/keyboards/paprikman/albacore/albacore.c +++ /dev/null @@ -1,30 +0,0 @@ -/* Copyright 2021 paprikman - * - * 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 . - */ - -#include "quantum.h" - -#ifdef RGB_MATRIX_ENABLE -led_config_t g_led_config = { { - { 0, 1, 2, 3 }, - { 7, 6, 5, 4 } -}, { - { 56, 16 }, { 112, 16 }, { 168, 16 }, { 224, 16 }, - { 56, 24 }, { 112, 24 }, { 168, 24 }, { 224, 24 } -}, { - 1, 1, 1, 1, - 1, 1, 1, 1 -} }; -#endif diff --git a/keyboards/paprikman/albacore/keyboard.json b/keyboards/paprikman/albacore/keyboard.json index 8706c67bcd..a2005221c3 100644 --- a/keyboards/paprikman/albacore/keyboard.json +++ b/keyboards/paprikman/albacore/keyboard.json @@ -10,6 +10,16 @@ }, "rgb_matrix": { "driver": "ws2812", + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0, "flags": 1}, + {"matrix": [0, 1], "x": 75, "y": 0, "flags": 1}, + {"matrix": [0, 2], "x": 150, "y": 0, "flags": 1}, + {"matrix": [0, 3], "x": 224, "y": 0, "flags": 1}, + {"matrix": [1, 3], "x": 0, "y": 64, "flags": 1}, + {"matrix": [1, 2], "x": 75, "y": 64, "flags": 1}, + {"matrix": [1, 1], "x": 150, "y": 64, "flags": 1}, + {"matrix": [1, 0], "x": 224, "y": 64, "flags": 1} + ], "max_brightness": 220, "sleep": true }, diff --git a/keyboards/percent/canoe_gen2/canoe_gen2.c b/keyboards/percent/canoe_gen2/canoe_gen2.c deleted file mode 100644 index 6cbbed412d..0000000000 --- a/keyboards/percent/canoe_gen2/canoe_gen2.c +++ /dev/null @@ -1,119 +0,0 @@ -/* -Copyright 2020 Evy Dekkers - -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 . -*/ - -#include "quantum.h" - -#ifdef RGB_MATRIX_ENABLE - -led_config_t g_led_config = { { - // Key Matrix to LED Index - // 15, 44, 46, 48, - // 74, 75, 76 - { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 14, 16 }, - { 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 13, 31 }, - { 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 30, 45, 47 }, - { 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63 }, - { 64, 65, 66, NO_LED, NO_LED, NO_LED, 67, NO_LED, NO_LED, 69, 70, NO_LED, 71, 72, 73 } -}, { - // LED Index to Physical Position - { 7, 8 }, // Esc - { 22, 8 }, // 1 - { 37, 8 }, // 2 - { 52, 8 }, // 3 - { 67, 8 }, // 4 - { 82, 8 }, // 5 - { 97, 8 }, // 6 - { 112, 8 }, // 7 - { 127, 8 }, // 8 - { 142, 8 }, // 9 - { 157, 8 }, // 0 - { 172, 8 }, // - - { 187, 8 }, // = - { 202, 8 }, // split bs - { 209, 8 }, // bs - { 217, 8 }, // split bs - { 231, 8 }, // ins - { 11, 24 }, // tab - { 30, 24 }, // q - { 45, 24 }, // w - { 60, 24 }, // e - { 75, 24 }, // r - { 90, 24 }, // t - { 104, 24 }, // y - { 119, 24 }, // u - { 134, 24 }, // i - { 149, 24 }, // o - { 164, 24 }, // p - { 179, 24 }, // [ - { 194, 24 }, // ] - { 212, 24 }, // backslash - { 231, 24 }, // del - { 11, 40 }, // caps - { 34, 40 }, // a - { 49, 40 }, // s - { 64, 40 }, // d - { 79, 40 }, // f - { 94, 40 }, // g - { 108, 40 }, // h - { 123, 40 }, // j - { 138, 40 }, // k - { 153, 40 }, // l - { 168, 40 }, // ; - { 183, 40 }, // ' - { 198, 40 }, // iso hash - { 200, 40 }, // ansi enter - { 215, 32 }, // iso enter - { 231, 40 }, // pgup - { 9, 56 }, // iso shift - { 17, 56 }, // ansi shift - { 26, 56 }, // iso nubs - { 41, 56 }, // z - { 56, 56 }, // x - { 71, 56 }, // c - { 86, 56 }, // v - { 101, 56 }, // b - { 116, 56 }, // n - { 131, 56 }, // m - { 146, 56 }, // , - { 161, 56 }, // . - { 175, 56 }, // ? - { 196, 56 }, // shift - { 217, 56 }, // up - { 231, 56 }, // pgdn - { 10, 72 }, // ctrl - { 29, 72 }, // win - { 48, 72 }, // alt - { 103, 72 }, // space - { 112, 72 }, // space - { 161, 72 }, // alt - { 176, 72 }, // fn - { 202, 72 }, // left - { 217, 72 }, // down - { 231, 72 }, // right - { 7, 40 }, // top 1 - { 119, 40 }, // top 2 - { 231, 40 } // top 3 -}, { - // LED Index to Flag - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 1, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 1, - 1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 1, - 1, 1, 1, 4, 4, 1, 1, 1, 1, 1, - 2, 2, 2 -} }; -#endif diff --git a/keyboards/percent/canoe_gen2/keyboard.json b/keyboards/percent/canoe_gen2/keyboard.json index b6a8a47a5f..45e1817ad5 100644 --- a/keyboards/percent/canoe_gen2/keyboard.json +++ b/keyboards/percent/canoe_gen2/keyboard.json @@ -61,6 +61,85 @@ "pixel_fractal": true }, "driver": "ws2812", + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 16, "flags": 1}, + {"matrix": [0, 1], "x": 15, "y": 16, "flags": 4}, + {"matrix": [0, 2], "x": 30, "y": 16, "flags": 4}, + {"matrix": [0, 3], "x": 45, "y": 16, "flags": 4}, + {"matrix": [0, 4], "x": 60, "y": 16, "flags": 4}, + {"matrix": [0, 5], "x": 75, "y": 16, "flags": 4}, + {"matrix": [0, 6], "x": 90, "y": 16, "flags": 4}, + {"matrix": [0, 7], "x": 105, "y": 16, "flags": 4}, + {"matrix": [0, 8], "x": 120, "y": 16, "flags": 4}, + {"matrix": [0, 9], "x": 135, "y": 16, "flags": 4}, + {"matrix": [0, 10], "x": 150, "y": 16, "flags": 4}, + {"matrix": [0, 11], "x": 165, "y": 16, "flags": 4}, + {"matrix": [0, 12], "x": 180, "y": 16, "flags": 4}, + {"matrix": [1, 13], "x": 195, "y": 16, "flags": 4}, + {"matrix": [0, 13], "x": 210, "y": 16, "flags": 1}, + {"x": 217, "y": 16, "flags": 1}, + {"matrix": [0, 14], "x": 224, "y": 16, "flags": 1}, + {"matrix": [1, 0], "x": 4, "y": 28, "flags": 1}, + {"matrix": [1, 1], "x": 23, "y": 28, "flags": 4}, + {"matrix": [1, 2], "x": 38, "y": 28, "flags": 4}, + {"matrix": [1, 3], "x": 53, "y": 28, "flags": 4}, + {"matrix": [1, 4], "x": 68, "y": 28, "flags": 4}, + {"matrix": [1, 5], "x": 83, "y": 28, "flags": 4}, + {"matrix": [1, 6], "x": 98, "y": 28, "flags": 4}, + {"matrix": [1, 7], "x": 113, "y": 28, "flags": 4}, + {"matrix": [1, 8], "x": 128, "y": 28, "flags": 4}, + {"matrix": [1, 9], "x": 143, "y": 28, "flags": 4}, + {"matrix": [1, 10], "x": 158, "y": 28, "flags": 4}, + {"matrix": [1, 11], "x": 173, "y": 28, "flags": 4}, + {"matrix": [1, 12], "x": 188, "y": 28, "flags": 4}, + {"matrix": [2, 12], "x": 206, "y": 28, "flags": 4}, + {"matrix": [1, 14], "x": 224, "y": 28, "flags": 1}, + {"matrix": [2, 0], "x": 6, "y": 40, "flags": 1}, + {"matrix": [2, 1], "x": 26, "y": 40, "flags": 4}, + {"matrix": [2, 2], "x": 41, "y": 40, "flags": 4}, + {"matrix": [2, 3], "x": 56, "y": 40, "flags": 4}, + {"matrix": [2, 4], "x": 71, "y": 40, "flags": 4}, + {"matrix": [2, 5], "x": 86, "y": 40, "flags": 4}, + {"matrix": [2, 6], "x": 101, "y": 40, "flags": 4}, + {"matrix": [2, 7], "x": 116, "y": 40, "flags": 4}, + {"matrix": [2, 8], "x": 131, "y": 40, "flags": 4}, + {"matrix": [2, 9], "x": 146, "y": 40, "flags": 4}, + {"matrix": [2, 10], "x": 161, "y": 40, "flags": 4}, + {"matrix": [2, 11], "x": 176, "y": 40, "flags": 4}, + {"x": 192, "y": 40, "flags": 4}, + {"matrix": [2, 13], "x": 201, "y": 40, "flags": 1}, + {"x": 209, "y": 40, "flags": 1}, + {"matrix": [2, 14], "x": 224, "y": 40, "flags": 1}, + {"x": 5, "y": 52, "flags": 1}, + {"matrix": [3, 0], "x": 9, "y": 52, "flags": 1}, + {"matrix": [3, 1], "x": 15, "y": 52, "flags": 4}, + {"matrix": [3, 2], "x": 34, "y": 52, "flags": 4}, + {"matrix": [3, 3], "x": 49, "y": 52, "flags": 4}, + {"matrix": [3, 4], "x": 64, "y": 52, "flags": 4}, + {"matrix": [3, 5], "x": 79, "y": 52, "flags": 4}, + {"matrix": [3, 6], "x": 94, "y": 52, "flags": 4}, + {"matrix": [3, 7], "x": 109, "y": 52, "flags": 4}, + {"matrix": [3, 8], "x": 124, "y": 52, "flags": 4}, + {"matrix": [3, 9], "x": 139, "y": 52, "flags": 4}, + {"matrix": [3, 10], "x": 154, "y": 52, "flags": 4}, + {"matrix": [3, 11], "x": 169, "y": 52, "flags": 4}, + {"matrix": [3, 12], "x": 189, "y": 52, "flags": 1}, + {"matrix": [3, 13], "x": 210, "y": 52, "flags": 1}, + {"matrix": [3, 14], "x": 224, "y": 52, "flags": 1}, + {"matrix": [4, 0], "x": 2, "y": 64, "flags": 1}, + {"matrix": [4, 1], "x": 21, "y": 64, "flags": 1}, + {"matrix": [4, 2], "x": 39, "y": 64, "flags": 1}, + {"matrix": [4, 6], "x": 96, "y": 64, "flags": 4}, + {"x": 112, "y": 64, "flags": 4}, + {"matrix": [4, 9], "x": 133, "y": 64, "flags": 1}, + {"matrix": [4, 10], "x": 152, "y": 64, "flags": 1}, + {"matrix": [4, 12], "x": 195, "y": 64, "flags": 1}, + {"matrix": [4, 13], "x": 210, "y": 64, "flags": 1}, + {"matrix": [4, 14], "x": 224, "y": 64, "flags": 1}, + {"x": 220, "y": 0, "flags": 2}, + {"x": 222, "y": 0, "flags": 2}, + {"x": 224, "y": 0, "flags": 2} + ], "max_brightness": 150, "sleep": true }, diff --git a/keyboards/phage_studio/pila87/keyboard.json b/keyboards/phage_studio/pila87/keyboard.json index fbdf5f637a..135a4f0a81 100644 --- a/keyboards/phage_studio/pila87/keyboard.json +++ b/keyboards/phage_studio/pila87/keyboard.json @@ -62,6 +62,99 @@ "solid_multisplash": true }, "driver": "ws2812", + "layout": [ + {"matrix": [5, 16], "x": 224, "y": 64, "flags": 4}, + {"matrix": [5, 15], "x": 211, "y": 64, "flags": 4}, + {"matrix": [5, 14], "x": 198, "y": 64, "flags": 4}, + {"matrix": [5, 13], "x": 180, "y": 64, "flags": 1}, + {"matrix": [5, 12], "x": 164, "y": 64, "flags": 1}, + {"matrix": [5, 11], "x": 148, "y": 64, "flags": 1}, + {"matrix": [5, 10], "x": 131, "y": 64, "flags": 1}, + {"matrix": [5, 7], "x": 110, "y": 61, "flags": 4}, + {"matrix": [5, 6], "x": 104, "y": 61, "flags": 4}, + {"matrix": [5, 5], "x": 83, "y": 64, "flags": 4}, + {"matrix": [5, 4], "x": 65, "y": 61, "flags": 4}, + {"matrix": [5, 3], "x": 58, "y": 61, "flags": 4}, + {"matrix": [5, 2], "x": 34, "y": 64, "flags": 1}, + {"matrix": [5, 1], "x": 18, "y": 64, "flags": 1}, + {"matrix": [5, 0], "x": 2, "y": 64, "flags": 1}, + {"matrix": [4, 0], "x": 8, "y": 52, "flags": 1}, + {"matrix": [4, 1], "x": 29, "y": 52, "flags": 4}, + {"matrix": [4, 2], "x": 42, "y": 52, "flags": 4}, + {"matrix": [4, 3], "x": 55, "y": 52, "flags": 4}, + {"matrix": [4, 4], "x": 68, "y": 52, "flags": 4}, + {"matrix": [4, 5], "x": 81, "y": 52, "flags": 4}, + {"matrix": [4, 6], "x": 94, "y": 52, "flags": 4}, + {"matrix": [4, 7], "x": 107, "y": 52, "flags": 4}, + {"matrix": [4, 8], "x": 120, "y": 52, "flags": 4}, + {"matrix": [4, 9], "x": 133, "y": 52, "flags": 4}, + {"matrix": [4, 10], "x": 146, "y": 52, "flags": 4}, + {"matrix": [4, 13], "x": 170, "y": 52, "flags": 1}, + {"matrix": [4, 15], "x": 211, "y": 52, "flags": 4}, + {"matrix": [3, 13], "x": 174, "y": 41, "flags": 1}, + {"matrix": [3, 11], "x": 153, "y": 41, "flags": 4}, + {"matrix": [3, 10], "x": 140, "y": 41, "flags": 4}, + {"matrix": [3, 9], "x": 127, "y": 41, "flags": 4}, + {"matrix": [3, 8], "x": 114, "y": 41, "flags": 4}, + {"matrix": [3, 7], "x": 101, "y": 41, "flags": 4}, + {"matrix": [3, 6], "x": 88, "y": 41, "flags": 4}, + {"matrix": [3, 5], "x": 75, "y": 41, "flags": 4}, + {"matrix": [3, 4], "x": 62, "y": 41, "flags": 4}, + {"matrix": [3, 3], "x": 49, "y": 41, "flags": 4}, + {"matrix": [3, 2], "x": 36, "y": 41, "flags": 4}, + {"matrix": [3, 1], "x": 23, "y": 41, "flags": 4}, + {"matrix": [3, 0], "x": 5, "y": 41, "flags": 8}, + {"matrix": [2, 0], "x": 3, "y": 29, "flags": 1}, + {"matrix": [2, 1], "x": 19, "y": 29, "flags": 4}, + {"matrix": [2, 2], "x": 32, "y": 29, "flags": 4}, + {"matrix": [2, 3], "x": 45, "y": 29, "flags": 4}, + {"matrix": [2, 4], "x": 58, "y": 29, "flags": 4}, + {"matrix": [2, 5], "x": 71, "y": 29, "flags": 4}, + {"matrix": [2, 6], "x": 84, "y": 29, "flags": 4}, + {"matrix": [2, 7], "x": 97, "y": 29, "flags": 4}, + {"matrix": [2, 8], "x": 110, "y": 29, "flags": 4}, + {"matrix": [2, 9], "x": 123, "y": 29, "flags": 4}, + {"matrix": [2, 10], "x": 136, "y": 29, "flags": 4}, + {"matrix": [2, 11], "x": 149, "y": 29, "flags": 4}, + {"matrix": [2, 12], "x": 162, "y": 29, "flags": 4}, + {"matrix": [2, 13], "x": 179, "y": 29, "flags": 4}, + {"matrix": [2, 14], "x": 198, "y": 29, "flags": 4}, + {"matrix": [2, 15], "x": 211, "y": 29, "flags": 4}, + {"matrix": [2, 16], "x": 224, "y": 29, "flags": 4}, + {"matrix": [1, 16], "x": 224, "y": 17, "flags": 4}, + {"matrix": [1, 15], "x": 211, "y": 17, "flags": 4}, + {"matrix": [1, 14], "x": 198, "y": 17, "flags": 4}, + {"matrix": [1, 13], "x": 175, "y": 17, "flags": 1}, + {"matrix": [1, 12], "x": 156, "y": 17, "flags": 4}, + {"matrix": [1, 11], "x": 143, "y": 17, "flags": 4}, + {"matrix": [1, 10], "x": 130, "y": 17, "flags": 4}, + {"matrix": [1, 9], "x": 117, "y": 17, "flags": 4}, + {"matrix": [1, 8], "x": 104, "y": 17, "flags": 4}, + {"matrix": [1, 7], "x": 91, "y": 17, "flags": 4}, + {"matrix": [1, 6], "x": 78, "y": 17, "flags": 4}, + {"matrix": [1, 5], "x": 65, "y": 17, "flags": 4}, + {"matrix": [1, 4], "x": 52, "y": 17, "flags": 4}, + {"matrix": [1, 3], "x": 39, "y": 17, "flags": 4}, + {"matrix": [1, 2], "x": 26, "y": 17, "flags": 4}, + {"matrix": [1, 1], "x": 13, "y": 17, "flags": 4}, + {"matrix": [1, 0], "x": 0, "y": 17, "flags": 4}, + {"matrix": [0, 0], "x": 0, "y": 0, "flags": 1}, + {"matrix": [0, 2], "x": 26, "y": 0, "flags": 4}, + {"matrix": [0, 3], "x": 39, "y": 0, "flags": 4}, + {"matrix": [0, 4], "x": 52, "y": 0, "flags": 4}, + {"matrix": [0, 5], "x": 65, "y": 0, "flags": 4}, + {"matrix": [0, 6], "x": 84, "y": 0, "flags": 4}, + {"matrix": [0, 7], "x": 97, "y": 0, "flags": 4}, + {"matrix": [0, 8], "x": 110, "y": 0, "flags": 4}, + {"matrix": [0, 9], "x": 123, "y": 0, "flags": 4}, + {"matrix": [0, 10], "x": 143, "y": 0, "flags": 4}, + {"matrix": [0, 11], "x": 156, "y": 0, "flags": 4}, + {"matrix": [0, 12], "x": 169, "y": 0, "flags": 4}, + {"matrix": [0, 13], "x": 182, "y": 0, "flags": 4}, + {"matrix": [0, 14], "x": 198, "y": 0, "flags": 4}, + {"matrix": [0, 15], "x": 211, "y": 0, "flags": 8}, + {"matrix": [0, 16], "x": 224, "y": 0, "flags": 4} + ], "max_brightness": 200 }, "processor": "STM32F103", diff --git a/keyboards/phage_studio/pila87/pila87.c b/keyboards/phage_studio/pila87/pila87.c index 619623cc09..927f349cf3 100644 --- a/keyboards/phage_studio/pila87/pila87.c +++ b/keyboards/phage_studio/pila87/pila87.c @@ -23,29 +23,6 @@ #include #include -led_config_t g_led_config = { { - { 75, NO_LED, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90 }, - { 74, 73, 72, 71, 70, 69, 68, 67, 66, 65, 64, 63, 62, 61, 60, 59, 58 }, - { 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57 }, - { 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 29, NO_LED, 28, NO_LED, NO_LED, NO_LED }, - { 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, NO_LED, NO_LED, 26, NO_LED, 27, NO_LED }, - { 14, 13, 12, 11, 10, 9, 8, 7, NO_LED, NO_LED, 6, 5, 4, 3, 2, 1, 0 } -}, { - {224, 64}, {211, 64}, {198, 64}, {180, 64}, {164, 64}, {148, 64}, {131, 64}, {110, 61}, {104, 61}, {83 , 64}, {65 , 61}, {58 , 61}, {34 , 64}, {18 , 64}, {2 , 64}, - {8 , 52}, {29 , 52}, {42 , 52}, {55 , 52}, {68 , 52}, {81 , 52}, {94 , 52}, {107, 52}, {120, 52}, {133, 52}, {146, 52}, {170, 52}, {211, 52}, - {174, 41}, {153, 41}, {140, 41}, {127, 41}, {114, 41}, {101, 41}, {88 , 41}, {75 , 41}, {62 , 41}, {49 , 41}, {36 , 41}, {23 , 41}, {5 , 41}, - {3 , 29}, {19 , 29}, {32 , 29}, {45 , 29}, {58 , 29}, {71 , 29}, {84 , 29}, {97 , 29}, {110, 29}, {123, 29}, {136, 29}, {149, 29}, {162, 29}, {179, 29}, {198, 29}, {211, 29}, {224, 29}, - {224, 17}, {211, 17}, {198, 17}, {175, 17}, {156, 17}, {143, 17}, {130, 17}, {117, 17}, {104, 17}, {91 , 17}, {78 , 17}, {65 , 17}, {52 , 17}, {39 , 17}, {26 , 17}, {13 , 17}, {0 , 17}, - {0 , 0}, {26 , 0}, {39 , 0}, {52 , 0}, {65 , 0}, {84 , 0}, {97 , 0}, {110, 0}, {123, 0}, {143, 0}, {156, 0}, {169, 0}, {182, 0}, {198, 0}, {211, 0}, {224, 0}, -}, { - 4, 4, 4, 1, 1, 1, 1, 4, 4, 4, 4, 4, 1, 1, 1, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 4, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 8, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 8, 4, -} }; - bool process_record_kb(uint16_t keycode, keyrecord_t *record) { switch (keycode) { case QK_RGB_MATRIX_TOGGLE: diff --git a/keyboards/phase_studio/titan65/hotswap/hotswap.c b/keyboards/phase_studio/titan65/hotswap/hotswap.c deleted file mode 100644 index 1bcd581785..0000000000 --- a/keyboards/phase_studio/titan65/hotswap/hotswap.c +++ /dev/null @@ -1,42 +0,0 @@ -/* Copyright 2021 Christopher Courtney, aka Drashna Jael're (@drashna) - * - * 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 . - */ - -#include "quantum.h" - -#ifdef RGB_MATRIX_ENABLE -led_config_t g_led_config = { - { - { 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, NO_LED, 65, 66 }, - { 51, NO_LED, 50, 49, 48, 47, 46, 45, 44, 43, 42, 41, 40, 39, 38, 37 }, - { 23, NO_LED, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, NO_LED, 36 }, - { NO_LED, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, NO_LED, 11, 10, 9 }, - { 0, 1, NO_LED, 2, NO_LED, NO_LED, 3, NO_LED, NO_LED, NO_LED, 4, 5, NO_LED, 6, 7, 8 } - }, { - { 2, 64 }, { 21, 64 }, { 39, 64 }, { 96, 64 }, { 150, 64 }, { 165, 64 }, { 195, 64 }, { 210, 64 }, { 224, 64 }, - { 224, 48 }, { 210, 48 }, { 189, 48 }, { 154, 48 }, { 139, 48 }, { 124, 48 }, { 109, 48 }, { 94, 48 }, { 79, 48 }, { 64, 48 }, { 49, 48 }, { 34, 48 }, { 22, 48 }, { 5, 48 }, - { 6, 32 }, { 41, 32 }, { 56, 32 }, { 71, 32 }, { 86, 32 }, { 101, 32 }, { 116, 32 }, { 131, 32 }, { 146, 32 }, { 161, 32 }, { 176, 32 }, { 181, 32 }, { 201, 32 }, { 224, 32 }, - { 224, 16 }, { 206, 16 },{ 188, 16 }, { 173, 16 }, { 158, 16 }, { 143, 16 }, { 128, 16 }, { 113, 16 }, { 98, 16 }, { 83, 16 }, { 68, 16 }, { 53, 16 }, { 38, 16 }, { 22, 16 }, { 4, 16 }, - { 0, 0 }, { 15, 0 }, { 30, 0 }, { 45, 0 }, { 60, 0 }, { 75, 0 }, { 90, 0 }, { 105, 0 }, { 120, 0 }, { 135, 0 }, { 150, 0 }, { 165, 0 }, { 180, 0 }, { 203, 0 }, { 224, 0 } - }, { - 1, 1, 1, 4, 1, 1, 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, 4, 1, 1, - 1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1 - } -}; - -#endif diff --git a/keyboards/phase_studio/titan65/hotswap/keyboard.json b/keyboards/phase_studio/titan65/hotswap/keyboard.json index c9d1b0f726..599684322a 100644 --- a/keyboards/phase_studio/titan65/hotswap/keyboard.json +++ b/keyboards/phase_studio/titan65/hotswap/keyboard.json @@ -19,6 +19,75 @@ }, "rgb_matrix": { "driver": "ws2812", + "layout": [ + {"matrix": [4, 0], "x": 2, "y": 64, "flags": 1}, + {"matrix": [4, 1], "x": 21, "y": 64, "flags": 1}, + {"matrix": [4, 3], "x": 39, "y": 64, "flags": 1}, + {"matrix": [4, 6], "x": 96, "y": 64, "flags": 4}, + {"matrix": [4, 10], "x": 150, "y": 64, "flags": 1}, + {"matrix": [4, 11], "x": 165, "y": 64, "flags": 1}, + {"matrix": [4, 13], "x": 195, "y": 64, "flags": 1}, + {"matrix": [4, 14], "x": 210, "y": 64, "flags": 1}, + {"matrix": [4, 15], "x": 224, "y": 64, "flags": 1}, + {"matrix": [3, 15], "x": 224, "y": 48, "flags": 1}, + {"matrix": [3, 14], "x": 210, "y": 48, "flags": 1}, + {"matrix": [3, 13], "x": 189, "y": 48, "flags": 1}, + {"matrix": [3, 11], "x": 154, "y": 48, "flags": 4}, + {"matrix": [3, 10], "x": 139, "y": 48, "flags": 4}, + {"matrix": [3, 9], "x": 124, "y": 48, "flags": 4}, + {"matrix": [3, 8], "x": 109, "y": 48, "flags": 4}, + {"matrix": [3, 7], "x": 94, "y": 48, "flags": 4}, + {"matrix": [3, 6], "x": 79, "y": 48, "flags": 4}, + {"matrix": [3, 5], "x": 64, "y": 48, "flags": 4}, + {"matrix": [3, 4], "x": 49, "y": 48, "flags": 4}, + {"matrix": [3, 3], "x": 34, "y": 48, "flags": 4}, + {"matrix": [3, 2], "x": 22, "y": 48, "flags": 4}, + {"matrix": [3, 1], "x": 5, "y": 48, "flags": 1}, + {"matrix": [2, 0], "x": 6, "y": 32, "flags": 1}, + {"matrix": [2, 2], "x": 41, "y": 32, "flags": 4}, + {"matrix": [2, 3], "x": 56, "y": 32, "flags": 4}, + {"matrix": [2, 4], "x": 71, "y": 32, "flags": 4}, + {"matrix": [2, 5], "x": 86, "y": 32, "flags": 4}, + {"matrix": [2, 6], "x": 101, "y": 32, "flags": 4}, + {"matrix": [2, 7], "x": 116, "y": 32, "flags": 4}, + {"matrix": [2, 8], "x": 131, "y": 32, "flags": 4}, + {"matrix": [2, 9], "x": 146, "y": 32, "flags": 4}, + {"matrix": [2, 10], "x": 161, "y": 32, "flags": 4}, + {"matrix": [2, 11], "x": 176, "y": 32, "flags": 4}, + {"matrix": [2, 12], "x": 181, "y": 32, "flags": 4}, + {"matrix": [2, 13], "x": 201, "y": 32, "flags": 1}, + {"matrix": [2, 15], "x": 224, "y": 32, "flags": 1}, + {"matrix": [1, 15], "x": 224, "y": 16, "flags": 1}, + {"matrix": [1, 14], "x": 206, "y": 16, "flags": 1}, + {"matrix": [1, 13], "x": 188, "y": 16, "flags": 4}, + {"matrix": [1, 12], "x": 173, "y": 16, "flags": 4}, + {"matrix": [1, 11], "x": 158, "y": 16, "flags": 4}, + {"matrix": [1, 10], "x": 143, "y": 16, "flags": 4}, + {"matrix": [1, 9], "x": 128, "y": 16, "flags": 4}, + {"matrix": [1, 8], "x": 113, "y": 16, "flags": 4}, + {"matrix": [1, 7], "x": 98, "y": 16, "flags": 4}, + {"matrix": [1, 6], "x": 83, "y": 16, "flags": 4}, + {"matrix": [1, 5], "x": 68, "y": 16, "flags": 4}, + {"matrix": [1, 4], "x": 53, "y": 16, "flags": 4}, + {"matrix": [1, 3], "x": 38, "y": 16, "flags": 4}, + {"matrix": [1, 2], "x": 22, "y": 16, "flags": 1}, + {"matrix": [1, 0], "x": 4, "y": 16, "flags": 1}, + {"matrix": [0, 0], "x": 0, "y": 0, "flags": 1}, + {"matrix": [0, 1], "x": 15, "y": 0, "flags": 4}, + {"matrix": [0, 2], "x": 30, "y": 0, "flags": 4}, + {"matrix": [0, 3], "x": 45, "y": 0, "flags": 4}, + {"matrix": [0, 4], "x": 60, "y": 0, "flags": 4}, + {"matrix": [0, 5], "x": 75, "y": 0, "flags": 4}, + {"matrix": [0, 6], "x": 90, "y": 0, "flags": 4}, + {"matrix": [0, 7], "x": 105, "y": 0, "flags": 4}, + {"matrix": [0, 8], "x": 120, "y": 0, "flags": 4}, + {"matrix": [0, 9], "x": 135, "y": 0, "flags": 4}, + {"matrix": [0, 10], "x": 150, "y": 0, "flags": 4}, + {"matrix": [0, 11], "x": 165, "y": 0, "flags": 4}, + {"matrix": [0, 12], "x": 180, "y": 0, "flags": 4}, + {"matrix": [0, 14], "x": 203, "y": 0, "flags": 1}, + {"matrix": [0, 15], "x": 224, "y": 0, "flags": 1} + ], "max_brightness": 150, "sleep": true }, diff --git a/keyboards/planck/light/keyboard.json b/keyboards/planck/light/keyboard.json index 413c753f92..f445cca931 100644 --- a/keyboards/planck/light/keyboard.json +++ b/keyboards/planck/light/keyboard.json @@ -55,6 +55,57 @@ "solid_multisplash": true }, "driver": "is31fl3731", + "layout": [ + {"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": [1, 0], "x": 0, "y": 21, "flags": 1}, + {"matrix": [1, 1], "x": 20, "y": 21, "flags": 4}, + {"matrix": [1, 2], "x": 40, "y": 21, "flags": 4}, + {"matrix": [1, 3], "x": 61, "y": 21, "flags": 4}, + {"matrix": [1, 4], "x": 81, "y": 21, "flags": 4}, + {"matrix": [1, 5], "x": 101, "y": 21, "flags": 4}, + {"matrix": [1, 6], "x": 122, "y": 21, "flags": 4}, + {"matrix": [1, 7], "x": 142, "y": 21, "flags": 4}, + {"matrix": [1, 8], "x": 162, "y": 21, "flags": 4}, + {"matrix": [1, 9], "x": 183, "y": 21, "flags": 4}, + {"matrix": [1, 10], "x": 203, "y": 21, "flags": 4}, + {"matrix": [1, 11], "x": 223, "y": 21, "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": [3, 0], "x": 0, "y": 63, "flags": 1}, + {"matrix": [3, 1], "x": 20, "y": 63, "flags": 1}, + {"matrix": [3, 2], "x": 40, "y": 63, "flags": 1}, + {"matrix": [3, 3], "x": 61, "y": 63, "flags": 1}, + {"matrix": [3, 4], "x": 81, "y": 63, "flags": 1}, + {"matrix": [3, 5], "x": 101, "y": 63, "flags": 4}, + {"x": 111, "y": 63, "flags": 4}, + {"matrix": [3, 6], "x": 122, "y": 63, "flags": 4}, + {"matrix": [3, 7], "x": 142, "y": 63, "flags": 1}, + {"matrix": [3, 8], "x": 162, "y": 63, "flags": 1}, + {"matrix": [3, 9], "x": 183, "y": 63, "flags": 1}, + {"matrix": [3, 10], "x": 203, "y": 63, "flags": 1}, + {"matrix": [3, 11], "x": 223, "y": 63, "flags": 1} + ], "sleep": true }, "features": { diff --git a/keyboards/planck/light/light.c b/keyboards/planck/light/light.c index 43487e2e21..97ea06c467 100644 --- a/keyboards/planck/light/light.c +++ b/keyboards/planck/light/light.c @@ -77,25 +77,6 @@ const is31fl3731_led_t PROGMEM g_is31fl3731_leds[IS31FL3731_LED_COUNT] = { {1, C9_14, C8_14, C7_14} }; -led_config_t g_led_config = { { - { 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, 43, 44, 45, 46, 47, 48 } -}, { - { 0, 0 }, { 20, 0 }, { 40, 0 }, { 61, 0 }, { 81, 0 }, { 101, 0 }, { 122, 0 }, { 142, 0 }, { 162, 0 }, { 183, 0 }, { 203, 0 }, { 223, 0 }, - { 0, 21 }, { 20, 21 }, { 40, 21 }, { 61, 21 }, { 81, 21 }, { 101, 21 }, { 122, 21 }, { 142, 21 }, { 162, 21 }, { 183, 21 }, { 203, 21 }, { 223, 21 }, - { 0, 42 }, { 20, 42 }, { 40, 42 }, { 61, 42 }, { 81, 42 }, { 101, 42 }, { 122, 42 }, { 142, 42 }, { 162, 42 }, { 183, 42 }, { 203, 42 }, { 223, 42 }, - { 0, 63 }, { 20, 63 }, { 40, 63 }, { 61, 63 }, { 81, 63 }, { 101, 63 }, { 111, 63 }, { 122, 63 }, { 142, 63 }, { 162, 63 }, { 183, 63 }, { 203, 63 }, - { 223, 63 } -}, { - 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, - 1, 1, 1, 1, 1, 4, 4, 4, 1, 1, 1, 1, - 1 -} }; - void matrix_init_kb(void) { // Turn status LED on diff --git a/keyboards/planck/rev6/keyboard.json b/keyboards/planck/rev6/keyboard.json index b0028795fe..aee39c8b3a 100644 --- a/keyboards/planck/rev6/keyboard.json +++ b/keyboards/planck/rev6/keyboard.json @@ -17,6 +17,17 @@ }, "rgb_matrix": { "driver": "ws2812", + "layout": [ + {"matrix": [2, 5], "x": 112, "y": 39, "flags": 255}, + {"matrix": [7, 1], "x": 148, "y": 60, "flags": 255}, + {"matrix": [3, 4], "x": 206, "y": 53, "flags": 255}, + {"matrix": [4, 4], "x": 206, "y": 3, "flags": 255}, + {"matrix": [4, 1], "x": 150, "y": 3, "flags": 255}, + {"matrix": [0, 4], "x": 74, "y": 3, "flags": 255}, + {"matrix": [0, 1], "x": 18, "y": 3, "flags": 255}, + {"matrix": [3, 1], "x": 18, "y": 54, "flags": 255}, + {"matrix": [7, 4], "x": 77, "y": 60, "flags": 255} + ], "sleep": true }, "features": { diff --git a/keyboards/planck/rev6/rev6.c b/keyboards/planck/rev6/rev6.c index 49f7d83123..e8439b1705 100644 --- a/keyboards/planck/rev6/rev6.c +++ b/keyboards/planck/rev6/rev6.c @@ -15,33 +15,6 @@ */ #include "quantum.h" -#ifdef RGB_MATRIX_ENABLE -led_config_t g_led_config = { { - // Key Matrix to LED Index - { NO_LED, 6, NO_LED, NO_LED, 5, 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, 7, NO_LED, NO_LED, 2, NO_LED }, - { NO_LED, 4, NO_LED, NO_LED, 3, 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, 8, NO_LED }, -}, { - // LED Index to Physical Position - {112, 39}, {148, 60}, {206, 53}, {206, 3}, {150, 3}, {74, 3}, {18, 3}, {18, 54}, {77, 60} -}, { - // LED Index to Flag - LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, - LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL -} }; - -// LED physical location index -// 6 5 4 3 -// 0 -// 7 8 1 2 - -#endif - #ifdef SWAP_HANDS_ENABLE __attribute__ ((weak)) const keypos_t PROGMEM hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { @@ -49,7 +22,7 @@ const keypos_t PROGMEM hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { {{5, 5}, {4, 5}, {3, 5}, {2, 5}, {1, 5}, {0, 5}}, {{5, 6}, {4, 6}, {3, 6}, {2, 6}, {1, 6}, {0, 6}}, {{5, 3}, {4, 3}, {3, 3}, {2, 3}, {1, 3}, {0, 3}}, - + {{5, 0}, {4, 0}, {3, 0}, {2, 0}, {1, 0}, {0, 0}}, {{5, 1}, {4, 1}, {3, 1}, {2, 1}, {1, 1}, {0, 1}}, {{5, 2}, {4, 2}, {3, 2}, {2, 2}, {1, 2}, {0, 2}}, diff --git a/keyboards/planck/rev6_drop/keyboard.json b/keyboards/planck/rev6_drop/keyboard.json index ff301f8c86..4f089f83f3 100644 --- a/keyboards/planck/rev6_drop/keyboard.json +++ b/keyboards/planck/rev6_drop/keyboard.json @@ -29,6 +29,17 @@ }, "rgb_matrix": { "driver": "ws2812", + "layout": [ + {"matrix": [2, 5], "x": 112, "y": 39, "flags": 255}, + {"matrix": [7, 1], "x": 148, "y": 60, "flags": 255}, + {"matrix": [3, 4], "x": 206, "y": 53, "flags": 255}, + {"matrix": [4, 4], "x": 206, "y": 3, "flags": 255}, + {"matrix": [4, 1], "x": 150, "y": 3, "flags": 255}, + {"matrix": [0, 4], "x": 74, "y": 3, "flags": 255}, + {"matrix": [0, 1], "x": 18, "y": 3, "flags": 255}, + {"matrix": [3, 1], "x": 18, "y": 54, "flags": 255}, + {"matrix": [7, 4], "x": 77, "y": 60, "flags": 255} + ], "sleep": true }, "matrix_pins": { diff --git a/keyboards/planck/rev6_drop/rev6_drop.c b/keyboards/planck/rev6_drop/rev6_drop.c index 8f613851dc..e8439b1705 100644 --- a/keyboards/planck/rev6_drop/rev6_drop.c +++ b/keyboards/planck/rev6_drop/rev6_drop.c @@ -15,34 +15,6 @@ */ #include "quantum.h" -#ifdef RGB_MATRIX_ENABLE -// clang-format off -led_config_t g_led_config = { { - // Key Matrix to LED Index - { NO_LED, 6, NO_LED, NO_LED, 5, 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, 7, NO_LED, NO_LED, 2, NO_LED }, - { NO_LED, 4, NO_LED, NO_LED, 3, 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, 8, NO_LED }, -}, { - // LED Index to Physical Position - {112, 39}, {148, 60}, {206, 53}, {206, 3}, {150, 3}, {74, 3}, {18, 3}, {18, 54}, {77, 60} -}, { - // LED Index to Flag - LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, - LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL -} }; - -// LED physical location index -// 6 5 4 3 -// 0 -// 7 8 1 2 - -#endif - #ifdef SWAP_HANDS_ENABLE __attribute__ ((weak)) const keypos_t PROGMEM hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { @@ -50,7 +22,7 @@ const keypos_t PROGMEM hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { {{5, 5}, {4, 5}, {3, 5}, {2, 5}, {1, 5}, {0, 5}}, {{5, 6}, {4, 6}, {3, 6}, {2, 6}, {1, 6}, {0, 6}}, {{5, 3}, {4, 3}, {3, 3}, {2, 3}, {1, 3}, {0, 3}}, - + {{5, 0}, {4, 0}, {3, 0}, {2, 0}, {1, 0}, {0, 0}}, {{5, 1}, {4, 1}, {3, 1}, {2, 1}, {1, 1}, {0, 1}}, {{5, 2}, {4, 2}, {3, 2}, {2, 2}, {1, 2}, {0, 2}}, diff --git a/keyboards/planck/rev7/keyboard.json b/keyboards/planck/rev7/keyboard.json index 691394d5d5..3bc274b1fa 100644 --- a/keyboards/planck/rev7/keyboard.json +++ b/keyboards/planck/rev7/keyboard.json @@ -14,6 +14,17 @@ }, "rgb_matrix": { "driver": "ws2812", + "layout": [ + {"matrix": [2, 5], "x": 112, "y": 39, "flags": 255}, + {"matrix": [7, 1], "x": 148, "y": 60, "flags": 255}, + {"matrix": [3, 4], "x": 206, "y": 53, "flags": 255}, + {"matrix": [4, 4], "x": 206, "y": 3, "flags": 255}, + {"matrix": [4, 1], "x": 150, "y": 3, "flags": 255}, + {"matrix": [0, 4], "x": 74, "y": 3, "flags": 255}, + {"matrix": [0, 1], "x": 18, "y": 3, "flags": 255}, + {"matrix": [3, 1], "x": 18, "y": 54, "flags": 255}, + {"matrix": [7, 4], "x": 77, "y": 60, "flags": 255} + ], "sleep": true }, "matrix_pins": { diff --git a/keyboards/planck/rev7/rev7.c b/keyboards/planck/rev7/rev7.c index bb9d0ee1e8..09fd5901c2 100644 --- a/keyboards/planck/rev7/rev7.c +++ b/keyboards/planck/rev7/rev7.c @@ -15,34 +15,6 @@ */ #include "quantum.h" -#ifdef RGB_MATRIX_ENABLE -// clang-format off -led_config_t g_led_config = { { - // Key Matrix to LED Index - { NO_LED, 6, NO_LED, NO_LED, 5, 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, 7, NO_LED, NO_LED, 2, NO_LED }, - { NO_LED, 4, NO_LED, NO_LED, 3, 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, 8, NO_LED }, -}, { - // LED Index to Physical Position - {112, 39}, {148, 60}, {206, 53}, {206, 3}, {150, 3}, {74, 3}, {18, 3}, {18, 54}, {77, 60} -}, { - // LED Index to Flag - LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, - LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL -} }; - -// LED physical location index -// 6 5 4 3 -// 0 -// 7 8 1 2 - -#endif - #ifdef SWAP_HANDS_ENABLE __attribute__ ((weak)) const keypos_t PROGMEM hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { @@ -50,7 +22,7 @@ const keypos_t PROGMEM hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { {{5, 5}, {4, 5}, {3, 5}, {2, 5}, {1, 5}, {0, 5}}, {{5, 6}, {4, 6}, {3, 6}, {2, 6}, {1, 6}, {0, 6}}, {{5, 3}, {4, 3}, {3, 3}, {2, 3}, {1, 3}, {0, 3}}, - + {{5, 0}, {4, 0}, {3, 0}, {2, 0}, {1, 0}, {0, 0}}, {{5, 1}, {4, 1}, {3, 1}, {2, 1}, {1, 1}, {0, 1}}, {{5, 2}, {4, 2}, {3, 2}, {2, 2}, {1, 2}, {0, 2}}, diff --git a/keyboards/preonic/rev3/keyboard.json b/keyboards/preonic/rev3/keyboard.json index 96cebf9ea0..9babc119b0 100644 --- a/keyboards/preonic/rev3/keyboard.json +++ b/keyboards/preonic/rev3/keyboard.json @@ -26,7 +26,18 @@ "driver": "pwm" }, "rgb_matrix": { - "driver": "ws2812" + "driver": "ws2812", + "layout": [ + {"matrix": [2, 5], "x": 112, "y": 39, "flags": 255}, + {"matrix": [9, 1], "x": 148, "y": 60, "flags": 255}, + {"matrix": [8, 4], "x": 206, "y": 53, "flags": 255}, + {"matrix": [4, 4], "x": 206, "y": 3, "flags": 255}, + {"matrix": [4, 1], "x": 150, "y": 3, "flags": 255}, + {"matrix": [0, 4], "x": 74, "y": 3, "flags": 255}, + {"matrix": [0, 1], "x": 18, "y": 3, "flags": 255}, + {"matrix": [8, 1], "x": 18, "y": 54, "flags": 255}, + {"matrix": [9, 4], "x": 77, "y": 60, "flags": 255} + ] }, "features": { "audio": true, diff --git a/keyboards/preonic/rev3/rev3.c b/keyboards/preonic/rev3/rev3.c index 5a751cbba5..12a11c98eb 100644 --- a/keyboards/preonic/rev3/rev3.c +++ b/keyboards/preonic/rev3/rev3.c @@ -15,35 +15,6 @@ */ #include "quantum.h" -#ifdef RGB_MATRIX_ENABLE -led_config_t g_led_config = { { - // Key Matrix to LED Index - { NO_LED, 6, NO_LED, NO_LED, 5, 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, 4, NO_LED, NO_LED, 3, 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, 7, NO_LED, NO_LED, 2, NO_LED }, - { NO_LED, 1, NO_LED, NO_LED, 8, NO_LED }, -}, { - // LED Index to Physical Position - {112, 39}, {148, 60}, {206, 53}, {206, 3}, {150, 3}, {74, 3}, {18, 3}, {18, 54}, {77, 60} -}, { - // LED Index to Flag - LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, - LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL -} }; - -// LED physical location index -// 6 5 4 3 -// 0 -// 7 8 1 2 -#endif - - #ifdef SWAP_HANDS_ENABLE __attribute__ ((weak)) const keypos_t PROGMEM hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { diff --git a/keyboards/preonic/rev3_drop/keyboard.json b/keyboards/preonic/rev3_drop/keyboard.json index 22374fa5f7..ece6bf32f9 100644 --- a/keyboards/preonic/rev3_drop/keyboard.json +++ b/keyboards/preonic/rev3_drop/keyboard.json @@ -44,7 +44,18 @@ "driver": "pwm" }, "rgb_matrix": { - "driver": "ws2812" + "driver": "ws2812", + "layout": [ + {"matrix": [2, 5], "x": 112, "y": 39, "flags": 255}, + {"matrix": [9, 1], "x": 148, "y": 60, "flags": 255}, + {"matrix": [8, 4], "x": 206, "y": 53, "flags": 255}, + {"matrix": [4, 4], "x": 206, "y": 3, "flags": 255}, + {"matrix": [4, 1], "x": 150, "y": 3, "flags": 255}, + {"matrix": [0, 4], "x": 74, "y": 3, "flags": 255}, + {"matrix": [0, 1], "x": 18, "y": 3, "flags": 255}, + {"matrix": [8, 1], "x": 18, "y": 54, "flags": 255}, + {"matrix": [9, 4], "x": 77, "y": 60, "flags": 255} + ] }, "matrix_pins": { "cols": ["B11", "B10", "B2", "B1", "A7", "B0"], diff --git a/keyboards/preonic/rev3_drop/rev3_drop.c b/keyboards/preonic/rev3_drop/rev3_drop.c index 5a751cbba5..12a11c98eb 100644 --- a/keyboards/preonic/rev3_drop/rev3_drop.c +++ b/keyboards/preonic/rev3_drop/rev3_drop.c @@ -15,35 +15,6 @@ */ #include "quantum.h" -#ifdef RGB_MATRIX_ENABLE -led_config_t g_led_config = { { - // Key Matrix to LED Index - { NO_LED, 6, NO_LED, NO_LED, 5, 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, 4, NO_LED, NO_LED, 3, 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, 7, NO_LED, NO_LED, 2, NO_LED }, - { NO_LED, 1, NO_LED, NO_LED, 8, NO_LED }, -}, { - // LED Index to Physical Position - {112, 39}, {148, 60}, {206, 53}, {206, 3}, {150, 3}, {74, 3}, {18, 3}, {18, 54}, {77, 60} -}, { - // LED Index to Flag - LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, - LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL -} }; - -// LED physical location index -// 6 5 4 3 -// 0 -// 7 8 1 2 -#endif - - #ifdef SWAP_HANDS_ENABLE __attribute__ ((weak)) const keypos_t PROGMEM hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = {