diff options
Diffstat (limited to 'keyboards/planck')
| -rw-r--r-- | keyboards/planck/light/keyboard.json | 51 | ||||
| -rw-r--r-- | keyboards/planck/light/light.c | 19 | ||||
| -rw-r--r-- | keyboards/planck/rev6/keyboard.json | 11 | ||||
| -rw-r--r-- | keyboards/planck/rev6/rev6.c | 29 | ||||
| -rw-r--r-- | keyboards/planck/rev6_drop/keyboard.json | 11 | ||||
| -rw-r--r-- | keyboards/planck/rev6_drop/rev6_drop.c | 30 | ||||
| -rw-r--r-- | keyboards/planck/rev7/keyboard.json | 11 | ||||
| -rw-r--r-- | keyboards/planck/rev7/rev7.c | 30 |
8 files changed, 87 insertions, 105 deletions
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}}, |
