From e933e0411f442fa411d3d5ec488180fee241e2ef Mon Sep 17 00:00:00 2001 From: Ryan Date: Sat, 11 Mar 2023 05:41:58 +1100 Subject: Move matrix config to info.json, part 5 (#20003) Co-authored-by: Nick Brassel --- keyboards/work_louder/loop/config.h | 19 ------------------- keyboards/work_louder/loop/info.json | 5 +++++ keyboards/work_louder/nano/config.h | 19 ------------------- keyboards/work_louder/nano/info.json | 5 +++++ keyboards/work_louder/work_board/config.h | 19 ------------------- keyboards/work_louder/work_board/info.json | 5 +++++ 6 files changed, 15 insertions(+), 57 deletions(-) (limited to 'keyboards/work_louder') diff --git a/keyboards/work_louder/loop/config.h b/keyboards/work_louder/loop/config.h index 1e17946cef..020b95da17 100644 --- a/keyboards/work_louder/loop/config.h +++ b/keyboards/work_louder/loop/config.h @@ -17,25 +17,6 @@ along with this program. If not, see . #pragma once - -/* - * Keyboard Matrix Assignments - * - * Change this to how you wired your keyboard - * COLS: AVR pins used for columns, left to right - * ROWS: AVR pins used for rows, top to bottom - * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) - * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) - * - */ -#define MATRIX_ROW_PINS \ - { F5 } -#define MATRIX_COL_PINS { B3, B2, B1, D6, D7, B4, B5, B6, C6, C7, F7, F6 } - -/* COL2ROW, ROW2COL */ -#define DIODE_DIRECTION COL2ROW - - #define USB_MAX_POWER_CONSUMPTION 100 #define RGBLIGHT_DI_PIN E6 diff --git a/keyboards/work_louder/loop/info.json b/keyboards/work_louder/loop/info.json index df4a5c1be0..00e70ab0db 100644 --- a/keyboards/work_louder/loop/info.json +++ b/keyboards/work_louder/loop/info.json @@ -7,6 +7,11 @@ "vid": "0x574C", "pid": "0x1DF9" }, + "matrix_pins": { + "cols": ["B3", "B2", "B1", "D6", "D7", "B4", "B5", "B6", "C6", "C7", "F7", "F6"], + "rows": ["F5"] + }, + "diode_direction": "COL2ROW", "encoder": { "rotary": [ {"pin_a": "D0", "pin_b": "D1"}, diff --git a/keyboards/work_louder/nano/config.h b/keyboards/work_louder/nano/config.h index 9148cf1abf..add9608eb4 100644 --- a/keyboards/work_louder/nano/config.h +++ b/keyboards/work_louder/nano/config.h @@ -17,25 +17,6 @@ along with this program. If not, see . #pragma once - -/* - * Keyboard Matrix Assignments - * - * Change this to how you wired your keyboard - * COLS: AVR pins used for columns, left to right - * ROWS: AVR pins used for rows, top to bottom - * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) - * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) - * - */ -#define MATRIX_ROW_PINS \ - { F7 } -#define MATRIX_COL_PINS \ - { B5, B6, C6 } - -/* COL2ROW, ROW2COL */ -#define DIODE_DIRECTION COL2ROW - #define USB_MAX_POWER_CONSUMPTION 100 #define RGBLIGHT_DI_PIN C7 diff --git a/keyboards/work_louder/nano/info.json b/keyboards/work_louder/nano/info.json index 3eb050b92a..798127b4c0 100644 --- a/keyboards/work_louder/nano/info.json +++ b/keyboards/work_louder/nano/info.json @@ -8,6 +8,11 @@ "pid": "0xE6F0", "device_version": "0.0.1" }, + "matrix_pins": { + "cols": ["B5", "B6", "C6"], + "rows": ["F7"] + }, + "diode_direction": "COL2ROW", "encoder": { "rotary": [ {"pin_a": "D7", "pin_b": "B4"} diff --git a/keyboards/work_louder/work_board/config.h b/keyboards/work_louder/work_board/config.h index d9da63eb50..de4cf74bad 100644 --- a/keyboards/work_louder/work_board/config.h +++ b/keyboards/work_louder/work_board/config.h @@ -17,25 +17,6 @@ along with this program. If not, see . #pragma once - -/* - * Keyboard Matrix Assignments - * - * Change this to how you wired your keyboard - * COLS: AVR pins used for columns, left to right - * ROWS: AVR pins used for rows, top to bottom - * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) - * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) - * - */ -#define MATRIX_ROW_PINS \ - { F0, F1, F4, F5 } -#define MATRIX_COL_PINS \ - { D3, D5, D4, D6, D7, B4, B5, B6, C6, C7, F7, F6, E6 } - -/* COL2ROW, ROW2COL */ -#define DIODE_DIRECTION COL2ROW - #define USB_MAX_POWER_CONSUMPTION 100 #define RGBLIGHT_DI_PIN D2 diff --git a/keyboards/work_louder/work_board/info.json b/keyboards/work_louder/work_board/info.json index 5e934e90e0..6826f123a9 100644 --- a/keyboards/work_louder/work_board/info.json +++ b/keyboards/work_louder/work_board/info.json @@ -7,6 +7,11 @@ "vid": "0x574C", "pid": "0xDCD1" }, + "matrix_pins": { + "cols": ["D3", "D5", "D4", "D6", "D7", "B4", "B5", "B6", "C6", "C7", "F7", "F6", "E6"], + "rows": ["F0", "F1", "F4", "F5"] + }, + "diode_direction": "COL2ROW", "encoder": { "rotary": [ {"pin_a": "B0", "pin_b": "B1"} -- cgit v1.2.3 From 3c144fac5e2b634166f6b9cc0fc45029d63d3398 Mon Sep 17 00:00:00 2001 From: Ryan Date: Mon, 20 Mar 2023 08:12:05 +1100 Subject: Clean up usage of `QMK_KEYBOARD_H` (#20167) --- keyboards/work_louder/micro/matrix.c | 9 +++------ keyboards/work_louder/micro/micro.c | 2 +- keyboards/work_louder/rgb_functions.c | 1 - 3 files changed, 4 insertions(+), 8 deletions(-) (limited to 'keyboards/work_louder') diff --git a/keyboards/work_louder/micro/matrix.c b/keyboards/work_louder/micro/matrix.c index d2ae16ad9c..743c788662 100644 --- a/keyboards/work_louder/micro/matrix.c +++ b/keyboards/work_louder/micro/matrix.c @@ -4,16 +4,13 @@ /* * scan matrix */ -#include -#include -#include +#include "matrix.h" +#include +#include "atomic_util.h" #include "wait.h" -#include "print.h" #include "debug.h" #include "util.h" -#include "matrix.h" #include "debounce.h" -#include QMK_KEYBOARD_H /* matrix state(1:on, 0:off) */ extern matrix_row_t matrix[MATRIX_ROWS]; // debounced values diff --git a/keyboards/work_louder/micro/micro.c b/keyboards/work_louder/micro/micro.c index 42bc2db529..d845a62250 100644 --- a/keyboards/work_louder/micro/micro.c +++ b/keyboards/work_louder/micro/micro.c @@ -1,7 +1,7 @@ // Copyright 2022 Christopher Courtney, aka Drashna Jael're (@drashna) // SPDX-License-Identifier: GPL-2.0-or-later -#include QMK_KEYBOARD_H +#include "micro.h" #if defined(RGB_MATRIX_ENABLE) // clang-format off diff --git a/keyboards/work_louder/rgb_functions.c b/keyboards/work_louder/rgb_functions.c index d0cb93ccbc..cde435134a 100644 --- a/keyboards/work_louder/rgb_functions.c +++ b/keyboards/work_louder/rgb_functions.c @@ -14,7 +14,6 @@ * along with this program. If not, see . */ -#include QMK_KEYBOARD_H #include "rgb_functions.h" #ifdef RGBLIGHT_ENABLE -- cgit v1.2.3 From 1e07ff1fb108a305feca659b17ec03ba3e750455 Mon Sep 17 00:00:00 2001 From: Ryan Date: Fri, 24 Mar 2023 04:21:37 +1100 Subject: Fix some more missing `#pragma once`s (#20241) --- keyboards/work_louder/rgb_functions.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'keyboards/work_louder') diff --git a/keyboards/work_louder/rgb_functions.h b/keyboards/work_louder/rgb_functions.h index 8940cddefc..9ad7cdb19c 100644 --- a/keyboards/work_louder/rgb_functions.h +++ b/keyboards/work_louder/rgb_functions.h @@ -14,6 +14,8 @@ * along with this program. If not, see . */ +#pragma once + #include "quantum.h" #ifndef VIA_ENABLE -- cgit v1.2.3 From 647c2835e65995339fb9380830c53725a62f6299 Mon Sep 17 00:00:00 2001 From: Ryan Date: Thu, 30 Mar 2023 12:21:02 +1100 Subject: WS2812 driver improvements (#20262) --- keyboards/work_louder/rgb_functions.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'keyboards/work_louder') diff --git a/keyboards/work_louder/rgb_functions.c b/keyboards/work_louder/rgb_functions.c index cde435134a..a425eb763a 100644 --- a/keyboards/work_louder/rgb_functions.c +++ b/keyboards/work_louder/rgb_functions.c @@ -22,7 +22,7 @@ #define ws2812_setleds ws2812_rgb_setleds -#include "ws2812.c" +#include "ws2812_bitbang.c" void rgblight_call_driver(LED_TYPE *start_led, uint8_t num_leds) { ws2812_setleds(start_led, num_leds); -- cgit v1.2.3 From 36ab0c0aaa613fe0946e10133315b071c0d87012 Mon Sep 17 00:00:00 2001 From: jack <0x6A73@pm.me> Date: Mon, 3 Apr 2023 10:18:17 -0600 Subject: Add core/fallback encoder behaviour (#20320) --- keyboards/work_louder/work_board/work_board.c | 14 -------------- 1 file changed, 14 deletions(-) (limited to 'keyboards/work_louder') diff --git a/keyboards/work_louder/work_board/work_board.c b/keyboards/work_louder/work_board/work_board.c index 928a8abd89..157504216d 100644 --- a/keyboards/work_louder/work_board/work_board.c +++ b/keyboards/work_louder/work_board/work_board.c @@ -16,20 +16,6 @@ #include "work_board.h" -#if defined(ENCODER_ENABLE) -bool encoder_update_kb(uint8_t index, bool clockwise) { - if (!encoder_update_user(index, clockwise)) { - return false; - } - if (clockwise) { - tap_code(KC_VOLD); - } else { - tap_code(KC_VOLU); - } - return true; -} -#endif - #ifdef OLED_ENABLE # ifdef RGB_MATRIX_ENABLE # error Cannot run OLED and Per Key RGB at the same time due to pin conflicts -- cgit v1.2.3 From 364c06d939134184838579d4e73880f8c2f83419 Mon Sep 17 00:00:00 2001 From: Ryan Date: Wed, 5 Apr 2023 15:46:59 +1000 Subject: Move small macropad-ish layouts to data driven (#20341) --- keyboards/work_louder/loop/info.json | 25 ++++++++++++------------- keyboards/work_louder/loop/loop.h | 14 -------------- keyboards/work_louder/nano/info.json | 6 +++--- keyboards/work_louder/nano/nano.h | 14 -------------- 4 files changed, 15 insertions(+), 44 deletions(-) (limited to 'keyboards/work_louder') diff --git a/keyboards/work_louder/loop/info.json b/keyboards/work_louder/loop/info.json index 00e70ab0db..4c84fb0008 100644 --- a/keyboards/work_louder/loop/info.json +++ b/keyboards/work_louder/loop/info.json @@ -27,19 +27,18 @@ "layouts": { "LAYOUT": { "layout": [ - {"label": "k00", "x": 0, "y": 0}, - {"label": "k01", "x": 1, "y": 0}, - {"label": "k02", "x": 2, "y": 0}, - - {"label": "k03", "x": 3, "y": 0}, - {"label": "k04", "x": 4, "y": 0}, - {"label": "k05", "x": 5, "y": 0}, - {"label": "k06", "x": 6, "y": 0}, - {"label": "k07", "x": 7, "y": 0}, - {"label": "k08", "x": 8, "y": 0}, - {"label": "k09", "x": 9, "y": 0}, - {"label": "k0a", "x": 10, "y": 0}, - {"label": "k0b", "x": 11, "y": 0} + {"label": "k00", "matrix": [0, 0], "x": 0, "y": 0}, + {"label": "k01", "matrix": [0, 1], "x": 1, "y": 0}, + {"label": "k02", "matrix": [0, 2], "x": 2, "y": 0}, + {"label": "k03", "matrix": [0, 3], "x": 3, "y": 0}, + {"label": "k04", "matrix": [0, 4], "x": 4, "y": 0}, + {"label": "k05", "matrix": [0, 5], "x": 5, "y": 0}, + {"label": "k06", "matrix": [0, 6], "x": 6, "y": 0}, + {"label": "k07", "matrix": [0, 7], "x": 7, "y": 0}, + {"label": "k08", "matrix": [0, 8], "x": 8, "y": 0}, + {"label": "k09", "matrix": [0, 9], "x": 9, "y": 0}, + {"label": "k0a", "matrix": [0, 10], "x": 10, "y": 0}, + {"label": "k0b", "matrix": [0, 11], "x": 11, "y": 0} ] } } diff --git a/keyboards/work_louder/loop/loop.h b/keyboards/work_louder/loop/loop.h index a7376881b3..b2cb2410fc 100644 --- a/keyboards/work_louder/loop/loop.h +++ b/keyboards/work_louder/loop/loop.h @@ -18,17 +18,3 @@ #include "quantum.h" #include "rgb_functions.h" - -/* This is a shortcut to help you visually see your layout. - * - * The first section contains all of the arguments representing the physical - * layout of the board and position of the keys. - * - * The second converts the arguments into a two-dimensional array which - * represents the switch matrix. - */ -#define LAYOUT( \ - k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b \ -) { \ - { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b } \ -} diff --git a/keyboards/work_louder/nano/info.json b/keyboards/work_louder/nano/info.json index 798127b4c0..f24f612ca5 100644 --- a/keyboards/work_louder/nano/info.json +++ b/keyboards/work_louder/nano/info.json @@ -26,9 +26,9 @@ "layouts": { "LAYOUT": { "layout": [ - {"label": "k00", "x": 0, "y": 0}, - {"label": "k01", "x": 1, "y": 0}, - {"label": "k02", "x": 2, "y": 0} + {"matrix": [0, 0], "x": 0, "y": 0}, + {"matrix": [0, 1], "x": 1, "y": 0}, + {"matrix": [0, 2], "x": 2, "y": 0} ] } } diff --git a/keyboards/work_louder/nano/nano.h b/keyboards/work_louder/nano/nano.h index cc152b8ccc..04de456eca 100644 --- a/keyboards/work_louder/nano/nano.h +++ b/keyboards/work_louder/nano/nano.h @@ -18,17 +18,3 @@ #include "quantum.h" #include "rgb_functions.h" - -/* This is a shortcut to help you visually see your layout. - * - * The first section contains all of the arguments representing the physical - * layout of the board and position of the keys. - * - * The second converts the arguments into a two-dimensional array which - * represents the switch matrix. - */ -#define LAYOUT( \ - k00, k01, k02 \ -) { \ - { k00, k01, k02 } \ -} -- cgit v1.2.3 From 47966dc2a65c88ac90fcd64d12243d72f3f6753b Mon Sep 17 00:00:00 2001 From: Ryan Date: Thu, 6 Apr 2023 18:00:54 +1000 Subject: Migrate `rgblight.pin` and `RGB_DI_PIN` to `ws2812.pin` (#20303) --- keyboards/work_louder/loop/config.h | 1 - keyboards/work_louder/loop/info.json | 3 +++ keyboards/work_louder/micro/config.h | 1 - keyboards/work_louder/micro/info.json | 3 +++ keyboards/work_louder/nano/config.h | 1 - keyboards/work_louder/nano/info.json | 3 +++ keyboards/work_louder/numpad/info.json | 4 +++- keyboards/work_louder/rgb_functions.c | 4 ++-- keyboards/work_louder/work_board/config.h | 1 - keyboards/work_louder/work_board/info.json | 3 +++ 10 files changed, 17 insertions(+), 7 deletions(-) (limited to 'keyboards/work_louder') diff --git a/keyboards/work_louder/loop/config.h b/keyboards/work_louder/loop/config.h index 020b95da17..4d5bcf9dba 100644 --- a/keyboards/work_louder/loop/config.h +++ b/keyboards/work_louder/loop/config.h @@ -38,7 +38,6 @@ along with this program. If not, see . #define RGBLIGHT_DEFAULT_MODE RGBLIGHT_MODE_STATIC_LIGHT #define RGBLIGHT_DEFAULT_HUE 36 -#define RGB_DI_PIN F1 #define RGB_MATRIX_LED_COUNT 9 #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 120 #define RGB_MATRIX_DISABLE_KEYCODES diff --git a/keyboards/work_louder/loop/info.json b/keyboards/work_louder/loop/info.json index 4c84fb0008..194b3274d4 100644 --- a/keyboards/work_louder/loop/info.json +++ b/keyboards/work_louder/loop/info.json @@ -22,6 +22,9 @@ "bootmagic": { "matrix": [0, 11] }, + "ws2812": { + "pin": "F1" + }, "processor": "atmega32u4", "bootloader": "atmel-dfu", "layouts": { diff --git a/keyboards/work_louder/micro/config.h b/keyboards/work_louder/micro/config.h index bfe04592ac..f23c5a4ef1 100644 --- a/keyboards/work_louder/micro/config.h +++ b/keyboards/work_louder/micro/config.h @@ -10,7 +10,6 @@ */ #define USB_MAX_POWER_CONSUMPTION 100 -#define RGB_DI_PIN D1 #define RGB_MATRIX_LED_COUNT 12 #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 150 #define RGB_MATRIX_DISABLE_KEYCODES diff --git a/keyboards/work_louder/micro/info.json b/keyboards/work_louder/micro/info.json index 3627122102..22a4e5b261 100644 --- a/keyboards/work_louder/micro/info.json +++ b/keyboards/work_louder/micro/info.json @@ -39,6 +39,9 @@ "max_brightness": 150, "saturation_steps": 8 }, + "ws2812": { + "pin": "D1" + }, "url": "https://worklouder.cc/", "usb": { "device_version": "1.0.0", diff --git a/keyboards/work_louder/nano/config.h b/keyboards/work_louder/nano/config.h index add9608eb4..265da302e5 100644 --- a/keyboards/work_louder/nano/config.h +++ b/keyboards/work_louder/nano/config.h @@ -39,7 +39,6 @@ along with this program. If not, see . #define RGBLIGHT_DEFAULT_MODE RGBLIGHT_MODE_STATIC_LIGHT #define RGBLIGHT_DEFAULT_HUE 170 -#define RGB_DI_PIN F6 #define RGB_MATRIX_LED_COUNT 2 #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 120 #define RGB_MATRIX_DISABLE_KEYCODES diff --git a/keyboards/work_louder/nano/info.json b/keyboards/work_louder/nano/info.json index f24f612ca5..1be97c86a7 100644 --- a/keyboards/work_louder/nano/info.json +++ b/keyboards/work_louder/nano/info.json @@ -18,6 +18,9 @@ {"pin_a": "D7", "pin_b": "B4"} ] }, + "ws2812": { + "pin": "F6" + }, "bootmagic": { "matrix": [0, 2] }, diff --git a/keyboards/work_louder/numpad/info.json b/keyboards/work_louder/numpad/info.json index dbae02e573..8400e21a83 100644 --- a/keyboards/work_louder/numpad/info.json +++ b/keyboards/work_louder/numpad/info.json @@ -63,10 +63,12 @@ "hue_steps": 8, "led_count": 8, "max_brightness": 120, - "pin": "D1", "saturation_steps": 8, "sleep": true }, + "ws2812": { + "pin": "D1" + }, "layouts": { "LAYOUT_ortho_4x4": { "layout": [ diff --git a/keyboards/work_louder/rgb_functions.c b/keyboards/work_louder/rgb_functions.c index a425eb763a..138779465e 100644 --- a/keyboards/work_louder/rgb_functions.c +++ b/keyboards/work_louder/rgb_functions.c @@ -17,8 +17,8 @@ #include "rgb_functions.h" #ifdef RGBLIGHT_ENABLE -#undef RGB_DI_PIN -#define RGB_DI_PIN RGBLIGHT_DI_PIN +#undef WS2812_DI_PIN +#define WS2812_DI_PIN RGBLIGHT_DI_PIN #define ws2812_setleds ws2812_rgb_setleds diff --git a/keyboards/work_louder/work_board/config.h b/keyboards/work_louder/work_board/config.h index de4cf74bad..8f392bd050 100644 --- a/keyboards/work_louder/work_board/config.h +++ b/keyboards/work_louder/work_board/config.h @@ -38,7 +38,6 @@ along with this program. If not, see . #define RGBLIGHT_DEFAULT_MODE RGBLIGHT_MODE_STATIC_GRADIENT + 9 #define RGBLIGHT_DEFAULT_HUE 213 -#define RGB_DI_PIN D1 #define RGB_MATRIX_LED_COUNT 49 #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 120 #define RGB_MATRIX_DISABLE_KEYCODES diff --git a/keyboards/work_louder/work_board/info.json b/keyboards/work_louder/work_board/info.json index 6826f123a9..a25070dacd 100644 --- a/keyboards/work_louder/work_board/info.json +++ b/keyboards/work_louder/work_board/info.json @@ -17,6 +17,9 @@ {"pin_a": "B0", "pin_b": "B1"} ] }, + "ws2812": { + "pin": "D1" + }, "processor": "atmega32u4", "bootloader": "atmel-dfu", "layouts": { -- cgit v1.2.3 From 522048725f6b076bdad1251243c65dd2acf6595d Mon Sep 17 00:00:00 2001 From: Ryan Date: Sat, 8 Apr 2023 18:08:08 +1000 Subject: Move `RGB_MATRIX_DRIVER` to data driven (#20350) --- keyboards/work_louder/loop/info.json | 3 +++ keyboards/work_louder/loop/rules.mk | 1 - keyboards/work_louder/micro/info.json | 3 +++ keyboards/work_louder/micro/rules.mk | 2 -- keyboards/work_louder/nano/info.json | 3 +++ keyboards/work_louder/nano/rules.mk | 1 - keyboards/work_louder/work_board/info.json | 3 +++ keyboards/work_louder/work_board/rules.mk | 1 - 8 files changed, 12 insertions(+), 5 deletions(-) (limited to 'keyboards/work_louder') diff --git a/keyboards/work_louder/loop/info.json b/keyboards/work_louder/loop/info.json index 194b3274d4..64aed890de 100644 --- a/keyboards/work_louder/loop/info.json +++ b/keyboards/work_louder/loop/info.json @@ -7,6 +7,9 @@ "vid": "0x574C", "pid": "0x1DF9" }, + "rgb_matrix": { + "driver": "WS2812" + }, "matrix_pins": { "cols": ["B3", "B2", "B1", "D6", "D7", "B4", "B5", "B6", "C6", "C7", "F7", "F6"], "rows": ["F5"] diff --git a/keyboards/work_louder/loop/rules.mk b/keyboards/work_louder/loop/rules.mk index 7b2a49bbc2..b68ae20d14 100644 --- a/keyboards/work_louder/loop/rules.mk +++ b/keyboards/work_louder/loop/rules.mk @@ -14,7 +14,6 @@ ENCODER_ENABLE = yes LTO_ENABLE = yes RGB_MATRIX_ENABLE = yes -RGB_MATRIX_DRIVER = WS2812 LTO_ENABLE = yes SRC += rgb_functions.c diff --git a/keyboards/work_louder/micro/info.json b/keyboards/work_louder/micro/info.json index 22a4e5b261..f6b45226a0 100644 --- a/keyboards/work_louder/micro/info.json +++ b/keyboards/work_louder/micro/info.json @@ -42,6 +42,9 @@ "ws2812": { "pin": "D1" }, + "rgb_matrix": { + "driver": "WS2812" + }, "url": "https://worklouder.cc/", "usb": { "device_version": "1.0.0", diff --git a/keyboards/work_louder/micro/rules.mk b/keyboards/work_louder/micro/rules.mk index bf0aa91911..ae0d803c0a 100644 --- a/keyboards/work_louder/micro/rules.mk +++ b/keyboards/work_louder/micro/rules.mk @@ -1,4 +1,2 @@ -RGB_MATRIX_DRIVER = WS2812 - SRC += rgb_functions.c \ matrix.c diff --git a/keyboards/work_louder/nano/info.json b/keyboards/work_louder/nano/info.json index 1be97c86a7..70da0e4cc4 100644 --- a/keyboards/work_louder/nano/info.json +++ b/keyboards/work_louder/nano/info.json @@ -8,6 +8,9 @@ "pid": "0xE6F0", "device_version": "0.0.1" }, + "rgb_matrix": { + "driver": "WS2812" + }, "matrix_pins": { "cols": ["B5", "B6", "C6"], "rows": ["F7"] diff --git a/keyboards/work_louder/nano/rules.mk b/keyboards/work_louder/nano/rules.mk index 60c7afc95e..bcbb4bb31d 100644 --- a/keyboards/work_louder/nano/rules.mk +++ b/keyboards/work_louder/nano/rules.mk @@ -14,6 +14,5 @@ ENCODER_ENABLE = yes LTO_ENABLE = yes RGB_MATRIX_ENABLE = yes -RGB_MATRIX_DRIVER = WS2812 SRC += rgb_functions.c diff --git a/keyboards/work_louder/work_board/info.json b/keyboards/work_louder/work_board/info.json index a25070dacd..3e208110a8 100644 --- a/keyboards/work_louder/work_board/info.json +++ b/keyboards/work_louder/work_board/info.json @@ -7,6 +7,9 @@ "vid": "0x574C", "pid": "0xDCD1" }, + "rgb_matrix": { + "driver": "WS2812" + }, "matrix_pins": { "cols": ["D3", "D5", "D4", "D6", "D7", "B4", "B5", "B6", "C6", "C7", "F7", "F6", "E6"], "rows": ["F0", "F1", "F4", "F5"] diff --git a/keyboards/work_louder/work_board/rules.mk b/keyboards/work_louder/work_board/rules.mk index 714b4b5d04..9f4b9a4bc5 100644 --- a/keyboards/work_louder/work_board/rules.mk +++ b/keyboards/work_louder/work_board/rules.mk @@ -14,7 +14,6 @@ ENCODER_ENABLE = yes LTO_ENABLE = yes RGB_MATRIX_ENABLE = yes -RGB_MATRIX_DRIVER = WS2812 SRC += rgb_functions.c -- cgit v1.2.3 From a84528f85392ccab60fd7130fecb83972539367f Mon Sep 17 00:00:00 2001 From: Ryan Date: Sat, 15 Apr 2023 21:07:32 +1000 Subject: Move remaining `LAYOUT`s to data driven (#20422) --- keyboards/work_louder/work_board/info.json | 204 +++++++++++++------------- keyboards/work_louder/work_board/work_board.h | 36 ----- 2 files changed, 105 insertions(+), 135 deletions(-) (limited to 'keyboards/work_louder') diff --git a/keyboards/work_louder/work_board/info.json b/keyboards/work_louder/work_board/info.json index 3e208110a8..b79a1144a1 100644 --- a/keyboards/work_louder/work_board/info.json +++ b/keyboards/work_louder/work_board/info.json @@ -28,107 +28,113 @@ "layouts": { "LAYOUT_2u_space": { "layout": [ - { "x": 0, "y": 0 }, - { "x": 1, "y": 0 }, - { "x": 2, "y": 0 }, - { "x": 3, "y": 0 }, - { "x": 4, "y": 0 }, - { "x": 5, "y": 0 }, - { "x": 6, "y": 0 }, - { "x": 7, "y": 0 }, - { "x": 8, "y": 0 }, - { "x": 9, "y": 0 }, - { "x": 10, "y": 0 }, - { "x": 11, "y": 0 }, - { "x": 12, "y": 0 }, - { "x": 0, "y": 1 }, - { "x": 1, "y": 1 }, - { "x": 2, "y": 1 }, - { "x": 3, "y": 1 }, - { "x": 4, "y": 1 }, - { "x": 5, "y": 1 }, - { "x": 6, "y": 1 }, - { "x": 7, "y": 1 }, - { "x": 8, "y": 1 }, - { "x": 9, "y": 1 }, - { "x": 10, "y": 1 }, - { "x": 11, "y": 1 }, - { "x": 0, "y": 2 }, - { "x": 1, "y": 2 }, - { "x": 2, "y": 2 }, - { "x": 3, "y": 2 }, - { "x": 4, "y": 2 }, - { "x": 5, "y": 2 }, - { "x": 6, "y": 2 }, - { "x": 7, "y": 2 }, - { "x": 8, "y": 2 }, - { "x": 9, "y": 2 }, - { "x": 10, "y": 2 }, - { "x": 11, "y": 2 }, - { "x": 0, "y": 3 }, - { "x": 1, "y": 3 }, - { "x": 2, "y": 3 }, - { "x": 3, "y": 3 }, - { "x": 4, "y": 3 }, - { "x": 5, "y": 3, "w": 2 }, - { "x": 7, "y": 3 }, - { "x": 8, "y": 3 }, - { "x": 9, "y": 3 }, - { "x": 10, "y": 3 }, - { "x": 11, "y": 3 } + {"matrix": [0, 0], "x": 0, "y": 0}, + {"matrix": [0, 1], "x": 1, "y": 0}, + {"matrix": [0, 2], "x": 2, "y": 0}, + {"matrix": [0, 3], "x": 3, "y": 0}, + {"matrix": [0, 4], "x": 4, "y": 0}, + {"matrix": [0, 5], "x": 5, "y": 0}, + {"matrix": [0, 6], "x": 6, "y": 0}, + {"matrix": [0, 7], "x": 7, "y": 0}, + {"matrix": [0, 8], "x": 8, "y": 0}, + {"matrix": [0, 9], "x": 9, "y": 0}, + {"matrix": [0, 10], "x": 10, "y": 0}, + {"matrix": [0, 11], "x": 11, "y": 0}, + {"matrix": [0, 12], "x": 12, "y": 0}, + + {"matrix": [1, 0], "x": 0, "y": 1}, + {"matrix": [1, 1], "x": 1, "y": 1}, + {"matrix": [1, 2], "x": 2, "y": 1}, + {"matrix": [1, 3], "x": 3, "y": 1}, + {"matrix": [1, 4], "x": 4, "y": 1}, + {"matrix": [1, 5], "x": 5, "y": 1}, + {"matrix": [1, 6], "x": 6, "y": 1}, + {"matrix": [1, 7], "x": 7, "y": 1}, + {"matrix": [1, 8], "x": 8, "y": 1}, + {"matrix": [1, 9], "x": 9, "y": 1}, + {"matrix": [1, 10], "x": 10, "y": 1}, + {"matrix": [1, 11], "x": 11, "y": 1}, + + {"matrix": [2, 0], "x": 0, "y": 2}, + {"matrix": [2, 1], "x": 1, "y": 2}, + {"matrix": [2, 2], "x": 2, "y": 2}, + {"matrix": [2, 3], "x": 3, "y": 2}, + {"matrix": [2, 4], "x": 4, "y": 2}, + {"matrix": [2, 5], "x": 5, "y": 2}, + {"matrix": [2, 6], "x": 6, "y": 2}, + {"matrix": [2, 7], "x": 7, "y": 2}, + {"matrix": [2, 8], "x": 8, "y": 2}, + {"matrix": [2, 9], "x": 9, "y": 2}, + {"matrix": [2, 10], "x": 10, "y": 2}, + {"matrix": [2, 11], "x": 11, "y": 2}, + + {"matrix": [3, 0], "x": 0, "y": 3}, + {"matrix": [3, 1], "x": 1, "y": 3}, + {"matrix": [3, 2], "x": 2, "y": 3}, + {"matrix": [3, 3], "x": 3, "y": 3}, + {"matrix": [3, 4], "x": 4, "y": 3}, + {"matrix": [3, 5], "x": 5, "y": 3, "w": 2}, + {"matrix": [3, 7], "x": 7, "y": 3}, + {"matrix": [3, 8], "x": 8, "y": 3}, + {"matrix": [3, 9], "x": 9, "y": 3}, + {"matrix": [3, 10], "x": 10, "y": 3}, + {"matrix": [3, 11], "x": 11, "y": 3} ] - }, - "LAYOUT": { + }, + "LAYOUT": { "layout": [ - { "x": 0, "y": 0 }, - { "x": 1, "y": 0 }, - { "x": 2, "y": 0 }, - { "x": 3, "y": 0 }, - { "x": 4, "y": 0 }, - { "x": 5, "y": 0 }, - { "x": 6, "y": 0 }, - { "x": 7, "y": 0 }, - { "x": 8, "y": 0 }, - { "x": 9, "y": 0 }, - { "x": 10, "y": 0 }, - { "x": 11, "y": 0 }, - { "x": 12, "y": 0 }, - { "x": 0, "y": 1 }, - { "x": 1, "y": 1 }, - { "x": 2, "y": 1 }, - { "x": 3, "y": 1 }, - { "x": 4, "y": 1 }, - { "x": 5, "y": 1 }, - { "x": 6, "y": 1 }, - { "x": 7, "y": 1 }, - { "x": 8, "y": 1 }, - { "x": 9, "y": 1 }, - { "x": 10, "y": 1 }, - { "x": 11, "y": 1 }, - { "x": 0, "y": 2 }, - { "x": 1, "y": 2 }, - { "x": 2, "y": 2 }, - { "x": 3, "y": 2 }, - { "x": 4, "y": 2 }, - { "x": 5, "y": 2 }, - { "x": 6, "y": 2 }, - { "x": 7, "y": 2 }, - { "x": 8, "y": 2 }, - { "x": 9, "y": 2 }, - { "x": 10, "y": 2 }, - { "x": 11, "y": 2 }, - { "x": 0, "y": 3 }, - { "x": 1, "y": 3 }, - { "x": 2, "y": 3 }, - { "x": 3, "y": 3 }, - { "x": 4, "y": 3 }, - { "x": 5, "y": 3 }, - { "x": 6, "y": 3 }, - { "x": 7, "y": 3 }, - { "x": 8, "y": 3 }, - { "x": 9, "y": 3 }, - { "x": 10, "y": 3 }, - { "x": 11, "y": 3 } + {"matrix": [0, 0], "x": 0, "y": 0}, + {"matrix": [0, 1], "x": 1, "y": 0}, + {"matrix": [0, 2], "x": 2, "y": 0}, + {"matrix": [0, 3], "x": 3, "y": 0}, + {"matrix": [0, 4], "x": 4, "y": 0}, + {"matrix": [0, 5], "x": 5, "y": 0}, + {"matrix": [0, 6], "x": 6, "y": 0}, + {"matrix": [0, 7], "x": 7, "y": 0}, + {"matrix": [0, 8], "x": 8, "y": 0}, + {"matrix": [0, 9], "x": 9, "y": 0}, + {"matrix": [0, 10], "x": 10, "y": 0}, + {"matrix": [0, 11], "x": 11, "y": 0}, + {"matrix": [0, 12], "x": 12, "y": 0}, + + {"matrix": [1, 0], "x": 0, "y": 1}, + {"matrix": [1, 1], "x": 1, "y": 1}, + {"matrix": [1, 2], "x": 2, "y": 1}, + {"matrix": [1, 3], "x": 3, "y": 1}, + {"matrix": [1, 4], "x": 4, "y": 1}, + {"matrix": [1, 5], "x": 5, "y": 1}, + {"matrix": [1, 6], "x": 6, "y": 1}, + {"matrix": [1, 7], "x": 7, "y": 1}, + {"matrix": [1, 8], "x": 8, "y": 1}, + {"matrix": [1, 9], "x": 9, "y": 1}, + {"matrix": [1, 10], "x": 10, "y": 1}, + {"matrix": [1, 11], "x": 11, "y": 1}, + + {"matrix": [2, 0], "x": 0, "y": 2}, + {"matrix": [2, 1], "x": 1, "y": 2}, + {"matrix": [2, 2], "x": 2, "y": 2}, + {"matrix": [2, 3], "x": 3, "y": 2}, + {"matrix": [2, 4], "x": 4, "y": 2}, + {"matrix": [2, 5], "x": 5, "y": 2}, + {"matrix": [2, 6], "x": 6, "y": 2}, + {"matrix": [2, 7], "x": 7, "y": 2}, + {"matrix": [2, 8], "x": 8, "y": 2}, + {"matrix": [2, 9], "x": 9, "y": 2}, + {"matrix": [2, 10], "x": 10, "y": 2}, + {"matrix": [2, 11], "x": 11, "y": 2}, + + {"matrix": [3, 0], "x": 0, "y": 3}, + {"matrix": [3, 1], "x": 1, "y": 3}, + {"matrix": [3, 2], "x": 2, "y": 3}, + {"matrix": [3, 3], "x": 3, "y": 3}, + {"matrix": [3, 4], "x": 4, "y": 3}, + {"matrix": [3, 5], "x": 5, "y": 3}, + {"matrix": [3, 6], "x": 6, "y": 3}, + {"matrix": [3, 7], "x": 7, "y": 3}, + {"matrix": [3, 8], "x": 8, "y": 3}, + {"matrix": [3, 9], "x": 9, "y": 3}, + {"matrix": [3, 10], "x": 10, "y": 3}, + {"matrix": [3, 11], "x": 11, "y": 3} ] } } diff --git a/keyboards/work_louder/work_board/work_board.h b/keyboards/work_louder/work_board/work_board.h index 284eecc430..04de456eca 100644 --- a/keyboards/work_louder/work_board/work_board.h +++ b/keyboards/work_louder/work_board/work_board.h @@ -18,39 +18,3 @@ #include "quantum.h" #include "rgb_functions.h" - -#define ___ KC_NO - -/* This is a shortcut to help you visually see your layout. - * - * The first section contains all of the arguments representing the physical - * layout of the board and position of the keys. - * - * The second converts the arguments into a two-dimensional array which - * represents the switch matrix. - */ -#define LAYOUT_2u_space( \ - k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, \ - k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ - k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ - k30, k31, k32, k33, k34, k35, k37, k38, k39, k3a, k3b \ -) \ -{ \ - { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c }, \ - { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, ___ }, \ - { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, ___ }, \ - { k30, k31, k32, k33, k34, k35, ___, k37, k38, k39, k3a, k3b, ___ } \ -} - -#define LAYOUT( \ - k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, \ - k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ - k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ - k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b \ -) \ -{ \ - { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c }, \ - { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, ___ }, \ - { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, ___ }, \ - { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, ___ } \ -} -- cgit v1.2.3 From c9f619124d41637ece157570703423c3890cb6c2 Mon Sep 17 00:00:00 2001 From: Nick Brassel Date: Sun, 16 Apr 2023 01:18:44 +1000 Subject: Encodermap direction define. (#20454) --- keyboards/work_louder/loop/keymaps/via/keymap.c | 2 +- keyboards/work_louder/micro/keymaps/default/keymap.c | 2 +- keyboards/work_louder/micro/keymaps/peterfalken/keymap.c | 2 +- keyboards/work_louder/micro/keymaps/via/keymap.c | 2 +- keyboards/work_louder/nano/keymaps/via/keymap.c | 2 +- keyboards/work_louder/work_board/keymaps/drashna/keymap.c | 2 +- keyboards/work_louder/work_board/keymaps/peterfalken/keymap.c | 2 +- keyboards/work_louder/work_board/keymaps/via/keymap.c | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) (limited to 'keyboards/work_louder') diff --git a/keyboards/work_louder/loop/keymaps/via/keymap.c b/keyboards/work_louder/loop/keymaps/via/keymap.c index 5b35be9cf3..844ef1c874 100644 --- a/keyboards/work_louder/loop/keymaps/via/keymap.c +++ b/keyboards/work_louder/loop/keymaps/via/keymap.c @@ -33,7 +33,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // clang-format on #ifdef ENCODER_MAP_ENABLE -const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = { +const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = { [0] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU), ENCODER_CCW_CW(KC_MPRV, KC_MNXT), ENCODER_CCW_CW(R_M_RMOD, R_M_MOD) }, [1] = { ENCODER_CCW_CW(_______, _______), ENCODER_CCW_CW(_______, _______), ENCODER_CCW_CW(_______, _______) }, [2] = { ENCODER_CCW_CW(_______, _______), ENCODER_CCW_CW(_______, _______), ENCODER_CCW_CW(_______, _______) }, diff --git a/keyboards/work_louder/micro/keymaps/default/keymap.c b/keyboards/work_louder/micro/keymaps/default/keymap.c index 6b5541e017..56146f4932 100644 --- a/keyboards/work_louder/micro/keymaps/default/keymap.c +++ b/keyboards/work_louder/micro/keymaps/default/keymap.c @@ -62,7 +62,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } #if defined(ENCODER_MAP_ENABLE) -const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = { +const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = { { ENCODER_CCW_CW(KC_VOLD, KC_VOLU), ENCODER_CCW_CW(C(KC_Z), C(KC_Y)) }, { ENCODER_CCW_CW(_______, _______), ENCODER_CCW_CW(_______, _______) }, { ENCODER_CCW_CW(_______, _______), ENCODER_CCW_CW(_______, _______) }, diff --git a/keyboards/work_louder/micro/keymaps/peterfalken/keymap.c b/keyboards/work_louder/micro/keymaps/peterfalken/keymap.c index 8ef9a4eb97..abb902597b 100644 --- a/keyboards/work_louder/micro/keymaps/peterfalken/keymap.c +++ b/keyboards/work_louder/micro/keymaps/peterfalken/keymap.c @@ -79,7 +79,7 @@ typedef union { work_louder_config_t work_louder_config; #if defined(ENCODER_MAP_ENABLE) -const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = { +const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = { { ENCODER_CCW_CW(KC_VOLD, KC_VOLU), ENCODER_CCW_CW(CK_UNDO, CK_REDO) }, { ENCODER_CCW_CW(_______, _______), ENCODER_CCW_CW(_______, _______) }, { ENCODER_CCW_CW(_______, _______), ENCODER_CCW_CW(_______, _______) }, diff --git a/keyboards/work_louder/micro/keymaps/via/keymap.c b/keyboards/work_louder/micro/keymaps/via/keymap.c index 514aae2aa0..bcb55a3991 100644 --- a/keyboards/work_louder/micro/keymaps/via/keymap.c +++ b/keyboards/work_louder/micro/keymaps/via/keymap.c @@ -31,7 +31,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; #if defined(ENCODER_MAP_ENABLE) -const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = { +const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = { { ENCODER_CCW_CW(KC_VOLD, KC_VOLU), ENCODER_CCW_CW(C(KC_Z), C(KC_Y)) }, { ENCODER_CCW_CW(_______, _______), ENCODER_CCW_CW(_______, _______) }, { ENCODER_CCW_CW(_______, _______), ENCODER_CCW_CW(_______, _______) }, diff --git a/keyboards/work_louder/nano/keymaps/via/keymap.c b/keyboards/work_louder/nano/keymaps/via/keymap.c index 84c5895d5e..17053dffd2 100644 --- a/keyboards/work_louder/nano/keymaps/via/keymap.c +++ b/keyboards/work_louder/nano/keymaps/via/keymap.c @@ -33,7 +33,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { #ifdef ENCODER_MAP_ENABLE -const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = { +const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = { [0] = { ENCODER_CCW_CW(C(KC_Z), C(KC_Y)) }, [1] = { ENCODER_CCW_CW(G(KC_Z), G(S(KC_Z))) }, [2] = { ENCODER_CCW_CW(_______, _______) }, diff --git a/keyboards/work_louder/work_board/keymaps/drashna/keymap.c b/keyboards/work_louder/work_board/keymaps/drashna/keymap.c index 9b8cc479ae..99bbedfdcb 100644 --- a/keyboards/work_louder/work_board/keymaps/drashna/keymap.c +++ b/keyboards/work_louder/work_board/keymaps/drashna/keymap.c @@ -93,7 +93,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { #ifdef ENCODER_ENABLE # ifdef ENCODER_MAP_ENABLE -const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = { +const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = { [_DEFAULT_LAYER_1] = { { KC_DOWN, KC_UP } }, [_DEFAULT_LAYER_2] = { { _______, _______ } }, [_DEFAULT_LAYER_3] = { { _______, _______ } }, diff --git a/keyboards/work_louder/work_board/keymaps/peterfalken/keymap.c b/keyboards/work_louder/work_board/keymaps/peterfalken/keymap.c index 5cbe25322a..785322b8af 100644 --- a/keyboards/work_louder/work_board/keymaps/peterfalken/keymap.c +++ b/keyboards/work_louder/work_board/keymaps/peterfalken/keymap.c @@ -79,7 +79,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; #ifdef ENCODER_MAP_ENABLE -const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = { +const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = { [_QWERTY] = { { KC_VOLU, KC_VOLD } }, [_RAISE] = { { _______, _______ } }, [_LOWER] = { { _______, _______ } }, diff --git a/keyboards/work_louder/work_board/keymaps/via/keymap.c b/keyboards/work_louder/work_board/keymaps/via/keymap.c index 08df414e88..e920c2f9bd 100644 --- a/keyboards/work_louder/work_board/keymaps/via/keymap.c +++ b/keyboards/work_louder/work_board/keymaps/via/keymap.c @@ -55,7 +55,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { #ifdef ENCODER_MAP_ENABLE -const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = { +const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = { [_QWERTY] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }, [_LOWER] = { ENCODER_CCW_CW(KC_PGDN, KC_PGUP) }, [_RAISE] = { ENCODER_CCW_CW(R_M_RMOD, R_M_MOD) }, -- cgit v1.2.3 From 2944e938703e2049bb6262a0ab31e701d27e8ab3 Mon Sep 17 00:00:00 2001 From: Ryan Date: Mon, 1 May 2023 17:37:12 +1000 Subject: Move `USB_MAX_POWER_CONSUMPTION` to data driven (#20648) --- keyboards/work_louder/loop/config.h | 2 -- keyboards/work_louder/loop/info.json | 3 ++- keyboards/work_louder/micro/config.h | 6 ------ keyboards/work_louder/micro/info.json | 3 ++- keyboards/work_louder/nano/config.h | 2 -- keyboards/work_louder/nano/info.json | 3 ++- keyboards/work_louder/work_board/config.h | 2 -- keyboards/work_louder/work_board/info.json | 3 ++- 8 files changed, 8 insertions(+), 16 deletions(-) (limited to 'keyboards/work_louder') diff --git a/keyboards/work_louder/loop/config.h b/keyboards/work_louder/loop/config.h index 4d5bcf9dba..93b3b54184 100644 --- a/keyboards/work_louder/loop/config.h +++ b/keyboards/work_louder/loop/config.h @@ -17,8 +17,6 @@ along with this program. If not, see . #pragma once -#define USB_MAX_POWER_CONSUMPTION 100 - #define RGBLIGHT_DI_PIN E6 //# define RGBLIGHT_HUE_STEP 8 //# define RGBLIGHT_SAT_STEP 8 diff --git a/keyboards/work_louder/loop/info.json b/keyboards/work_louder/loop/info.json index 64aed890de..be5d470382 100644 --- a/keyboards/work_louder/loop/info.json +++ b/keyboards/work_louder/loop/info.json @@ -5,7 +5,8 @@ "maintainer": "Work Louder", "usb": { "vid": "0x574C", - "pid": "0x1DF9" + "pid": "0x1DF9", + "max_power": 100 }, "rgb_matrix": { "driver": "WS2812" diff --git a/keyboards/work_louder/micro/config.h b/keyboards/work_louder/micro/config.h index f23c5a4ef1..234b1de602 100644 --- a/keyboards/work_louder/micro/config.h +++ b/keyboards/work_louder/micro/config.h @@ -4,12 +4,6 @@ #pragma once -/* - * Feature disable options - * These options are also useful to firmware size reduction. - */ -#define USB_MAX_POWER_CONSUMPTION 100 - #define RGB_MATRIX_LED_COUNT 12 #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 150 #define RGB_MATRIX_DISABLE_KEYCODES diff --git a/keyboards/work_louder/micro/info.json b/keyboards/work_louder/micro/info.json index f6b45226a0..80c1c259f5 100644 --- a/keyboards/work_louder/micro/info.json +++ b/keyboards/work_louder/micro/info.json @@ -49,7 +49,8 @@ "usb": { "device_version": "1.0.0", "pid": "0xE6E3", - "vid": "0x574C" + "vid": "0x574C", + "max_power": 100 }, "encoder": { "rotary": [ diff --git a/keyboards/work_louder/nano/config.h b/keyboards/work_louder/nano/config.h index 265da302e5..74427859cb 100644 --- a/keyboards/work_louder/nano/config.h +++ b/keyboards/work_louder/nano/config.h @@ -17,8 +17,6 @@ along with this program. If not, see . #pragma once -#define USB_MAX_POWER_CONSUMPTION 100 - #define RGBLIGHT_DI_PIN C7 #define RGBLED_NUM 6 //# define RGBLIGHT_HUE_STEP 8 diff --git a/keyboards/work_louder/nano/info.json b/keyboards/work_louder/nano/info.json index 70da0e4cc4..097ad1f045 100644 --- a/keyboards/work_louder/nano/info.json +++ b/keyboards/work_louder/nano/info.json @@ -6,7 +6,8 @@ "usb": { "vid": "0x574C", "pid": "0xE6F0", - "device_version": "0.0.1" + "device_version": "0.0.1", + "max_power": 100 }, "rgb_matrix": { "driver": "WS2812" diff --git a/keyboards/work_louder/work_board/config.h b/keyboards/work_louder/work_board/config.h index 8f392bd050..1d8feeff58 100644 --- a/keyboards/work_louder/work_board/config.h +++ b/keyboards/work_louder/work_board/config.h @@ -17,8 +17,6 @@ along with this program. If not, see . #pragma once -#define USB_MAX_POWER_CONSUMPTION 100 - #define RGBLIGHT_DI_PIN D2 //# define RGBLIGHT_HUE_STEP 8 //# define RGBLIGHT_SAT_STEP 8 diff --git a/keyboards/work_louder/work_board/info.json b/keyboards/work_louder/work_board/info.json index b79a1144a1..1b3bd41520 100644 --- a/keyboards/work_louder/work_board/info.json +++ b/keyboards/work_louder/work_board/info.json @@ -5,7 +5,8 @@ "maintainer": "Work Louder", "usb": { "vid": "0x574C", - "pid": "0xDCD1" + "pid": "0xDCD1", + "max_power": 100 }, "rgb_matrix": { "driver": "WS2812" -- cgit v1.2.3 From ef6a712899f4ac3cf75f989221351c1cfb57f3b9 Mon Sep 17 00:00:00 2001 From: Ryan Date: Thu, 4 May 2023 19:09:59 +1000 Subject: Even more `info.json` whitespace cleanups (#20703) --- keyboards/work_louder/micro/info.json | 32 ++++++++--------- keyboards/work_louder/numpad/info.json | 64 +++++++++++++++++----------------- 2 files changed, 48 insertions(+), 48 deletions(-) (limited to 'keyboards/work_louder') diff --git a/keyboards/work_louder/micro/info.json b/keyboards/work_louder/micro/info.json index 80c1c259f5..6b14ecfbe7 100644 --- a/keyboards/work_louder/micro/info.json +++ b/keyboards/work_louder/micro/info.json @@ -64,22 +64,22 @@ "layouts": { "LAYOUT": { "layout": [ - { "matrix": [0, 0], "x": 0, "y": 0 }, - { "matrix": [0, 1], "x": 1.25, "y": 0.25 }, - { "matrix": [0, 2], "x": 2.25, "y": 0.25 }, - { "matrix": [0, 3], "x": 3.5, "y": 0 }, - { "matrix": [1, 0], "x": 0.25, "y": 1.25 }, - { "matrix": [1, 1], "x": 1.25, "y": 1.25 }, - { "matrix": [1, 2], "x": 2.25, "y": 1.25 }, - { "matrix": [1, 3], "x": 3.25, "y": 1.25 }, - { "matrix": [2, 0], "x": 0.25, "y": 2.25 }, - { "matrix": [2, 1], "x": 1.25, "y": 2.25 }, - { "matrix": [2, 2], "x": 2.25, "y": 2.25 }, - { "matrix": [2, 3], "x": 3.25, "y": 2.25 }, - { "matrix": [3, 0], "x": 0, "y": 3.5 }, - { "matrix": [3, 1], "x": 1.25, "y": 3.25 }, - { "matrix": [3, 2], "x": 2.25, "y": 3.25 }, - { "matrix": [3, 3], "x": 3.5, "y": 3.5 } + {"matrix": [0, 0], "x": 0, "y": 0}, + {"matrix": [0, 1], "x": 1.25, "y": 0.25}, + {"matrix": [0, 2], "x": 2.25, "y": 0.25}, + {"matrix": [0, 3], "x": 3.5, "y": 0}, + {"matrix": [1, 0], "x": 0.25, "y": 1.25}, + {"matrix": [1, 1], "x": 1.25, "y": 1.25}, + {"matrix": [1, 2], "x": 2.25, "y": 1.25}, + {"matrix": [1, 3], "x": 3.25, "y": 1.25}, + {"matrix": [2, 0], "x": 0.25, "y": 2.25}, + {"matrix": [2, 1], "x": 1.25, "y": 2.25}, + {"matrix": [2, 2], "x": 2.25, "y": 2.25}, + {"matrix": [2, 3], "x": 3.25, "y": 2.25}, + {"matrix": [3, 0], "x": 0, "y": 3.5}, + {"matrix": [3, 1], "x": 1.25, "y": 3.25}, + {"matrix": [3, 2], "x": 2.25, "y": 3.25}, + {"matrix": [3, 3], "x": 3.5, "y": 3.5} ] } } diff --git a/keyboards/work_louder/numpad/info.json b/keyboards/work_louder/numpad/info.json index 8400e21a83..4fa9c1442c 100644 --- a/keyboards/work_louder/numpad/info.json +++ b/keyboards/work_louder/numpad/info.json @@ -31,22 +31,22 @@ "rgb_matrix": { "driver": "WS2812", "layout": [ - { "flags": 1, "matrix": [3, 3], "x": 141, "y": 64 }, - { "flags": 1, "matrix": [3, 2], "x": 122, "y": 64 }, - { "flags": 1, "matrix": [3, 1], "x": 103, "y": 64 }, - { "flags": 4, "matrix": [3, 0], "x": 84, "y": 64 }, - { "flags": 1, "matrix": [2, 0], "x": 84, "y": 45 }, - { "flags": 1, "matrix": [2, 1], "x": 103, "y": 45 }, - { "flags": 1, "matrix": [2, 2], "x": 122, "y": 45 }, - { "flags": 4, "matrix": [2, 3], "x": 141, "y": 45 }, - { "flags": 1, "matrix": [1, 3], "x": 141, "y": 26 }, - { "flags": 1, "matrix": [1, 2], "x": 122, "y": 26 }, - { "flags": 1, "matrix": [1, 1], "x": 103, "y": 26 }, - { "flags": 4, "matrix": [1, 0], "x": 84, "y": 26 }, - { "flags": 1, "matrix": [0, 0], "x": 84, "y": 7 }, - { "flags": 4, "matrix": [0, 1], "x": 103, "y": 7 }, - { "flags": 4, "matrix": [0, 2], "x": 122, "y": 7 }, - { "flags": 4, "matrix": [0, 3], "x": 141, "y": 7 } + {"flags": 1, "matrix": [3, 3], "x": 141, "y": 64}, + {"flags": 1, "matrix": [3, 2], "x": 122, "y": 64}, + {"flags": 1, "matrix": [3, 1], "x": 103, "y": 64}, + {"flags": 4, "matrix": [3, 0], "x": 84, "y": 64}, + {"flags": 1, "matrix": [2, 0], "x": 84, "y": 45}, + {"flags": 1, "matrix": [2, 1], "x": 103, "y": 45}, + {"flags": 1, "matrix": [2, 2], "x": 122, "y": 45}, + {"flags": 4, "matrix": [2, 3], "x": 141, "y": 45}, + {"flags": 1, "matrix": [1, 3], "x": 141, "y": 26}, + {"flags": 1, "matrix": [1, 2], "x": 122, "y": 26}, + {"flags": 1, "matrix": [1, 1], "x": 103, "y": 26}, + {"flags": 4, "matrix": [1, 0], "x": 84, "y": 26}, + {"flags": 1, "matrix": [0, 0], "x": 84, "y": 7}, + {"flags": 4, "matrix": [0, 1], "x": 103, "y": 7}, + {"flags": 4, "matrix": [0, 2], "x": 122, "y": 7}, + {"flags": 4, "matrix": [0, 3], "x": 141, "y": 7} ] }, "rgblight": { @@ -72,22 +72,22 @@ "layouts": { "LAYOUT_ortho_4x4": { "layout": [ - { "matrix": [0, 0], "x": 0, "y": 0 }, - { "matrix": [0, 1], "x": 1, "y": 0 }, - { "matrix": [0, 2], "x": 2, "y": 0 }, - { "matrix": [0, 3], "x": 3, "y": 0 }, - { "matrix": [1, 0], "x": 0, "y": 1 }, - { "matrix": [1, 1], "x": 1, "y": 1 }, - { "matrix": [1, 2], "x": 2, "y": 1 }, - { "matrix": [1, 3], "x": 3, "y": 1 }, - { "matrix": [2, 0], "x": 0, "y": 2 }, - { "matrix": [2, 1], "x": 1, "y": 2 }, - { "matrix": [2, 2], "x": 2, "y": 2 }, - { "matrix": [2, 3], "x": 3, "y": 2 }, - { "matrix": [3, 0], "x": 0, "y": 3 }, - { "matrix": [3, 1], "x": 1, "y": 3 }, - { "matrix": [3, 2], "x": 2, "y": 3 }, - { "matrix": [3, 3], "x": 3, "y": 3 } + {"matrix": [0, 0], "x": 0, "y": 0}, + {"matrix": [0, 1], "x": 1, "y": 0}, + {"matrix": [0, 2], "x": 2, "y": 0}, + {"matrix": [0, 3], "x": 3, "y": 0}, + {"matrix": [1, 0], "x": 0, "y": 1}, + {"matrix": [1, 1], "x": 1, "y": 1}, + {"matrix": [1, 2], "x": 2, "y": 1}, + {"matrix": [1, 3], "x": 3, "y": 1}, + {"matrix": [2, 0], "x": 0, "y": 2}, + {"matrix": [2, 1], "x": 1, "y": 2}, + {"matrix": [2, 2], "x": 2, "y": 2}, + {"matrix": [2, 3], "x": 3, "y": 2}, + {"matrix": [3, 0], "x": 0, "y": 3}, + {"matrix": [3, 1], "x": 1, "y": 3}, + {"matrix": [3, 2], "x": 2, "y": 3}, + {"matrix": [3, 3], "x": 3, "y": 3} ] } } -- cgit v1.2.3 From 363bfdbfda5ea9fa996390920a9e8982535b76c8 Mon Sep 17 00:00:00 2001 From: Ryan Date: Sat, 27 May 2023 12:27:44 +1000 Subject: Move `RGBLIGHT_LIMIT_VAL` to data driven (#20974) Co-authored-by: Nick Brassel --- keyboards/work_louder/loop/config.h | 1 - keyboards/work_louder/loop/info.json | 3 +++ keyboards/work_louder/nano/config.h | 1 - keyboards/work_louder/nano/info.json | 3 +++ keyboards/work_louder/work_board/config.h | 1 - keyboards/work_louder/work_board/info.json | 3 +++ 6 files changed, 9 insertions(+), 3 deletions(-) (limited to 'keyboards/work_louder') diff --git a/keyboards/work_louder/loop/config.h b/keyboards/work_louder/loop/config.h index 93b3b54184..cf25b4b5b7 100644 --- a/keyboards/work_louder/loop/config.h +++ b/keyboards/work_louder/loop/config.h @@ -21,7 +21,6 @@ along with this program. If not, see . //# define RGBLIGHT_HUE_STEP 8 //# define RGBLIGHT_SAT_STEP 8 //# define RGBLIGHT_VAL_STEP 8 -#define RGBLIGHT_LIMIT_VAL 120 /* The maximum brightness level */ #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ /*== or choose animations ==*/ #define RGBLIGHT_EFFECT_BREATHING diff --git a/keyboards/work_louder/loop/info.json b/keyboards/work_louder/loop/info.json index be5d470382..966f0a6b02 100644 --- a/keyboards/work_louder/loop/info.json +++ b/keyboards/work_louder/loop/info.json @@ -29,6 +29,9 @@ "ws2812": { "pin": "F1" }, + "rgblight": { + "max_brightness": 120 + }, "processor": "atmega32u4", "bootloader": "atmel-dfu", "layouts": { diff --git a/keyboards/work_louder/nano/config.h b/keyboards/work_louder/nano/config.h index 74427859cb..593304a053 100644 --- a/keyboards/work_louder/nano/config.h +++ b/keyboards/work_louder/nano/config.h @@ -22,7 +22,6 @@ along with this program. If not, see . //# define RGBLIGHT_HUE_STEP 8 //# define RGBLIGHT_SAT_STEP 8 //# define RGBLIGHT_VAL_STEP 8 -#define RGBLIGHT_LIMIT_VAL 120 /* The maximum brightness level */ #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ /*== or choose animations ==*/ #define RGBLIGHT_EFFECT_BREATHING diff --git a/keyboards/work_louder/nano/info.json b/keyboards/work_louder/nano/info.json index 097ad1f045..adc32d10a6 100644 --- a/keyboards/work_louder/nano/info.json +++ b/keyboards/work_louder/nano/info.json @@ -25,6 +25,9 @@ "ws2812": { "pin": "F6" }, + "rgblight": { + "max_brightness": 120 + }, "bootmagic": { "matrix": [0, 2] }, diff --git a/keyboards/work_louder/work_board/config.h b/keyboards/work_louder/work_board/config.h index 1d8feeff58..56615c8e49 100644 --- a/keyboards/work_louder/work_board/config.h +++ b/keyboards/work_louder/work_board/config.h @@ -21,7 +21,6 @@ along with this program. If not, see . //# define RGBLIGHT_HUE_STEP 8 //# define RGBLIGHT_SAT_STEP 8 //# define RGBLIGHT_VAL_STEP 8 -#define RGBLIGHT_LIMIT_VAL 120 /* The maximum brightness level */ #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ /*== or choose animations ==*/ #define RGBLIGHT_EFFECT_BREATHING diff --git a/keyboards/work_louder/work_board/info.json b/keyboards/work_louder/work_board/info.json index 1b3bd41520..067a2b292e 100644 --- a/keyboards/work_louder/work_board/info.json +++ b/keyboards/work_louder/work_board/info.json @@ -24,6 +24,9 @@ "ws2812": { "pin": "D1" }, + "rgblight": { + "max_brightness": 120 + }, "processor": "atmega32u4", "bootloader": "atmel-dfu", "layouts": { -- cgit v1.2.3