summaryrefslogtreecommitdiff
path: root/keyboards
diff options
context:
space:
mode:
authorRyan <fauxpark@gmail.com>2023-09-17 22:11:16 +1000
committerGitHub <noreply@github.com>2023-09-17 22:11:16 +1000
commit1ea54a2d8da9e64e5a2c1fd882a13058523b50bc (patch)
treef76a5092995ae9a3440729135765625f50684f09 /keyboards
parent32126dc4f01142dbc61f52c9d225bb53faf2d12c (diff)
Complete RGB Matrix support for IS31FL3218 (#22004)
Diffstat (limited to 'keyboards')
-rw-r--r--keyboards/wilba_tech/rama_works_m60_a/keymaps/zyber/config.h4
-rw-r--r--keyboards/wilba_tech/rama_works_m6_b/config.h2
-rw-r--r--keyboards/wilba_tech/wt_rgb_backlight.c20
3 files changed, 22 insertions, 4 deletions
diff --git a/keyboards/wilba_tech/rama_works_m60_a/keymaps/zyber/config.h b/keyboards/wilba_tech/rama_works_m60_a/keymaps/zyber/config.h
index 9ad052aab4..d34eafbaeb 100644
--- a/keyboards/wilba_tech/rama_works_m60_a/keymaps/zyber/config.h
+++ b/keyboards/wilba_tech/rama_works_m60_a/keymaps/zyber/config.h
@@ -3,6 +3,4 @@
3 3
4#pragma once 4#pragma once
5#undef PRODUCT 5#undef PRODUCT
6#define PRODUCT RAMA WORKS M60-A Seq2 6#define PRODUCT "RAMA WORKS M60-A Seq2"
7#undef DESCRIPTION
8#define DESCRIPTION RAMA WORKS M60-A Seq2
diff --git a/keyboards/wilba_tech/rama_works_m6_b/config.h b/keyboards/wilba_tech/rama_works_m6_b/config.h
index a117bcc2a8..27a5e72c04 100644
--- a/keyboards/wilba_tech/rama_works_m6_b/config.h
+++ b/keyboards/wilba_tech/rama_works_m6_b/config.h
@@ -20,6 +20,8 @@
20/* Locking resynchronize hack */ 20/* Locking resynchronize hack */
21#define LOCKING_RESYNC_ENABLE 21#define LOCKING_RESYNC_ENABLE
22 22
23#define RGB_MATRIX_LED_COUNT 6
24
23#define RGB_BACKLIGHT_ENABLED 1 25#define RGB_BACKLIGHT_ENABLED 1
24 26
25// This conditionally compiles the backlight code for M6-B specifics 27// This conditionally compiles the backlight code for M6-B specifics
diff --git a/keyboards/wilba_tech/wt_rgb_backlight.c b/keyboards/wilba_tech/wt_rgb_backlight.c
index d2ec610df8..8a0f3b7f91 100644
--- a/keyboards/wilba_tech/wt_rgb_backlight.c
+++ b/keyboards/wilba_tech/wt_rgb_backlight.c
@@ -834,7 +834,14 @@ const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = {
834}; 834};
835 835
836#elif defined(RGB_BACKLIGHT_M6_B) 836#elif defined(RGB_BACKLIGHT_M6_B)
837 // Driver has fixed mapping of index to the red, green and blue LEDs 837const is31fl3218_led_t PROGMEM g_is31fl3218_leds[RGB_MATRIX_LED_COUNT] = {
838 {OUT1, OUT2, OUT3},
839 {OUT4, OUT5, OUT6},
840 {OUT7, OUT8, OUT9},
841 {OUT10, OUT11, OUT12},
842 {OUT13, OUT14, OUT15},
843 {OUT16, OUT17, OUT18}
844};
838#elif defined(RGB_BACKLIGHT_M10_C) 845#elif defined(RGB_BACKLIGHT_M10_C)
839// This is a 7-bit address, that gets left-shifted and bit 0 846// This is a 7-bit address, that gets left-shifted and bit 0
840// set to 0 for write, 1 for read (as per I2C protocol) 847// set to 0 for write, 1 for read (as per I2C protocol)
@@ -2915,6 +2922,17 @@ void backlight_init_drivers(void)
2915 2922
2916#if defined(RGB_BACKLIGHT_M6_B) 2923#if defined(RGB_BACKLIGHT_M6_B)
2917 is31fl3218_init(); 2924 is31fl3218_init();
2925
2926 for ( int index = 0; index < RGB_MATRIX_LED_COUNT; index++ )
2927 {
2928 bool enabled = true;
2929
2930 // This only caches it for later
2931 is31fl3218_set_led_control_register( index, enabled, enabled, enabled );
2932 }
2933
2934 // This actually updates the LED drivers
2935 is31fl3218_update_led_control_registers();
2918#elif defined(RGB_BACKLIGHT_HS60) 2936#elif defined(RGB_BACKLIGHT_HS60)
2919 is31fl3733_init( ISSI_ADDR_1, 0 ); 2937 is31fl3733_init( ISSI_ADDR_1, 0 );
2920 2938