diff options
author | Joel Challis <git@zvecr.com> | 2024-02-14 00:55:39 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-14 00:55:39 +0000 |
commit | 7be40fd14373c73cae96484b536ad8498ecd1a88 (patch) | |
tree | 13c1a9f41c776bd293a99b655cc6cd56e8110db3 /keyboards/keyboardio | |
parent | 974e98ce59f7df1e1a2d8ef65d9a4e758db62b58 (diff) |
Migrate RGB Matrix config to info.json (#23000)
Diffstat (limited to 'keyboards/keyboardio')
-rw-r--r-- | keyboards/keyboardio/model01/config.h | 2 | ||||
-rw-r--r-- | keyboards/keyboardio/model01/info.json | 68 | ||||
-rw-r--r-- | keyboards/keyboardio/model01/leds.c | 31 |
3 files changed, 67 insertions, 34 deletions
diff --git a/keyboards/keyboardio/model01/config.h b/keyboards/keyboardio/model01/config.h index 1b667b4ad8..ec05a34c49 100644 --- a/keyboards/keyboardio/model01/config.h +++ b/keyboards/keyboardio/model01/config.h @@ -20,5 +20,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* key matrix size; rows are doubled for split */ #define MATRIX_ROWS 8 #define MATRIX_COLS 8 - -#define RGB_MATRIX_LED_COUNT 64 diff --git a/keyboards/keyboardio/model01/info.json b/keyboards/keyboardio/model01/info.json index 8cc2218f60..fd17535be4 100644 --- a/keyboards/keyboardio/model01/info.json +++ b/keyboards/keyboardio/model01/info.json @@ -40,7 +40,73 @@ "pixel_flow": true, "pixel_fractal": true }, - "driver": "custom" + "driver": "custom", + "layout": [ + {"matrix": [3, 7], "x": 3, "y": 35, "flags": 4}, + {"matrix": [2, 7], "x": 0, "y": 26, "flags": 4}, + {"matrix": [1, 7], "x": 0, "y": 17, "flags": 4}, + {"matrix": [0, 7], "x": 0, "y": 6, "flags": 4}, + {"matrix": [0, 6], "x": 14, "y": 5, "flags": 4}, + {"matrix": [1, 6], "x": 15, "y": 16, "flags": 4}, + {"matrix": [2, 6], "x": 16, "y": 25, "flags": 4}, + {"matrix": [3, 6], "x": 17, "y": 34, "flags": 4}, + {"matrix": [3, 5], "x": 31, "y": 29, "flags": 4}, + {"matrix": [2, 5], "x": 31, "y": 19, "flags": 4}, + {"matrix": [1, 5], "x": 30, "y": 11, "flags": 4}, + {"matrix": [0, 5], "x": 30, "y": 1, "flags": 4}, + {"matrix": [0, 4], "x": 45, "y": 0, "flags": 4}, + {"matrix": [1, 4], "x": 45, "y": 8, "flags": 4}, + {"matrix": [2, 4], "x": 46, "y": 17, "flags": 4}, + {"matrix": [3, 4], "x": 46, "y": 27, "flags": 4}, + {"matrix": [3, 3], "x": 60, "y": 27, "flags": 4}, + {"matrix": [2, 3], "x": 60, "y": 18, "flags": 4}, + {"matrix": [1, 3], "x": 60, "y": 9, "flags": 4}, + {"matrix": [0, 3], "x": 60, "y": 0, "flags": 4}, + {"matrix": [0, 2], "x": 74, "y": 2, "flags": 4}, + {"matrix": [1, 2], "x": 74, "y": 11, "flags": 4}, + {"matrix": [2, 2], "x": 75, "y": 20, "flags": 4}, + {"matrix": [3, 2], "x": 74, "y": 28, "flags": 4}, + {"matrix": [2, 1], "x": 89, "y": 30, "flags": 4}, + {"matrix": [1, 1], "x": 89, "y": 19, "flags": 4}, + {"matrix": [0, 1], "x": 89, "y": 7, "flags": 4}, + {"matrix": [0, 0], "x": 70, "y": 38, "flags": 1}, + {"matrix": [1, 0], "x": 82, "y": 41, "flags": 1}, + {"matrix": [2, 0], "x": 93, "y": 45, "flags": 1}, + {"matrix": [3, 0], "x": 104, "y": 50, "flags": 1}, + {"matrix": [3, 1], "x": 74, "y": 64, "flags": 1}, + {"matrix": [7, 6], "x": 149, "y": 64, "flags": 1}, + {"matrix": [7, 7], "x": 119, "y": 50, "flags": 1}, + {"matrix": [6, 7], "x": 130, "y": 45, "flags": 1}, + {"matrix": [5, 7], "x": 141, "y": 41, "flags": 1}, + {"matrix": [4, 7], "x": 153, "y": 38, "flags": 1}, + {"matrix": [4, 6], "x": 134, "y": 7, "flags": 4}, + {"matrix": [5, 6], "x": 134, "y": 19, "flags": 4}, + {"matrix": [6, 6], "x": 134, "y": 30, "flags": 4}, + {"matrix": [7, 5], "x": 149, "y": 28, "flags": 4}, + {"matrix": [6, 5], "x": 148, "y": 20, "flags": 4}, + {"matrix": [5, 5], "x": 149, "y": 11, "flags": 4}, + {"matrix": [4, 5], "x": 149, "y": 2, "flags": 4}, + {"matrix": [4, 4], "x": 163, "y": 0, "flags": 4}, + {"matrix": [5, 4], "x": 163, "y": 9, "flags": 4}, + {"matrix": [6, 4], "x": 163, "y": 18, "flags": 4}, + {"matrix": [7, 4], "x": 163, "y": 27, "flags": 4}, + {"matrix": [7, 3], "x": 177, "y": 27, "flags": 4}, + {"matrix": [6, 3], "x": 177, "y": 17, "flags": 4}, + {"matrix": [5, 3], "x": 178, "y": 8, "flags": 4}, + {"matrix": [4, 3], "x": 178, "y": 0, "flags": 4}, + {"matrix": [4, 2], "x": 193, "y": 1, "flags": 4}, + {"matrix": [5, 2], "x": 193, "y": 11, "flags": 4}, + {"matrix": [6, 2], "x": 192, "y": 19, "flags": 4}, + {"matrix": [7, 2], "x": 192, "y": 29, "flags": 4}, + {"matrix": [7, 1], "x": 206, "y": 34, "flags": 4}, + {"matrix": [6, 1], "x": 207, "y": 25, "flags": 4}, + {"matrix": [5, 1], "x": 208, "y": 16, "flags": 4}, + {"matrix": [4, 1], "x": 209, "y": 5, "flags": 4}, + {"matrix": [4, 0], "x": 224, "y": 6, "flags": 4}, + {"matrix": [5, 0], "x": 223, "y": 17, "flags": 4}, + {"matrix": [6, 0], "x": 223, "y": 26, "flags": 4}, + {"matrix": [7, 0], "x": 220, "y": 35, "flags": 4} + ] }, "processor": "atmega32u4", "bootloader": "caterina", diff --git a/keyboards/keyboardio/model01/leds.c b/keyboards/keyboardio/model01/leds.c index 7e65134bd4..3fb502cb27 100644 --- a/keyboards/keyboardio/model01/leds.c +++ b/keyboards/keyboardio/model01/leds.c @@ -45,37 +45,6 @@ void set_led_to(int led, uint8_t r, uint8_t g, uint8_t b) { #ifdef RGB_MATRIX_ENABLE -__attribute__ ((weak)) -led_config_t g_led_config = { { - { 27, 26, 20, 19, 12, 11, 4, 3 }, - { 28, 25, 21, 18, 13, 10, 5, 2 }, - { 29, 24, 22, 17, 14, 9, 6, 1 }, - { 30, 31, 23, 16, 15, 8, 7, 0 }, - { 60, 59, 52, 51, 44, 43, 37, 36 }, - { 61, 58, 53, 50, 45, 42, 38, 35 }, - { 62, 57, 54, 49, 46, 41, 39, 34 }, - { 63, 56, 55, 48, 47, 40, 32, 33 } -}, { - { 3, 35 }, { 0, 26 }, { 0, 17 }, { 0, 6 }, { 14, 5 }, { 15, 16 }, { 16, 25 }, { 17, 34 }, - { 31, 29 }, { 31, 19 }, { 30, 11 }, { 30, 1 }, { 45, 0 }, { 45, 8 }, { 46, 17 }, { 46, 27 }, - { 60, 27 }, { 60, 18 }, { 60, 9 }, { 60, 0 }, { 74, 2 }, { 74, 11 }, { 75, 20 }, { 74, 28 }, - { 89, 30 }, { 89, 19 }, { 89, 7 }, { 70, 38 }, { 82, 41 }, { 93, 45 }, { 104, 50 }, { 74, 64 }, - { 149, 64 }, { 119, 50 }, { 130, 45 }, { 141, 41 }, { 153, 38 }, { 134, 7 }, { 134, 19 }, { 134, 30 }, - { 149, 28 }, { 148, 20 }, { 149, 11 }, { 149, 2 }, { 163, 0 }, { 163, 9 }, { 163, 18 }, { 163, 27 }, - { 177, 27 }, { 177, 17 }, { 178, 8 }, { 178, 0 }, { 193, 1 }, { 193, 11 }, { 192, 19 }, { 192, 29 }, - { 206, 34 }, { 207, 25 }, { 208, 16 }, { 209, 5 }, { 224, 6 }, { 223, 17 }, { 223, 26 }, { 220, 35 } -}, { - 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, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 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 -} }; - - static struct { uint8_t b; uint8_t g; |