From 5c393420accd32c06c45a24657fbc019fb0cd799 Mon Sep 17 00:00:00 2001 From: stanrc85 Date: Thu, 20 May 2021 08:43:37 -0400 Subject: [PATCH 1/5] Add led_config_t for RGB Matrix --- keyboards/jacky_studio/bear_65/bear_65.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/keyboards/jacky_studio/bear_65/bear_65.c b/keyboards/jacky_studio/bear_65/bear_65.c index a2ae572b82da..b4ed1318f051 100644 --- a/keyboards/jacky_studio/bear_65/bear_65.c +++ b/keyboards/jacky_studio/bear_65/bear_65.c @@ -15,3 +15,23 @@ */ #include "bear_65.h" + +#ifdef RGB_MATRIX_ENABLE +led_config_t g_led_config = { { + // Key Matrix to LED Index + { NO_LED, 4 , 4 , 4 , 4 , 3 , 3 , 3 , 3 , 2 , 2 , 2 , 2 , 1 , NO_LED}, + { NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, 6 }, + { 6 , NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, 6 , 0 , 6 }, + { 7 , 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, 11 }, + { 7 , NO_LED, NO_LED, 8 , NO_LED, 8 , 9 , NO_LED, 9 , 7 , 10 , 11 , 11 , 11 , 1 }, +}, { + // LED Index to Physical Position + {224, 32}, {224, 10}, {192, 10}, {128, 25}, + {70, 10}, {16, 10}, {16, 32}, {16, 64}, + {64, 64}, {112, 64}, {176, 64}, {224, 64} +}, { + // 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_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL +} }; +#endif From bd7109369ed830bff7bd8e62ae8671cea10502e1 Mon Sep 17 00:00:00 2001 From: stanrc85 Date: Thu, 20 May 2021 08:44:18 -0400 Subject: [PATCH 2/5] Add defines for RGB Matrix support --- keyboards/jacky_studio/bear_65/config.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/keyboards/jacky_studio/bear_65/config.h b/keyboards/jacky_studio/bear_65/config.h index 476d119afff5..0c9ecd5c44bf 100644 --- a/keyboards/jacky_studio/bear_65/config.h +++ b/keyboards/jacky_studio/bear_65/config.h @@ -73,3 +73,11 @@ // #define RGBLIGHT_EFFECT_RGB_TEST // #define RGBLIGHT_EFFECT_ALTERNATING #endif + +/* RGB matrix support */ +#ifdef RGB_MATRIX_ENABLE +#define RGB_MATRIX_KEYPRESSES +#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 220 +#define RGB_DISABLE_WHEN_USB_SUSPENDED false +#define DRIVER_LED_TOTAL 12 // Number of LEDs +#endif From 2d37f752c53f4f624c5e6f8466ca40fd9c633213 Mon Sep 17 00:00:00 2001 From: stanrc85 Date: Thu, 20 May 2021 08:45:34 -0400 Subject: [PATCH 3/5] RGB Matrix options added to rules.mk --- keyboards/jacky_studio/bear_65/rules.mk | 3 +++ 1 file changed, 3 insertions(+) diff --git a/keyboards/jacky_studio/bear_65/rules.mk b/keyboards/jacky_studio/bear_65/rules.mk index 339c37c7ee03..6f70cbbd6f51 100644 --- a/keyboards/jacky_studio/bear_65/rules.mk +++ b/keyboards/jacky_studio/bear_65/rules.mk @@ -22,3 +22,6 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth AUDIO_ENABLE = no # Audio output LTO_ENABLE = yes # Use LTO flags to reduce firmware size + +RGB_MATRIX_ENABLE = no # Enable keyboard RGB matrix (do not use together with RGBLIGHT_ENABLE) +RGB_MATRIX_DRIVER = WS2812 # RGB matrix driver support From 882cd701c85c0359fb9e0cf52fe45c0ac8589e92 Mon Sep 17 00:00:00 2001 From: stanrc85 Date: Thu, 20 May 2021 11:08:14 -0400 Subject: [PATCH 4/5] Enable Framebuffer effects --- keyboards/jacky_studio/bear_65/config.h | 1 + 1 file changed, 1 insertion(+) diff --git a/keyboards/jacky_studio/bear_65/config.h b/keyboards/jacky_studio/bear_65/config.h index 0c9ecd5c44bf..7a7b761b8d2e 100644 --- a/keyboards/jacky_studio/bear_65/config.h +++ b/keyboards/jacky_studio/bear_65/config.h @@ -79,5 +79,6 @@ #define RGB_MATRIX_KEYPRESSES #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 220 #define RGB_DISABLE_WHEN_USB_SUSPENDED false +#define RGB_MATRIX_FRAMEBUFFER_EFFECTS #define DRIVER_LED_TOTAL 12 // Number of LEDs #endif From 7bc909042c07bb71e5d14cba8768673d2a378cae Mon Sep 17 00:00:00 2001 From: stanrc85 <47038504+stanrc85@users.noreply.github.com> Date: Sat, 22 May 2021 07:22:15 -0400 Subject: [PATCH 5/5] Update keyboards/jacky_studio/bear_65/config.h Co-authored-by: Drashna Jaelre --- keyboards/jacky_studio/bear_65/config.h | 1 - 1 file changed, 1 deletion(-) diff --git a/keyboards/jacky_studio/bear_65/config.h b/keyboards/jacky_studio/bear_65/config.h index 7a7b761b8d2e..a664099e8084 100644 --- a/keyboards/jacky_studio/bear_65/config.h +++ b/keyboards/jacky_studio/bear_65/config.h @@ -78,7 +78,6 @@ #ifdef RGB_MATRIX_ENABLE #define RGB_MATRIX_KEYPRESSES #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 220 -#define RGB_DISABLE_WHEN_USB_SUSPENDED false #define RGB_MATRIX_FRAMEBUFFER_EFFECTS #define DRIVER_LED_TOTAL 12 // Number of LEDs #endif