summaryrefslogtreecommitdiff
path: root/keyboards
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards')
-rw-r--r--keyboards/acheron/apollo/87h/gamma/config.h1
-rw-r--r--keyboards/aeboards/satellite/rev1/config.h4
-rw-r--r--keyboards/aeboards/satellite/rev1/rev1.c4
-rwxr-xr-xkeyboards/fallacy/config.h2
-rwxr-xr-xkeyboards/fallacy/indicators.c11
-rw-r--r--keyboards/hs60/v2/ansi/config.h2
-rw-r--r--keyboards/hs60/v2/hhkb/config.h2
-rw-r--r--keyboards/hs60/v2/iso/config.h2
-rw-r--r--keyboards/input_club/k_type/config.h4
-rw-r--r--keyboards/input_club/k_type/i2c_master.h1
-rw-r--r--keyboards/input_club/k_type/is31fl3733-dual.c35
-rw-r--r--keyboards/input_club/k_type/is31fl3733-dual.h7
-rw-r--r--keyboards/input_club/k_type/k_type-rgbdriver.c22
-rw-r--r--keyboards/input_club/k_type/k_type.c2
-rw-r--r--keyboards/input_club/k_type/post_rules.mk4
-rwxr-xr-xkeyboards/keebwerk/mega/ansi/config.h2
-rw-r--r--keyboards/kprepublic/bm60hsrgb/rev2/config.h4
-rw-r--r--keyboards/kprepublic/bm60hsrgb/rev2/rev2.c14
-rw-r--r--keyboards/kprepublic/bm60hsrgb_iso/rev2/config.h4
-rw-r--r--keyboards/kprepublic/bm60hsrgb_iso/rev2/rev2.c14
-rw-r--r--keyboards/kprepublic/bm60hsrgb_poker/rev2/config.h4
-rw-r--r--keyboards/kprepublic/bm60hsrgb_poker/rev2/rev2.c14
-rw-r--r--keyboards/matrix/m20add/config.h2
-rw-r--r--keyboards/matrix/m20add/rgb_ring.c10
-rw-r--r--keyboards/neson_design/700e/700e.c32
-rw-r--r--keyboards/neson_design/700e/config.h2
-rw-r--r--keyboards/neson_design/n6/config.h2
-rw-r--r--keyboards/neson_design/n6/n6.c26
-rwxr-xr-xkeyboards/novelkeys/nk65/config.h2
-rwxr-xr-xkeyboards/novelkeys/nk87/config.h2
-rwxr-xr-xkeyboards/spaceholdings/nebula12/config.h2
-rwxr-xr-xkeyboards/spaceholdings/nebula68/config.h2
-rw-r--r--keyboards/tkc/portico/config.h2
-rw-r--r--keyboards/tkc/portico/portico.c2
-rw-r--r--keyboards/tkc/portico75/config.h2
-rw-r--r--keyboards/tkc/portico75/portico75.c2
-rw-r--r--keyboards/wilba_tech/rama_works_kara/config.h2
-rw-r--r--keyboards/wilba_tech/rama_works_koyu/config.h2
-rw-r--r--keyboards/wilba_tech/rama_works_m10_c/config.h2
-rw-r--r--keyboards/wilba_tech/rama_works_m50_a/config.h2
-rw-r--r--keyboards/wilba_tech/rama_works_m60_a/config.h2
-rw-r--r--keyboards/wilba_tech/rama_works_m65_b/config.h2
-rw-r--r--keyboards/wilba_tech/rama_works_m65_bx/config.h2
-rw-r--r--keyboards/wilba_tech/rama_works_m6_b/config.h2
-rw-r--r--keyboards/wilba_tech/rama_works_u80_a/config.h2
-rw-r--r--keyboards/wilba_tech/wt60_a/config.h2
-rw-r--r--keyboards/wilba_tech/wt60_b/config.h2
-rw-r--r--keyboards/wilba_tech/wt60_bx/config.h2
-rw-r--r--keyboards/wilba_tech/wt60_c/config.h2
-rw-r--r--keyboards/wilba_tech/wt65_a/config.h2
-rw-r--r--keyboards/wilba_tech/wt65_b/config.h2
-rw-r--r--keyboards/wilba_tech/wt75_a/config.h2
-rw-r--r--keyboards/wilba_tech/wt75_b/config.h2
-rw-r--r--keyboards/wilba_tech/wt75_c/config.h2
-rw-r--r--keyboards/wilba_tech/wt80_a/config.h2
-rw-r--r--keyboards/wilba_tech/wt_mono_backlight.c11
-rw-r--r--keyboards/wilba_tech/wt_rgb_backlight.c66
-rw-r--r--keyboards/wilba_tech/zeal60/config.h2
-rw-r--r--keyboards/wilba_tech/zeal65/config.h2
-rw-r--r--keyboards/xelus/dawn60/rev1/config.h2
-rw-r--r--keyboards/xelus/dawn60/rev1_qmk/config.h4
-rw-r--r--keyboards/xelus/dawn60/rev1_qmk/rev1_qmk.c34
-rw-r--r--keyboards/xelus/pachi/rgb/rev1/config.h3
-rw-r--r--keyboards/xelus/pachi/rgb/rev1/rev1.c4
-rw-r--r--keyboards/xelus/pachi/rgb/rev2/config.h3
-rw-r--r--keyboards/xelus/pachi/rgb/rev2/rev2.c4
66 files changed, 187 insertions, 235 deletions
diff --git a/keyboards/acheron/apollo/87h/gamma/config.h b/keyboards/acheron/apollo/87h/gamma/config.h
index e8600a18f1..151239ba33 100644
--- a/keyboards/acheron/apollo/87h/gamma/config.h
+++ b/keyboards/acheron/apollo/87h/gamma/config.h
@@ -30,7 +30,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
30#define IS31FL3741_DRIVER_COUNT 1 30#define IS31FL3741_DRIVER_COUNT 1
31#define DRIVER_1_LED_TOTAL 87 31#define DRIVER_1_LED_TOTAL 87
32#define RGB_MATRIX_LED_COUNT DRIVER_1_LED_TOTAL 32#define RGB_MATRIX_LED_COUNT DRIVER_1_LED_TOTAL
33#define ISSI_DRIVER_TOTAL RGB_MATRIX_LED_COUNT
34 33
35#define RGB_MATRIX_DEFAULT_VAL 80 34#define RGB_MATRIX_DEFAULT_VAL 80
36#define RGB_MATRIX_FRAMEBUFFER_EFFECTS 35#define RGB_MATRIX_FRAMEBUFFER_EFFECTS
diff --git a/keyboards/aeboards/satellite/rev1/config.h b/keyboards/aeboards/satellite/rev1/config.h
index fcf3105f0f..7a06288394 100644
--- a/keyboards/aeboards/satellite/rev1/config.h
+++ b/keyboards/aeboards/satellite/rev1/config.h
@@ -23,8 +23,8 @@
23#define IS31FL3731_DRIVER_COUNT 2 23#define IS31FL3731_DRIVER_COUNT 2
24#define DRIVER_1_LED_TOTAL 36 24#define DRIVER_1_LED_TOTAL 36
25#define DRIVER_2_LED_TOTAL 36 25#define DRIVER_2_LED_TOTAL 36
26#define ISSI_DRIVER_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) 26#define IS31FL3731_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)
27#define RGB_MATRIX_LED_COUNT ISSI_DRIVER_TOTAL 27#define RGB_MATRIX_LED_COUNT IS31FL3731_LED_COUNT
28 28
29#define RGB_MATRIX_DEFAULT_VAL 80 29#define RGB_MATRIX_DEFAULT_VAL 80
30#define RGB_MATRIX_FRAMEBUFFER_EFFECTS 30#define RGB_MATRIX_FRAMEBUFFER_EFFECTS
diff --git a/keyboards/aeboards/satellite/rev1/rev1.c b/keyboards/aeboards/satellite/rev1/rev1.c
index 4c6e7d6d7c..6727894e06 100644
--- a/keyboards/aeboards/satellite/rev1/rev1.c
+++ b/keyboards/aeboards/satellite/rev1/rev1.c
@@ -18,7 +18,7 @@
18#include "drivers/led/issi/is31fl3731.h" 18#include "drivers/led/issi/is31fl3731.h"
19 19
20#ifdef RGB_MATRIX_ENABLE 20#ifdef RGB_MATRIX_ENABLE
21const is31fl3731_led_t PROGMEM g_is31fl3731_leds[RGB_MATRIX_LED_COUNT] = { 21const is31fl3731_led_t PROGMEM g_is31fl3731_leds[IS31FL3731_LED_COUNT] = {
22/* Refer to IS31 manual for these locations 22/* Refer to IS31 manual for these locations
23 * driver 23 * driver
24 * | R location 24 * | R location
@@ -149,7 +149,7 @@ static void init(void) {
149 is31fl3731_init(IS31FL3731_I2C_ADDRESS_1); 149 is31fl3731_init(IS31FL3731_I2C_ADDRESS_1);
150 is31fl3731_init(IS31FL3731_I2C_ADDRESS_2); 150 is31fl3731_init(IS31FL3731_I2C_ADDRESS_2);
151 151
152 for (int index = 0; index < ISSI_DRIVER_TOTAL; index++) { 152 for (int index = 0; index < IS31FL3731_LED_COUNT; index++) {
153 bool enabled = !( ( index == 18+5) || //B5 153 bool enabled = !( ( index == 18+5) || //B5
154 ( index == 36+17) || //C17 154 ( index == 36+17) || //C17
155 ( index == 54+13) //D13 155 ( index == 54+13) //D13
diff --git a/keyboards/fallacy/config.h b/keyboards/fallacy/config.h
index 254f809c34..65cea1d5c1 100755
--- a/keyboards/fallacy/config.h
+++ b/keyboards/fallacy/config.h
@@ -20,7 +20,7 @@
20 */ 20 */
21#define IS31FL3731_I2C_ADDRESS_1 IS31FL3731_I2C_ADDRESS_GND 21#define IS31FL3731_I2C_ADDRESS_1 IS31FL3731_I2C_ADDRESS_GND
22#define IS31FL3731_DRIVER_COUNT 1 22#define IS31FL3731_DRIVER_COUNT 1
23#define LED_MATRIX_LED_COUNT 3 23#define IS31FL3731_LED_COUNT 3
24 24
25/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap 25/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap
26 */ 26 */
diff --git a/keyboards/fallacy/indicators.c b/keyboards/fallacy/indicators.c
index a8630d2e11..b95786db41 100755
--- a/keyboards/fallacy/indicators.c
+++ b/keyboards/fallacy/indicators.c
@@ -22,14 +22,7 @@
22 * init IS31FL3731 and i2c 22 * init IS31FL3731 and i2c
23 */ 23 */
24void init_fallacy_leds(void) { 24void init_fallacy_leds(void) {
25 i2c_init(); 25 is31fl3731_init_drivers();
26 is31fl3731_init(IS31FL3731_I2C_ADDRESS_1);
27
28 for (int i = 0; i < LED_MATRIX_LED_COUNT; i++) {
29 is31fl3731_set_led_control_register(i, true);
30 }
31
32 is31fl3731_update_led_control_registers(IS31FL3731_I2C_ADDRESS_1, 0);
33} 26}
34 27
35 28
@@ -54,7 +47,7 @@ void set_fallacy_led(int index, bool state) {
54 47
55/* define LED matrix 48/* define LED matrix
56 */ 49 */
57const is31fl3731_led_t PROGMEM g_is31fl3731_leds[LED_MATRIX_LED_COUNT] = { 50const is31fl3731_led_t PROGMEM g_is31fl3731_leds[IS31FL3731_LED_COUNT] = {
58 {0, C1_1}, 51 {0, C1_1},
59 {0, C2_1}, 52 {0, C2_1},
60 {0, C3_1}, 53 {0, C3_1},
diff --git a/keyboards/hs60/v2/ansi/config.h b/keyboards/hs60/v2/ansi/config.h
index 3600b30feb..e4dc24dc33 100644
--- a/keyboards/hs60/v2/ansi/config.h
+++ b/keyboards/hs60/v2/ansi/config.h
@@ -55,7 +55,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
55 55
56#define IS31FL3733_I2C_ADDRESS_1 IS31FL3733_I2C_ADDRESS_GND_GND 56#define IS31FL3733_I2C_ADDRESS_1 IS31FL3733_I2C_ADDRESS_GND_GND
57#define IS31FL3733_DRIVER_COUNT 1 57#define IS31FL3733_DRIVER_COUNT 1
58#define RGB_MATRIX_LED_COUNT 64 58#define IS31FL3733_LED_COUNT 64
59 59
60// These define which keys in the matrix are alphas/mods 60// These define which keys in the matrix are alphas/mods
61// Used for backlight effects so colors are different for 61// Used for backlight effects so colors are different for
diff --git a/keyboards/hs60/v2/hhkb/config.h b/keyboards/hs60/v2/hhkb/config.h
index bdc27435cf..029e1ebb18 100644
--- a/keyboards/hs60/v2/hhkb/config.h
+++ b/keyboards/hs60/v2/hhkb/config.h
@@ -55,7 +55,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
55 55
56#define IS31FL3733_I2C_ADDRESS_1 IS31FL3733_I2C_ADDRESS_GND_GND 56#define IS31FL3733_I2C_ADDRESS_1 IS31FL3733_I2C_ADDRESS_GND_GND
57#define IS31FL3733_DRIVER_COUNT 1 57#define IS31FL3733_DRIVER_COUNT 1
58#define RGB_MATRIX_LED_COUNT 64 58#define IS31FL3733_LED_COUNT 64
59 59
60// These define which keys in the matrix are alphas/mods 60// These define which keys in the matrix are alphas/mods
61// Used for backlight effects so colors are different for 61// Used for backlight effects so colors are different for
diff --git a/keyboards/hs60/v2/iso/config.h b/keyboards/hs60/v2/iso/config.h
index 9a9a4ed623..52cada51a6 100644
--- a/keyboards/hs60/v2/iso/config.h
+++ b/keyboards/hs60/v2/iso/config.h
@@ -52,7 +52,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
52 52
53#define IS31FL3733_I2C_ADDRESS_1 IS31FL3733_I2C_ADDRESS_GND_GND 53#define IS31FL3733_I2C_ADDRESS_1 IS31FL3733_I2C_ADDRESS_GND_GND
54#define IS31FL3733_DRIVER_COUNT 1 54#define IS31FL3733_DRIVER_COUNT 1
55#define RGB_MATRIX_LED_COUNT 64 55#define IS31FL3733_LED_COUNT 64
56 56
57// These define which keys in the matrix are alphas/mods 57// These define which keys in the matrix are alphas/mods
58// Used for backlight effects so colors are different for 58// Used for backlight effects so colors are different for
diff --git a/keyboards/input_club/k_type/config.h b/keyboards/input_club/k_type/config.h
index d6abd39a83..c188038a82 100644
--- a/keyboards/input_club/k_type/config.h
+++ b/keyboards/input_club/k_type/config.h
@@ -34,7 +34,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
34//#define NO_ACTION_ONESHOT 34//#define NO_ACTION_ONESHOT
35 35
36#ifdef RGB_MATRIX_ENABLE 36#ifdef RGB_MATRIX_ENABLE
37//#include "gpio.h"
38// RGB Matrix Animation modes. Explicitly enabled 37// RGB Matrix Animation modes. Explicitly enabled
39// For full list of effects, see: 38// For full list of effects, see:
40// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects 39// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects
@@ -106,7 +105,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
106# define IS31FL3733_I2C_ADDRESS_1 IS31FL3733_I2C_ADDRESS_GND_GND 105# define IS31FL3733_I2C_ADDRESS_1 IS31FL3733_I2C_ADDRESS_GND_GND
107# define IS31FL3733_I2C_ADDRESS_2 IS31FL3733_I2C_ADDRESS_GND_GND 106# define IS31FL3733_I2C_ADDRESS_2 IS31FL3733_I2C_ADDRESS_GND_GND
108# define IS31FL3733_DRIVER_COUNT 2 107# define IS31FL3733_DRIVER_COUNT 2
108# define IS31FL3733_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)
109# define DRIVER_1_LED_TOTAL 64 109# define DRIVER_1_LED_TOTAL 64
110# define DRIVER_2_LED_TOTAL 55 110# define DRIVER_2_LED_TOTAL 55
111# define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) 111# define RGB_MATRIX_LED_COUNT IS31FL3733_LED_COUNT
112#endif 112#endif
diff --git a/keyboards/input_club/k_type/i2c_master.h b/keyboards/input_club/k_type/i2c_master.h
index d4e9d6878f..db4f12e43c 100644
--- a/keyboards/input_club/k_type/i2c_master.h
+++ b/keyboards/input_club/k_type/i2c_master.h
@@ -26,6 +26,7 @@
26 26
27#include <ch.h> 27#include <ch.h>
28#include <hal.h> 28#include <hal.h>
29#include "gpio.h"
29 30
30#ifndef I2C_COUNT 31#ifndef I2C_COUNT
31# define I2C_COUNT 1 32# define I2C_COUNT 1
diff --git a/keyboards/input_club/k_type/is31fl3733-dual.c b/keyboards/input_club/k_type/is31fl3733-dual.c
index 54e9d76960..0b6c6a607c 100644
--- a/keyboards/input_club/k_type/is31fl3733-dual.c
+++ b/keyboards/input_club/k_type/is31fl3733-dual.c
@@ -60,6 +60,19 @@
60# define IS31FL3733_GLOBALCURRENT 0xFF 60# define IS31FL3733_GLOBALCURRENT 0xFF
61#endif 61#endif
62 62
63#ifndef IS31FL3733_SYNC_1
64# define IS31FL3733_SYNC_1 IS31FL3733_SYNC_NONE
65#endif
66#ifndef IS31FL3733_SYNC_2
67# define IS31FL3733_SYNC_2 IS31FL3733_SYNC_NONE
68#endif
69#ifndef IS31FL3733_SYNC_3
70# define IS31FL3733_SYNC_3 IS31FL3733_SYNC_NONE
71#endif
72#ifndef IS31FL3733_SYNC_4
73# define IS31FL3733_SYNC_4 IS31FL3733_SYNC_NONE
74#endif
75
63// Transfer buffer for TWITransmitData() 76// Transfer buffer for TWITransmitData()
64uint8_t g_twi_transfer_buffer[20]; 77uint8_t g_twi_transfer_buffer[20];
65 78
@@ -125,6 +138,24 @@ bool is31fl3733_write_pwm_buffer(uint8_t index, uint8_t addr, uint8_t *pwm_buffe
125 return true; 138 return true;
126} 139}
127 140
141void is31fl3733_init_drivers(void) {
142 i2c_init(&I2CD1, I2C1_SCL_PIN, I2C1_SDA_PIN);
143 is31fl3733_init(0, IS31FL3733_I2C_ADDRESS_1, IS31FL3733_SYNC_1);
144# ifdef USE_I2C2
145 i2c_init(&I2CD2, I2C2_SCL_PIN, I2C2_SDA_PIN);
146 is31fl3733_init(1, IS31FL3733_I2C_ADDRESS_2, IS31FL3733_SYNC_2);
147# endif
148
149 for (int i = 0; i < IS31FL3733_LED_COUNT; i++) {
150 is31fl3733_set_led_control_register(i, true, true, true);
151 }
152
153 is31fl3733_update_led_control_registers(IS31FL3733_I2C_ADDRESS_1, 0);
154# ifdef USE_I2C2
155 is31fl3733_update_led_control_registers(IS31FL3733_I2C_ADDRESS_2, 1);
156# endif
157}
158
128void is31fl3733_init(uint8_t bus, uint8_t addr, uint8_t sync) { 159void is31fl3733_init(uint8_t bus, uint8_t addr, uint8_t sync) {
129 // In order to avoid the LEDs being driven with garbage data 160 // In order to avoid the LEDs being driven with garbage data
130 // in the LED driver's PWM registers, shutdown is enabled last. 161 // in the LED driver's PWM registers, shutdown is enabled last.
@@ -173,7 +204,7 @@ void is31fl3733_init(uint8_t bus, uint8_t addr, uint8_t sync) {
173 204
174void is31fl3733_set_color(int index, uint8_t red, uint8_t green, uint8_t blue) { 205void is31fl3733_set_color(int index, uint8_t red, uint8_t green, uint8_t blue) {
175 is31fl3733_led_t led; 206 is31fl3733_led_t led;
176 if (index >= 0 && index < RGB_MATRIX_LED_COUNT) { 207 if (index >= 0 && index < IS31FL3733_LED_COUNT) {
177 memcpy_P(&led, (&g_is31fl3733_leds[index]), sizeof(led)); 208 memcpy_P(&led, (&g_is31fl3733_leds[index]), sizeof(led));
178 209
179 if (g_pwm_buffer[led.driver][led.r] == red && g_pwm_buffer[led.driver][led.g] == green && g_pwm_buffer[led.driver][led.b] == blue) { 210 if (g_pwm_buffer[led.driver][led.r] == red && g_pwm_buffer[led.driver][led.g] == green && g_pwm_buffer[led.driver][led.b] == blue) {
@@ -187,7 +218,7 @@ void is31fl3733_set_color(int index, uint8_t red, uint8_t green, uint8_t blue) {
187} 218}
188 219
189void is31fl3733_set_color_all(uint8_t red, uint8_t green, uint8_t blue) { 220void is31fl3733_set_color_all(uint8_t red, uint8_t green, uint8_t blue) {
190 for (int i = 0; i < RGB_MATRIX_LED_COUNT; i++) { 221 for (int i = 0; i < IS31FL3733_LED_COUNT; i++) {
191 is31fl3733_set_color(i, red, green, blue); 222 is31fl3733_set_color(i, red, green, blue);
192 } 223 }
193} 224}
diff --git a/keyboards/input_club/k_type/is31fl3733-dual.h b/keyboards/input_club/k_type/is31fl3733-dual.h
index 33943af320..696c234b67 100644
--- a/keyboards/input_club/k_type/is31fl3733-dual.h
+++ b/keyboards/input_club/k_type/is31fl3733-dual.h
@@ -46,8 +46,9 @@ typedef struct is31fl3733_led_t {
46 uint8_t b; 46 uint8_t b;
47} __attribute__((packed)) is31fl3733_led_t; 47} __attribute__((packed)) is31fl3733_led_t;
48 48
49extern const is31fl3733_led_t PROGMEM g_is31fl3733_leds[RGB_MATRIX_LED_COUNT]; 49extern const is31fl3733_led_t PROGMEM g_is31fl3733_leds[IS31FL3733_LED_COUNT];
50 50
51void is31fl3733_init_drivers(void);
51void is31fl3733_init(uint8_t bus, uint8_t addr, uint8_t sync); 52void is31fl3733_init(uint8_t bus, uint8_t addr, uint8_t sync);
52bool is31fl3733_write_register(uint8_t index, uint8_t addr, uint8_t reg, uint8_t data); 53bool is31fl3733_write_register(uint8_t index, uint8_t addr, uint8_t reg, uint8_t data);
53bool is31fl3733_write_pwm_buffer(uint8_t index, uint8_t addr, uint8_t *pwm_buffer); 54bool is31fl3733_write_pwm_buffer(uint8_t index, uint8_t addr, uint8_t *pwm_buffer);
@@ -80,6 +81,10 @@ void is31fl3733_flush(void);
80#define IS31FL3733_PWM_FREQUENCY_2K1_HZ 0x03 81#define IS31FL3733_PWM_FREQUENCY_2K1_HZ 0x03
81#define IS31FL3733_PWM_FREQUENCY_1K05_HZ 0x04 82#define IS31FL3733_PWM_FREQUENCY_1K05_HZ 0x04
82 83
84#define IS31FL3733_SYNC_NONE 0b00
85#define IS31FL3733_SYNC_MASTER 0b01
86#define IS31FL3733_SYNC_SLAVE 0b10
87
83#define A_1 0x00 88#define A_1 0x00
84#define A_2 0x01 89#define A_2 0x01
85#define A_3 0x02 90#define A_3 0x02
diff --git a/keyboards/input_club/k_type/k_type-rgbdriver.c b/keyboards/input_club/k_type/k_type-rgbdriver.c
index 1e8132e6dc..e4d2d2d04b 100644
--- a/keyboards/input_club/k_type/k_type-rgbdriver.c
+++ b/keyboards/input_club/k_type/k_type-rgbdriver.c
@@ -16,30 +16,10 @@
16 16
17#ifdef RGB_MATRIX_ENABLE 17#ifdef RGB_MATRIX_ENABLE
18# include "rgb_matrix.h" 18# include "rgb_matrix.h"
19# include "i2c_master.h"
20# include "is31fl3733-dual.h" 19# include "is31fl3733-dual.h"
21# include "gpio.h"
22
23static void init(void) {
24 i2c_init(&I2CD1, I2C1_SCL_PIN, I2C1_SDA_PIN);
25 is31fl3733_init(0, IS31FL3733_I2C_ADDRESS_1, 0);
26# ifdef USE_I2C2
27 i2c_init(&I2CD2, I2C2_SCL_PIN, I2C2_SDA_PIN);
28 is31fl3733_init(1, IS31FL3733_I2C_ADDRESS_2, 0);
29# endif
30 for (int index = 0; index < RGB_MATRIX_LED_COUNT; index++) {
31 bool enabled = true;
32 // This only caches it for later
33 is31fl3733_set_led_control_register(index, enabled, enabled, enabled);
34 }
35 is31fl3733_update_led_control_registers(IS31FL3733_I2C_ADDRESS_1, 0);
36# ifdef USE_I2C2
37 is31fl3733_update_led_control_registers(IS31FL3733_I2C_ADDRESS_2, 1);
38# endif
39}
40 20
41const rgb_matrix_driver_t rgb_matrix_driver = { 21const rgb_matrix_driver_t rgb_matrix_driver = {
42 .init = init, 22 .init = is31fl3733_init_drivers,
43 .flush = is31fl3733_flush, 23 .flush = is31fl3733_flush,
44 .set_color = is31fl3733_set_color, 24 .set_color = is31fl3733_set_color,
45 .set_color_all = is31fl3733_set_color_all, 25 .set_color_all = is31fl3733_set_color_all,
diff --git a/keyboards/input_club/k_type/k_type.c b/keyboards/input_club/k_type/k_type.c
index c6d06b51dc..e97007fc70 100644
--- a/keyboards/input_club/k_type/k_type.c
+++ b/keyboards/input_club/k_type/k_type.c
@@ -20,7 +20,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
20#ifdef RGB_MATRIX_ENABLE 20#ifdef RGB_MATRIX_ENABLE
21# include "is31fl3733-dual.h" 21# include "is31fl3733-dual.h"
22 22
23const is31fl3733_led_t PROGMEM g_is31fl3733_leds[RGB_MATRIX_LED_COUNT] = { 23const is31fl3733_led_t PROGMEM g_is31fl3733_leds[IS31FL3733_LED_COUNT] = {
24 { 0, B_1, A_1, C_1 }, 24 { 0, B_1, A_1, C_1 },
25 { 0, B_2, A_2, C_2 }, 25 { 0, B_2, A_2, C_2 },
26 { 0, B_3, A_3, C_3 }, 26 { 0, B_3, A_3, C_3 },
diff --git a/keyboards/input_club/k_type/post_rules.mk b/keyboards/input_club/k_type/post_rules.mk
index 897e422b05..ba750e2624 100644
--- a/keyboards/input_club/k_type/post_rules.mk
+++ b/keyboards/input_club/k_type/post_rules.mk
@@ -1,5 +1,5 @@
1ifeq ($(strip $(RGB_MATRIX_ENABLE)), yes) 1ifeq ($(strip $(RGB_MATRIX_ENABLE)), yes)
2 # Additional files for RGB lighting 2 # Additional files for RGB lighting
3 SRC += k_type-rgbdriver.c 3 SRC += k_type-rgbdriver.c is31fl3733-dual.c
4 QUANTUM_LIB_SRC += i2c_master.c is31fl3733-dual.c 4 QUANTUM_LIB_SRC += i2c_master.c
5endif 5endif
diff --git a/keyboards/keebwerk/mega/ansi/config.h b/keyboards/keebwerk/mega/ansi/config.h
index ee98c95636..c3b90cc2ca 100755
--- a/keyboards/keebwerk/mega/ansi/config.h
+++ b/keyboards/keebwerk/mega/ansi/config.h
@@ -53,7 +53,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
53#define IS31FL3733_I2C_ADDRESS_1 IS31FL3733_I2C_ADDRESS_GND_GND 53#define IS31FL3733_I2C_ADDRESS_1 IS31FL3733_I2C_ADDRESS_GND_GND
54#define IS31FL3733_I2C_ADDRESS_2 IS31FL3733_I2C_ADDRESS_GND_SDA 54#define IS31FL3733_I2C_ADDRESS_2 IS31FL3733_I2C_ADDRESS_GND_SDA
55#define IS31FL3733_DRIVER_COUNT 2 55#define IS31FL3733_DRIVER_COUNT 2
56#define RGB_MATRIX_LED_COUNT 128 56#define IS31FL3733_LED_COUNT 128
57 57
58// These define which keys in the matrix are alphas/mods 58// These define which keys in the matrix are alphas/mods
59// Used for backlight effects so colors are different for 59// Used for backlight effects so colors are different for
diff --git a/keyboards/kprepublic/bm60hsrgb/rev2/config.h b/keyboards/kprepublic/bm60hsrgb/rev2/config.h
index 9349838622..8d194f5ccb 100644
--- a/keyboards/kprepublic/bm60hsrgb/rev2/config.h
+++ b/keyboards/kprepublic/bm60hsrgb/rev2/config.h
@@ -74,7 +74,7 @@
74 74
75#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 120 75#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 120
76 76
77#define ISSI_LED_TOTAL DRIVER_1_LED_TOTAL 77#define IS31FL3733_LED_COUNT DRIVER_1_LED_TOTAL
78 78
79// Underglow LEDs are WS2812, but someone might want to use RGBLIGHT for them; 79// Underglow LEDs are WS2812, but someone might want to use RGBLIGHT for them;
80// don't use those LEDs in RGB Matrix in that case. 80// don't use those LEDs in RGB Matrix in that case.
@@ -84,7 +84,7 @@
84# define WS2812_LED_TOTAL 6 84# define WS2812_LED_TOTAL 6
85#endif 85#endif
86 86
87#define RGB_MATRIX_LED_COUNT (ISSI_LED_TOTAL + WS2812_LED_TOTAL) 87#define RGB_MATRIX_LED_COUNT (IS31FL3733_LED_COUNT + WS2812_LED_TOTAL)
88 88
89#ifdef RGB_MATRIX_ENABLE 89#ifdef RGB_MATRIX_ENABLE
90# define RGB_MATRIX_KEYPRESSES 90# define RGB_MATRIX_KEYPRESSES
diff --git a/keyboards/kprepublic/bm60hsrgb/rev2/rev2.c b/keyboards/kprepublic/bm60hsrgb/rev2/rev2.c
index 8b786d7cfb..0e9b3d318d 100644
--- a/keyboards/kprepublic/bm60hsrgb/rev2/rev2.c
+++ b/keyboards/kprepublic/bm60hsrgb/rev2/rev2.c
@@ -22,7 +22,7 @@
22# include "is31fl3733.h" 22# include "is31fl3733.h"
23# include "ws2812.h" 23# include "ws2812.h"
24 24
25const is31fl3733_led_t PROGMEM g_is31fl3733_leds[RGB_MATRIX_LED_COUNT] = { 25const is31fl3733_led_t PROGMEM g_is31fl3733_leds[IS31FL3733_LED_COUNT] = {
26 { 0, B_1, A_1, C_1 }, 26 { 0, B_1, A_1, C_1 },
27 { 0, B_2, A_2, C_2 }, 27 { 0, B_2, A_2, C_2 },
28 { 0, B_3, A_3, C_3 }, 28 { 0, B_3, A_3, C_3 },
@@ -153,8 +153,8 @@ rgb_led_t rgb_matrix_ws2812_array[WS2812_LED_TOTAL];
153 153
154static void rgb_matrix_driver_init(void) { 154static void rgb_matrix_driver_init(void) {
155 i2c_init(); 155 i2c_init();
156 is31fl3733_init(IS31FL3733_I2C_ADDRESS_1, 0); 156 is31fl3733_init(IS31FL3733_I2C_ADDRESS_1, IS31FL3733_SYNC_NONE);
157 for (uint8_t index = 0; index < ISSI_LED_TOTAL; index++) { 157 for (uint8_t index = 0; index < IS31FL3733_LED_COUNT; index++) {
158 bool enabled = true; 158 bool enabled = true;
159 is31fl3733_set_led_control_register(index, enabled, enabled, enabled); 159 is31fl3733_set_led_control_register(index, enabled, enabled, enabled);
160 } 160 }
@@ -169,13 +169,13 @@ static void rgb_matrix_driver_flush(void) {
169} 169}
170 170
171static void rgb_matrix_driver_set_color(int index, uint8_t red, uint8_t green, uint8_t blue) { 171static void rgb_matrix_driver_set_color(int index, uint8_t red, uint8_t green, uint8_t blue) {
172 if (index < ISSI_LED_TOTAL) { 172 if (index < IS31FL3733_LED_COUNT) {
173 is31fl3733_set_color(index, red, green, blue); 173 is31fl3733_set_color(index, red, green, blue);
174 } else { 174 } else {
175# if WS2812_LED_TOTAL > 0 175# if WS2812_LED_TOTAL > 0
176 rgb_matrix_ws2812_array[index - ISSI_LED_TOTAL].r = red; 176 rgb_matrix_ws2812_array[index - IS31FL3733_LED_COUNT].r = red;
177 rgb_matrix_ws2812_array[index - ISSI_LED_TOTAL].g = green; 177 rgb_matrix_ws2812_array[index - IS31FL3733_LED_COUNT].g = green;
178 rgb_matrix_ws2812_array[index - ISSI_LED_TOTAL].b = blue; 178 rgb_matrix_ws2812_array[index - IS31FL3733_LED_COUNT].b = blue;
179# endif 179# endif
180 } 180 }
181} 181}
diff --git a/keyboards/kprepublic/bm60hsrgb_iso/rev2/config.h b/keyboards/kprepublic/bm60hsrgb_iso/rev2/config.h
index acd30f0659..b22c384460 100644
--- a/keyboards/kprepublic/bm60hsrgb_iso/rev2/config.h
+++ b/keyboards/kprepublic/bm60hsrgb_iso/rev2/config.h
@@ -82,7 +82,7 @@
82// IS31FL3733+WS2812 driver setup used by this board the LED controller drivers 82// IS31FL3733+WS2812 driver setup used by this board the LED controller drivers
83// are compiled unconditionally). 83// are compiled unconditionally).
84 84
85#define ISSI_LED_TOTAL DRIVER_1_LED_TOTAL 85#define IS31FL3733_LED_COUNT DRIVER_1_LED_TOTAL
86 86
87#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 180 87#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 180
88 88
@@ -94,7 +94,7 @@
94# define WS2812_LED_TOTAL 6 94# define WS2812_LED_TOTAL 6
95#endif 95#endif
96 96
97#define RGB_MATRIX_LED_COUNT (ISSI_LED_TOTAL + WS2812_LED_TOTAL) 97#define RGB_MATRIX_LED_COUNT (IS31FL3733_LED_COUNT + WS2812_LED_TOTAL)
98 98
99#ifdef RGB_MATRIX_ENABLE 99#ifdef RGB_MATRIX_ENABLE
100# define RGB_MATRIX_KEYPRESSES 100# define RGB_MATRIX_KEYPRESSES
diff --git a/keyboards/kprepublic/bm60hsrgb_iso/rev2/rev2.c b/keyboards/kprepublic/bm60hsrgb_iso/rev2/rev2.c
index 02dd4ab6ce..2cfe18e08e 100644
--- a/keyboards/kprepublic/bm60hsrgb_iso/rev2/rev2.c
+++ b/keyboards/kprepublic/bm60hsrgb_iso/rev2/rev2.c
@@ -24,7 +24,7 @@
24# include "ws2812.h" 24# include "ws2812.h"
25 25
26 26
27const PROGMEM is31fl3733_led_t g_is31fl3733_leds[RGB_MATRIX_LED_COUNT] = { 27const PROGMEM is31fl3733_led_t g_is31fl3733_leds[IS31FL3733_LED_COUNT] = {
28 { 0, B_1, A_1, C_1 }, 28 { 0, B_1, A_1, C_1 },
29 { 0, B_2, A_2, C_2 }, 29 { 0, B_2, A_2, C_2 },
30 { 0, B_3, A_3, C_3 }, 30 { 0, B_3, A_3, C_3 },
@@ -153,8 +153,8 @@ rgb_led_t rgb_matrix_ws2812_array[WS2812_LED_TOTAL];
153 153
154static void rgb_matrix_driver_init(void) { 154static void rgb_matrix_driver_init(void) {
155 i2c_init(); 155 i2c_init();
156 is31fl3733_init(IS31FL3733_I2C_ADDRESS_1, 0); 156 is31fl3733_init(IS31FL3733_I2C_ADDRESS_1, IS31FL3733_SYNC_NONE);
157 for (uint8_t index = 0; index < ISSI_LED_TOTAL; index++) { 157 for (uint8_t index = 0; index < IS31FL3733_LED_COUNT; index++) {
158 bool enabled = true; 158 bool enabled = true;
159 is31fl3733_set_led_control_register(index, enabled, enabled, enabled); 159 is31fl3733_set_led_control_register(index, enabled, enabled, enabled);
160 } 160 }
@@ -169,13 +169,13 @@ static void rgb_matrix_driver_flush(void) {
169} 169}
170 170
171static void rgb_matrix_driver_set_color(int index, uint8_t red, uint8_t green, uint8_t blue) { 171static void rgb_matrix_driver_set_color(int index, uint8_t red, uint8_t green, uint8_t blue) {
172 if (index < ISSI_LED_TOTAL) { 172 if (index < IS31FL3733_LED_COUNT) {
173 is31fl3733_set_color(index, red, green, blue); 173 is31fl3733_set_color(index, red, green, blue);
174 } else { 174 } else {
175# if WS2812_LED_TOTAL > 0 175# if WS2812_LED_TOTAL > 0
176 rgb_matrix_ws2812_array[index - ISSI_LED_TOTAL].r = red; 176 rgb_matrix_ws2812_array[index - IS31FL3733_LED_COUNT].r = red;
177 rgb_matrix_ws2812_array[index - ISSI_LED_TOTAL].g = green; 177 rgb_matrix_ws2812_array[index - IS31FL3733_LED_COUNT].g = green;
178 rgb_matrix_ws2812_array[index - ISSI_LED_TOTAL].b = blue; 178 rgb_matrix_ws2812_array[index - IS31FL3733_LED_COUNT].b = blue;
179# endif 179# endif
180 } 180 }
181} 181}
diff --git a/keyboards/kprepublic/bm60hsrgb_poker/rev2/config.h b/keyboards/kprepublic/bm60hsrgb_poker/rev2/config.h
index 7fd7575148..57cb40dc24 100644
--- a/keyboards/kprepublic/bm60hsrgb_poker/rev2/config.h
+++ b/keyboards/kprepublic/bm60hsrgb_poker/rev2/config.h
@@ -81,7 +81,7 @@
81#define IS31FL3733_I2C_ADDRESS_1 IS31FL3733_I2C_ADDRESS_GND_GND 81#define IS31FL3733_I2C_ADDRESS_1 IS31FL3733_I2C_ADDRESS_GND_GND
82#define DRIVER_1_LED_TOTAL 61 82#define DRIVER_1_LED_TOTAL 61
83 83
84#define ISSI_LED_TOTAL DRIVER_1_LED_TOTAL 84#define IS31FL3733_LED_COUNT DRIVER_1_LED_TOTAL
85 85
86// Underglow LEDs are WS2812, but someone might want to use RGBLIGHT for them; 86// Underglow LEDs are WS2812, but someone might want to use RGBLIGHT for them;
87// don't use those LEDs in RGB Matrix in that case. 87// don't use those LEDs in RGB Matrix in that case.
@@ -91,7 +91,7 @@
91# define WS2812_LED_TOTAL 6 91# define WS2812_LED_TOTAL 6
92#endif 92#endif
93 93
94#define RGB_MATRIX_LED_COUNT (ISSI_LED_TOTAL + WS2812_LED_TOTAL) 94#define RGB_MATRIX_LED_COUNT (IS31FL3733_LED_COUNT + WS2812_LED_TOTAL)
95 95
96#ifdef RGB_MATRIX_ENABLE 96#ifdef RGB_MATRIX_ENABLE
97# define RGB_MATRIX_KEYPRESSES 97# define RGB_MATRIX_KEYPRESSES
diff --git a/keyboards/kprepublic/bm60hsrgb_poker/rev2/rev2.c b/keyboards/kprepublic/bm60hsrgb_poker/rev2/rev2.c
index f76c45e6c5..2e66a3096e 100644
--- a/keyboards/kprepublic/bm60hsrgb_poker/rev2/rev2.c
+++ b/keyboards/kprepublic/bm60hsrgb_poker/rev2/rev2.c
@@ -21,7 +21,7 @@
21# include "is31fl3733.h" 21# include "is31fl3733.h"
22# include "ws2812.h" 22# include "ws2812.h"
23 23
24const is31fl3733_led_t PROGMEM g_is31fl3733_leds[RGB_MATRIX_LED_COUNT] = { 24const is31fl3733_led_t PROGMEM g_is31fl3733_leds[IS31FL3733_LED_COUNT] = {
25 { 0, B_1, A_1, C_1 }, 25 { 0, B_1, A_1, C_1 },
26 { 0, B_2, A_2, C_2 }, 26 { 0, B_2, A_2, C_2 },
27 { 0, B_3, A_3, C_3 }, 27 { 0, B_3, A_3, C_3 },
@@ -149,8 +149,8 @@ rgb_led_t rgb_matrix_ws2812_array[WS2812_LED_TOTAL];
149 149
150static void rgb_matrix_driver_init(void) { 150static void rgb_matrix_driver_init(void) {
151 i2c_init(); 151 i2c_init();
152 is31fl3733_init(IS31FL3733_I2C_ADDRESS_1, 0); 152 is31fl3733_init(IS31FL3733_I2C_ADDRESS_1, IS31FL3733_SYNC_NONE);
153 for (uint8_t index = 0; index < ISSI_LED_TOTAL; index++) { 153 for (uint8_t index = 0; index < IS31FL3733_LED_COUNT; index++) {
154 bool enabled = true; 154 bool enabled = true;
155 is31fl3733_set_led_control_register(index, enabled, enabled, enabled); 155 is31fl3733_set_led_control_register(index, enabled, enabled, enabled);
156 } 156 }
@@ -165,13 +165,13 @@ static void rgb_matrix_driver_flush(void) {
165} 165}
166 166
167static void rgb_matrix_driver_set_color(int index, uint8_t red, uint8_t green, uint8_t blue) { 167static void rgb_matrix_driver_set_color(int index, uint8_t red, uint8_t green, uint8_t blue) {
168 if (index < ISSI_LED_TOTAL) { 168 if (index < IS31FL3733_LED_COUNT) {
169 is31fl3733_set_color(index, red, green, blue); 169 is31fl3733_set_color(index, red, green, blue);
170 } else { 170 } else {
171# if WS2812_LED_TOTAL > 0 171# if WS2812_LED_TOTAL > 0
172 rgb_matrix_ws2812_array[index - ISSI_LED_TOTAL].r = red; 172 rgb_matrix_ws2812_array[index - IS31FL3733_LED_COUNT].r = red;
173 rgb_matrix_ws2812_array[index - ISSI_LED_TOTAL].g = green; 173 rgb_matrix_ws2812_array[index - IS31FL3733_LED_COUNT].g = green;
174 rgb_matrix_ws2812_array[index - ISSI_LED_TOTAL].b = blue; 174 rgb_matrix_ws2812_array[index - IS31FL3733_LED_COUNT].b = blue;
175# endif 175# endif
176 } 176 }
177} 177}
diff --git a/keyboards/matrix/m20add/config.h b/keyboards/matrix/m20add/config.h
index aba2357357..51b050ca7c 100644
--- a/keyboards/matrix/m20add/config.h
+++ b/keyboards/matrix/m20add/config.h
@@ -80,4 +80,4 @@
80 80
81#define IS31FL3731_I2C_ADDRESS_1 IS31FL3731_I2C_ADDRESS_GND 81#define IS31FL3731_I2C_ADDRESS_1 IS31FL3731_I2C_ADDRESS_GND
82#define IS31FL3731_DRIVER_COUNT 1 82#define IS31FL3731_DRIVER_COUNT 1
83#define RGB_MATRIX_LED_COUNT 20 83#define IS31FL3731_LED_COUNT 20
diff --git a/keyboards/matrix/m20add/rgb_ring.c b/keyboards/matrix/m20add/rgb_ring.c
index 553a3d5360..f3fbe83d72 100644
--- a/keyboards/matrix/m20add/rgb_ring.c
+++ b/keyboards/matrix/m20add/rgb_ring.c
@@ -30,7 +30,7 @@
30#endif 30#endif
31// rgb ring leds setting 31// rgb ring leds setting
32 32
33const is31fl3731_led_t PROGMEM g_is31fl3731_leds[RGB_MATRIX_LED_COUNT] = { 33const is31fl3731_led_t PROGMEM g_is31fl3731_leds[IS31FL3731_LED_COUNT] = {
34/* Refer to IS31 manual for these locations 34/* Refer to IS31 manual for these locations
35 * driver 35 * driver
36 * | R location 36 * | R location
@@ -371,13 +371,7 @@ void rgblight_call_driver(rgb_led_t *start_led, uint8_t num_leds)
371 371
372void rgb_ring_init(void) 372void rgb_ring_init(void)
373{ 373{
374 i2c_init(); 374 is31fl3731_init_drivers();
375 is31fl3731_init(IS31FL3731_I2C_ADDRESS_1);
376 for (int index = 0; index < RGB_MATRIX_LED_COUNT; index++) {
377 bool enabled = true;
378 is31fl3731_set_led_control_register(index, enabled, enabled, enabled);
379 }
380 is31fl3731_update_led_control_registers(IS31FL3731_I2C_ADDRESS_1, 0);
381} 375}
382 376
383void rgb_ring_task(void) 377void rgb_ring_task(void)
diff --git a/keyboards/neson_design/700e/700e.c b/keyboards/neson_design/700e/700e.c
index d4aa336edb..9def73d6a4 100644
--- a/keyboards/neson_design/700e/700e.c
+++ b/keyboards/neson_design/700e/700e.c
@@ -111,7 +111,7 @@ static void self_testing(void)
111 } 111 }
112 112
113 if (rgb_state.index >= ST_LEFT_END) { 113 if (rgb_state.index >= ST_LEFT_END) {
114 for (int i = rgb_state.index - 1; i < RGB_MATRIX_LED_COUNT - rgb_state.index + 1; i++) { 114 for (int i = rgb_state.index - 1; i < IS31FL3731_LED_COUNT - rgb_state.index + 1; i++) {
115 is31fl3731_set_color(i, led.r, led.g, led.b); 115 is31fl3731_set_color(i, led.r, led.g, led.b);
116 } 116 }
117 if (rgb_state.index == ST_LEFT_END) { 117 if (rgb_state.index == ST_LEFT_END) {
@@ -173,13 +173,13 @@ static void self_testing(void)
173 } 173 }
174 break; 174 break;
175 case ST_STAGE_3: 175 case ST_STAGE_3:
176 if (rgb_state.index != RGB_MATRIX_LED_COUNT/2) { 176 if (rgb_state.index != IS31FL3731_LED_COUNT/2) {
177 is31fl3731_set_color_all(0, 0, 0); 177 is31fl3731_set_color_all(0, 0, 0);
178 } 178 }
179 179
180 // light left and right 180 // light left and right
181 181
182 if (rgb_state.index == RGB_MATRIX_LED_COUNT/2) { 182 if (rgb_state.index == IS31FL3731_LED_COUNT/2) {
183 if (rgb_state.duration) { 183 if (rgb_state.duration) {
184 rgb_state.duration--; 184 rgb_state.duration--;
185 } else { 185 } else {
@@ -207,7 +207,7 @@ static void self_testing(void)
207 update_ticks(); 207 update_ticks();
208} 208}
209 209
210const is31fl3731_led_t PROGMEM g_is31fl3731_leds[RGB_MATRIX_LED_COUNT] = { 210const is31fl3731_led_t PROGMEM g_is31fl3731_leds[IS31FL3731_LED_COUNT] = {
211 /* Refer to IS31 manual for these locations 211 /* Refer to IS31 manual for these locations
212 * driver 212 * driver
213 * | R location 213 * | R location
@@ -294,18 +294,8 @@ void matrix_init_kb(void)
294 setPinOutput(LED_CAPS_LOCK_PIN); 294 setPinOutput(LED_CAPS_LOCK_PIN);
295 writePinLow(LED_CAPS_LOCK_PIN); 295 writePinLow(LED_CAPS_LOCK_PIN);
296 296
297 i2c_init(); 297 is31fl3731_init_drivers();
298 is31fl3731_init(IS31FL3731_I2C_ADDRESS_1); 298
299#ifdef IS31FL3731_I2C_ADDRESS_2
300 is31fl3731_init(IS31FL3731_I2C_ADDRESS_2);
301#endif
302 for (int index = 0; index < RGB_MATRIX_LED_COUNT; index++) {
303 is31fl3731_set_led_control_register(index, true, true, true);
304 }
305 is31fl3731_update_led_control_registers(IS31FL3731_I2C_ADDRESS_1, 0);
306#ifdef IS31FL3731_I2C_ADDRESS_2
307 is31fl3731_update_led_control_registers(IS31FL3731_I2C_ADDRESS_2, 1);
308#endif
309 update_ticks(); 299 update_ticks();
310 matrix_init_user(); 300 matrix_init_user();
311} 301}
@@ -350,16 +340,16 @@ void rgblight_call_driver(rgb_led_t *start_led, uint8_t num_leds)
350{ 340{
351 if (rgb_state.state != NORMAL) return; 341 if (rgb_state.state != NORMAL) return;
352 342
353 for (uint8_t i = 0; i < RGB_MATRIX_LED_COUNT; i++) { 343 for (uint8_t i = 0; i < IS31FL3731_LED_COUNT; i++) {
354 is31fl3731_set_color(i, start_led[i].r, start_led[i].g, start_led[i].b); 344 is31fl3731_set_color(i, start_led[i].r, start_led[i].g, start_led[i].b);
355 } 345 }
356 rgb_led_t leds[4]; 346 rgb_led_t leds[4];
357 for (int i = 0; i < 4; i++) { 347 for (int i = 0; i < 4; i++) {
358 leds[i].r = start_led[RGB_MATRIX_LED_COUNT+i].g; 348 leds[i].r = start_led[IS31FL3731_LED_COUNT+i].g;
359 leds[i].g = start_led[RGB_MATRIX_LED_COUNT+i].r; 349 leds[i].g = start_led[IS31FL3731_LED_COUNT+i].r;
360 leds[i].b = start_led[RGB_MATRIX_LED_COUNT+i].b; 350 leds[i].b = start_led[IS31FL3731_LED_COUNT+i].b;
361 } 351 }
362 //ws2812_setleds(start_led+RGB_MATRIX_LED_COUNT, 4); 352 //ws2812_setleds(start_led+IS31FL3731_LED_COUNT, 4);
363 ws2812_setleds(leds, 4); 353 ws2812_setleds(leds, 4);
364} 354}
365 355
diff --git a/keyboards/neson_design/700e/config.h b/keyboards/neson_design/700e/config.h
index bd1d9888ec..4cecb6165a 100644
--- a/keyboards/neson_design/700e/config.h
+++ b/keyboards/neson_design/700e/config.h
@@ -35,6 +35,6 @@
35#define IS31FL3731_I2C_ADDRESS_1 IS31FL3731_I2C_ADDRESS_GND 35#define IS31FL3731_I2C_ADDRESS_1 IS31FL3731_I2C_ADDRESS_GND
36#define IS31FL3731_I2C_ADDRESS_2 IS31FL3731_I2C_ADDRESS_VCC 36#define IS31FL3731_I2C_ADDRESS_2 IS31FL3731_I2C_ADDRESS_VCC
37#define IS31FL3731_DRIVER_COUNT 2 37#define IS31FL3731_DRIVER_COUNT 2
38#define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL+DRIVER_2_LED_TOTAL) 38#define IS31FL3731_LED_COUNT (DRIVER_1_LED_TOTAL+DRIVER_2_LED_TOTAL)
39 39
40#define USB_SUSPEND_WAKEUP_DELAY 1000 40#define USB_SUSPEND_WAKEUP_DELAY 1000
diff --git a/keyboards/neson_design/n6/config.h b/keyboards/neson_design/n6/config.h
index 22a25a0d92..847b26eb25 100644
--- a/keyboards/neson_design/n6/config.h
+++ b/keyboards/neson_design/n6/config.h
@@ -35,4 +35,4 @@
35#define IS31FL3731_I2C_ADDRESS_1 IS31FL3731_I2C_ADDRESS_GND 35#define IS31FL3731_I2C_ADDRESS_1 IS31FL3731_I2C_ADDRESS_GND
36#define IS31FL3731_I2C_ADDRESS_2 IS31FL3731_I2C_ADDRESS_VCC 36#define IS31FL3731_I2C_ADDRESS_2 IS31FL3731_I2C_ADDRESS_VCC
37#define IS31FL3731_DRIVER_COUNT 2 37#define IS31FL3731_DRIVER_COUNT 2
38#define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL+DRIVER_2_LED_TOTAL) 38#define IS31FL3731_LED_COUNT (DRIVER_1_LED_TOTAL+DRIVER_2_LED_TOTAL)
diff --git a/keyboards/neson_design/n6/n6.c b/keyboards/neson_design/n6/n6.c
index 5f3ae3a169..38b634eeb7 100644
--- a/keyboards/neson_design/n6/n6.c
+++ b/keyboards/neson_design/n6/n6.c
@@ -115,7 +115,7 @@ static void self_testing(void)
115 } 115 }
116 116
117 if (rgb_state.index >= ST_LEFT_END) { 117 if (rgb_state.index >= ST_LEFT_END) {
118 for (int i = rgb_state.index - 1; i < RGB_MATRIX_LED_COUNT - rgb_state.index + 1; i++) { 118 for (int i = rgb_state.index - 1; i < IS31FL3731_LED_COUNT - rgb_state.index + 1; i++) {
119 is31fl3731_set_color(i, led.r, led.g, led.b); 119 is31fl3731_set_color(i, led.r, led.g, led.b);
120 } 120 }
121 if (rgb_state.index == ST_LEFT_END) { 121 if (rgb_state.index == ST_LEFT_END) {
@@ -177,13 +177,13 @@ static void self_testing(void)
177 } 177 }
178 break; 178 break;
179 case ST_STAGE_3: 179 case ST_STAGE_3:
180 if (rgb_state.index != RGB_MATRIX_LED_COUNT/2) { 180 if (rgb_state.index != IS31FL3731_LED_COUNT/2) {
181 is31fl3731_set_color_all(0, 0, 0); 181 is31fl3731_set_color_all(0, 0, 0);
182 } 182 }
183 183
184 // light left and right 184 // light left and right
185 185
186 if (rgb_state.index == RGB_MATRIX_LED_COUNT/2) { 186 if (rgb_state.index == IS31FL3731_LED_COUNT/2) {
187 if (rgb_state.duration) { 187 if (rgb_state.duration) {
188 rgb_state.duration--; 188 rgb_state.duration--;
189 } else { 189 } else {
@@ -211,7 +211,7 @@ static void self_testing(void)
211 update_ticks(); 211 update_ticks();
212} 212}
213 213
214const is31fl3731_led_t PROGMEM g_is31fl3731_leds[RGB_MATRIX_LED_COUNT] = { 214const is31fl3731_led_t PROGMEM g_is31fl3731_leds[IS31FL3731_LED_COUNT] = {
215 /* Refer to IS31 manual for these locations 215 /* Refer to IS31 manual for these locations
216 * driver 216 * driver
217 * | R location 217 * | R location
@@ -298,18 +298,8 @@ void matrix_init_kb(void)
298 setPinOutput(LED_CAPS_LOCK_PIN); 298 setPinOutput(LED_CAPS_LOCK_PIN);
299 writePinLow(LED_CAPS_LOCK_PIN); 299 writePinLow(LED_CAPS_LOCK_PIN);
300 300
301 i2c_init(); 301 is31fl3731_init_drivers();
302 is31fl3731_init(IS31FL3731_I2C_ADDRESS_1); 302
303#ifdef IS31FL3731_I2C_ADDRESS_2
304 is31fl3731_init(IS31FL3731_I2C_ADDRESS_2);
305#endif
306 for (int index = 0; index < RGB_MATRIX_LED_COUNT; index++) {
307 is31fl3731_set_led_control_register(index, true, true, true);
308 }
309 is31fl3731_update_led_control_registers(IS31FL3731_I2C_ADDRESS_1, 0);
310#ifdef IS31FL3731_I2C_ADDRESS_2
311 is31fl3731_update_led_control_registers(IS31FL3731_I2C_ADDRESS_2, 1);
312#endif
313 update_ticks(); 303 update_ticks();
314 matrix_init_user(); 304 matrix_init_user();
315} 305}
@@ -352,10 +342,10 @@ void rgblight_call_driver(rgb_led_t *start_led, uint8_t num_leds)
352{ 342{
353 if (rgb_state.state != NORMAL) return; 343 if (rgb_state.state != NORMAL) return;
354 344
355 for (uint8_t i = 0; i < RGB_MATRIX_LED_COUNT; i++) { 345 for (uint8_t i = 0; i < IS31FL3731_LED_COUNT; i++) {
356 is31fl3731_set_color(i, start_led[i].r, start_led[i].g, start_led[i].b); 346 is31fl3731_set_color(i, start_led[i].r, start_led[i].g, start_led[i].b);
357 } 347 }
358 ws2812_setleds(start_led+RGB_MATRIX_LED_COUNT, 1); 348 ws2812_setleds(start_led+IS31FL3731_LED_COUNT, 1);
359} 349}
360 350
361bool led_update_kb(led_t led_state) 351bool led_update_kb(led_t led_state)
diff --git a/keyboards/novelkeys/nk65/config.h b/keyboards/novelkeys/nk65/config.h
index 4dc1ab9165..bbba5cd7d8 100755
--- a/keyboards/novelkeys/nk65/config.h
+++ b/keyboards/novelkeys/nk65/config.h
@@ -53,7 +53,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
53#define IS31FL3733_I2C_ADDRESS_1 IS31FL3733_I2C_ADDRESS_GND_GND 53#define IS31FL3733_I2C_ADDRESS_1 IS31FL3733_I2C_ADDRESS_GND_GND
54#define IS31FL3733_I2C_ADDRESS_2 IS31FL3733_I2C_ADDRESS_GND_SDA 54#define IS31FL3733_I2C_ADDRESS_2 IS31FL3733_I2C_ADDRESS_GND_SDA
55#define IS31FL3733_DRIVER_COUNT 2 55#define IS31FL3733_DRIVER_COUNT 2
56#define RGB_MATRIX_LED_COUNT 128 56#define IS31FL3733_LED_COUNT 128
57 57
58// These define which keys in the matrix are alphas/mods 58// These define which keys in the matrix are alphas/mods
59// Used for backlight effects so colors are different for 59// Used for backlight effects so colors are different for
diff --git a/keyboards/novelkeys/nk87/config.h b/keyboards/novelkeys/nk87/config.h
index 3b3e9309c1..41ecb8a8e3 100755
--- a/keyboards/novelkeys/nk87/config.h
+++ b/keyboards/novelkeys/nk87/config.h
@@ -53,7 +53,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
53#define IS31FL3733_I2C_ADDRESS_1 IS31FL3733_I2C_ADDRESS_GND_GND 53#define IS31FL3733_I2C_ADDRESS_1 IS31FL3733_I2C_ADDRESS_GND_GND
54#define IS31FL3733_I2C_ADDRESS_2 IS31FL3733_I2C_ADDRESS_GND_SDA 54#define IS31FL3733_I2C_ADDRESS_2 IS31FL3733_I2C_ADDRESS_GND_SDA
55#define IS31FL3733_DRIVER_COUNT 2 55#define IS31FL3733_DRIVER_COUNT 2
56#define RGB_MATRIX_LED_COUNT 128 56#define IS31FL3733_LED_COUNT 128
57 57
58// These define which keys in the matrix are alphas/mods 58// These define which keys in the matrix are alphas/mods
59// Used for backlight effects so colors are different for 59// Used for backlight effects so colors are different for
diff --git a/keyboards/spaceholdings/nebula12/config.h b/keyboards/spaceholdings/nebula12/config.h
index 5e4b48927f..512b775136 100755
--- a/keyboards/spaceholdings/nebula12/config.h
+++ b/keyboards/spaceholdings/nebula12/config.h
@@ -75,7 +75,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
75 75
76#define IS31FL3731_I2C_ADDRESS_1 IS31FL3731_I2C_ADDRESS_GND 76#define IS31FL3731_I2C_ADDRESS_1 IS31FL3731_I2C_ADDRESS_GND
77#define IS31FL3731_DRIVER_COUNT 1 77#define IS31FL3731_DRIVER_COUNT 1
78#define RGB_MATRIX_LED_COUNT 16 78#define IS31FL3731_LED_COUNT 16
79 79
80// These define which keys in the matrix are alphas/mods 80// These define which keys in the matrix are alphas/mods
81// Used for backlight effects so colors are different for 81// Used for backlight effects so colors are different for
diff --git a/keyboards/spaceholdings/nebula68/config.h b/keyboards/spaceholdings/nebula68/config.h
index 0283a4a036..1ad24d364c 100755
--- a/keyboards/spaceholdings/nebula68/config.h
+++ b/keyboards/spaceholdings/nebula68/config.h
@@ -59,7 +59,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
59#define IS31FL3733_I2C_ADDRESS_1 IS31FL3733_I2C_ADDRESS_GND_GND 59#define IS31FL3733_I2C_ADDRESS_1 IS31FL3733_I2C_ADDRESS_GND_GND
60#define IS31FL3733_I2C_ADDRESS_2 IS31FL3733_I2C_ADDRESS_GND_SDA 60#define IS31FL3733_I2C_ADDRESS_2 IS31FL3733_I2C_ADDRESS_GND_SDA
61#define IS31FL3733_DRIVER_COUNT 2 61#define IS31FL3733_DRIVER_COUNT 2
62#define RGB_MATRIX_LED_COUNT 128 62#define IS31FL3733_LED_COUNT 128
63 63
64// These define which keys in the matrix are alphas/mods 64// These define which keys in the matrix are alphas/mods
65// Used for backlight effects so colors are different for 65// Used for backlight effects so colors are different for
diff --git a/keyboards/tkc/portico/config.h b/keyboards/tkc/portico/config.h
index 5599f2a36b..2a1056b4a5 100644
--- a/keyboards/tkc/portico/config.h
+++ b/keyboards/tkc/portico/config.h
@@ -51,7 +51,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
51#define IS31FL3731_I2C_ADDRESS_1 IS31FL3731_I2C_ADDRESS_GND 51#define IS31FL3731_I2C_ADDRESS_1 IS31FL3731_I2C_ADDRESS_GND
52#define IS31FL3731_I2C_ADDRESS_2 IS31FL3731_I2C_ADDRESS_VCC 52#define IS31FL3731_I2C_ADDRESS_2 IS31FL3731_I2C_ADDRESS_VCC
53#define IS31FL3731_DRIVER_COUNT 2 53#define IS31FL3731_DRIVER_COUNT 2
54#define RGB_MATRIX_LED_COUNT 67 54#define IS31FL3731_LED_COUNT 67
55 55
56#define RGB_BACKLIGHT_ENABLED 1 56#define RGB_BACKLIGHT_ENABLED 1
57 57
diff --git a/keyboards/tkc/portico/portico.c b/keyboards/tkc/portico/portico.c
index bbb09ef8f6..72f8754f6c 100644
--- a/keyboards/tkc/portico/portico.c
+++ b/keyboards/tkc/portico/portico.c
@@ -19,7 +19,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
19 19
20#ifdef RGB_MATRIX_ENABLE 20#ifdef RGB_MATRIX_ENABLE
21 21
22const is31fl3731_led_t PROGMEM g_is31fl3731_leds[RGB_MATRIX_LED_COUNT] = { 22const is31fl3731_led_t PROGMEM g_is31fl3731_leds[IS31FL3731_LED_COUNT] = {
23 { 0, C2_1, C3_1, C4_1 }, 23 { 0, C2_1, C3_1, C4_1 },
24 { 0, C1_1, C3_2, C4_2 }, 24 { 0, C1_1, C3_2, C4_2 },
25 { 0, C1_2, C2_2, C4_3 }, 25 { 0, C1_2, C2_2, C4_3 },
diff --git a/keyboards/tkc/portico75/config.h b/keyboards/tkc/portico75/config.h
index 756dfbb54a..3a9b50baca 100644
--- a/keyboards/tkc/portico75/config.h
+++ b/keyboards/tkc/portico75/config.h
@@ -81,7 +81,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
81// WT_RGB IS31FL3741 driver code 81// WT_RGB IS31FL3741 driver code
82# define IS31FL3741_I2C_ADDRESS_1 IS31FL3741_I2C_ADDRESS_GND 82# define IS31FL3741_I2C_ADDRESS_1 IS31FL3741_I2C_ADDRESS_GND
83# define IS31FL3741_DRIVER_COUNT 1 83# define IS31FL3741_DRIVER_COUNT 1
84# define RGB_MATRIX_LED_COUNT 98 84# define IS31FL3741_LED_COUNT 98
85 85
86# define RGB_BACKLIGHT_ENABLED 1 86# define RGB_BACKLIGHT_ENABLED 1
87 87
diff --git a/keyboards/tkc/portico75/portico75.c b/keyboards/tkc/portico75/portico75.c
index 69d6256071..f0751483aa 100644
--- a/keyboards/tkc/portico75/portico75.c
+++ b/keyboards/tkc/portico75/portico75.c
@@ -20,7 +20,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
20 20
21#ifdef RGB_MATRIX_ENABLE 21#ifdef RGB_MATRIX_ENABLE
22 22
23const is31fl3741_led_t PROGMEM g_is31fl3741_leds[RGB_MATRIX_LED_COUNT] = { 23const is31fl3741_led_t PROGMEM g_is31fl3741_leds[IS31FL3741_LED_COUNT] = {
24 {0, CS18_SW1, CS17_SW1, CS16_SW1}, 24 {0, CS18_SW1, CS17_SW1, CS16_SW1},
25 {0, CS18_SW2, CS17_SW2, CS16_SW2}, 25 {0, CS18_SW2, CS17_SW2, CS16_SW2},
26 {0, CS18_SW3, CS17_SW3, CS16_SW3}, 26 {0, CS18_SW3, CS17_SW3, CS16_SW3},
diff --git a/keyboards/wilba_tech/rama_works_kara/config.h b/keyboards/wilba_tech/rama_works_kara/config.h
index 5d8c9df820..09aac7a552 100644
--- a/keyboards/wilba_tech/rama_works_kara/config.h
+++ b/keyboards/wilba_tech/rama_works_kara/config.h
@@ -19,7 +19,7 @@
19#define IS31FL3731_I2C_ADDRESS_1 IS31FL3731_I2C_ADDRESS_GND 19#define IS31FL3731_I2C_ADDRESS_1 IS31FL3731_I2C_ADDRESS_GND
20#define IS31FL3731_I2C_ADDRESS_2 IS31FL3731_I2C_ADDRESS_SDA 20#define IS31FL3731_I2C_ADDRESS_2 IS31FL3731_I2C_ADDRESS_SDA
21#define IS31FL3731_DRIVER_COUNT 2 21#define IS31FL3731_DRIVER_COUNT 2
22#define RGB_MATRIX_LED_COUNT 72 22#define IS31FL3731_LED_COUNT 72
23 23
24// Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap 24// Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap
25#define LOCKING_SUPPORT_ENABLE 25#define LOCKING_SUPPORT_ENABLE
diff --git a/keyboards/wilba_tech/rama_works_koyu/config.h b/keyboards/wilba_tech/rama_works_koyu/config.h
index aad4cd12ac..512cff857b 100644
--- a/keyboards/wilba_tech/rama_works_koyu/config.h
+++ b/keyboards/wilba_tech/rama_works_koyu/config.h
@@ -19,7 +19,7 @@
19#define IS31FL3731_I2C_ADDRESS_1 IS31FL3731_I2C_ADDRESS_GND 19#define IS31FL3731_I2C_ADDRESS_1 IS31FL3731_I2C_ADDRESS_GND
20#define IS31FL3731_I2C_ADDRESS_2 IS31FL3731_I2C_ADDRESS_SDA 20#define IS31FL3731_I2C_ADDRESS_2 IS31FL3731_I2C_ADDRESS_SDA
21#define IS31FL3731_DRIVER_COUNT 2 21#define IS31FL3731_DRIVER_COUNT 2
22#define RGB_MATRIX_LED_COUNT 72 22#define IS31FL3731_LED_COUNT 72
23 23
24// Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap 24// Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap
25#define LOCKING_SUPPORT_ENABLE 25#define LOCKING_SUPPORT_ENABLE
diff --git a/keyboards/wilba_tech/rama_works_m10_c/config.h b/keyboards/wilba_tech/rama_works_m10_c/config.h
index 529896f6ed..1e0d943b96 100644
--- a/keyboards/wilba_tech/rama_works_m10_c/config.h
+++ b/keyboards/wilba_tech/rama_works_m10_c/config.h
@@ -23,7 +23,7 @@
23// IS31FL3731 driver 23// IS31FL3731 driver
24#define IS31FL3731_I2C_ADDRESS_1 IS31FL3731_I2C_ADDRESS_GND 24#define IS31FL3731_I2C_ADDRESS_1 IS31FL3731_I2C_ADDRESS_GND
25#define IS31FL3731_DRIVER_COUNT 1 25#define IS31FL3731_DRIVER_COUNT 1
26#define RGB_MATRIX_LED_COUNT 12 26#define IS31FL3731_LED_COUNT 12
27 27
28// Enable WT RGB backlight 28// Enable WT RGB backlight
29#define RGB_BACKLIGHT_ENABLED 1 29#define RGB_BACKLIGHT_ENABLED 1
diff --git a/keyboards/wilba_tech/rama_works_m50_a/config.h b/keyboards/wilba_tech/rama_works_m50_a/config.h
index 599550b91f..98149ffa14 100644
--- a/keyboards/wilba_tech/rama_works_m50_a/config.h
+++ b/keyboards/wilba_tech/rama_works_m50_a/config.h
@@ -24,7 +24,7 @@
24#define IS31FL3731_I2C_ADDRESS_1 IS31FL3731_I2C_ADDRESS_GND 24#define IS31FL3731_I2C_ADDRESS_1 IS31FL3731_I2C_ADDRESS_GND
25#define IS31FL3731_I2C_ADDRESS_2 IS31FL3731_I2C_ADDRESS_SDA 25#define IS31FL3731_I2C_ADDRESS_2 IS31FL3731_I2C_ADDRESS_SDA
26#define IS31FL3731_DRIVER_COUNT 2 26#define IS31FL3731_DRIVER_COUNT 2
27#define RGB_MATRIX_LED_COUNT 72 27#define IS31FL3731_LED_COUNT 72
28 28
29// Enable WT RGB backlight 29// Enable WT RGB backlight
30#define RGB_BACKLIGHT_ENABLED 1 30#define RGB_BACKLIGHT_ENABLED 1
diff --git a/keyboards/wilba_tech/rama_works_m60_a/config.h b/keyboards/wilba_tech/rama_works_m60_a/config.h
index bc7d7e6128..c291ba2db3 100644
--- a/keyboards/wilba_tech/rama_works_m60_a/config.h
+++ b/keyboards/wilba_tech/rama_works_m60_a/config.h
@@ -19,7 +19,7 @@
19#define IS31FL3731_I2C_ADDRESS_1 IS31FL3731_I2C_ADDRESS_GND 19#define IS31FL3731_I2C_ADDRESS_1 IS31FL3731_I2C_ADDRESS_GND
20#define IS31FL3731_I2C_ADDRESS_2 IS31FL3731_I2C_ADDRESS_SDA 20#define IS31FL3731_I2C_ADDRESS_2 IS31FL3731_I2C_ADDRESS_SDA
21#define IS31FL3731_DRIVER_COUNT 2 21#define IS31FL3731_DRIVER_COUNT 2
22#define RGB_MATRIX_LED_COUNT 72 22#define IS31FL3731_LED_COUNT 72
23 23
24// Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap 24// Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap
25#define LOCKING_SUPPORT_ENABLE 25#define LOCKING_SUPPORT_ENABLE
diff --git a/keyboards/wilba_tech/rama_works_m65_b/config.h b/keyboards/wilba_tech/rama_works_m65_b/config.h
index b3e381d77d..9807fbc874 100644
--- a/keyboards/wilba_tech/rama_works_m65_b/config.h
+++ b/keyboards/wilba_tech/rama_works_m65_b/config.h
@@ -24,7 +24,7 @@
24#define IS31FL3731_I2C_ADDRESS_1 IS31FL3731_I2C_ADDRESS_GND 24#define IS31FL3731_I2C_ADDRESS_1 IS31FL3731_I2C_ADDRESS_GND
25#define IS31FL3731_I2C_ADDRESS_2 IS31FL3731_I2C_ADDRESS_SDA 25#define IS31FL3731_I2C_ADDRESS_2 IS31FL3731_I2C_ADDRESS_SDA
26#define IS31FL3731_DRIVER_COUNT 2 26#define IS31FL3731_DRIVER_COUNT 2
27#define RGB_MATRIX_LED_COUNT 72 27#define IS31FL3731_LED_COUNT 72
28 28
29// Enable WT RGB backlight 29// Enable WT RGB backlight
30#define RGB_BACKLIGHT_ENABLED 1 30#define RGB_BACKLIGHT_ENABLED 1
diff --git a/keyboards/wilba_tech/rama_works_m65_bx/config.h b/keyboards/wilba_tech/rama_works_m65_bx/config.h
index 8070e917d7..64da89ff9e 100644
--- a/keyboards/wilba_tech/rama_works_m65_bx/config.h
+++ b/keyboards/wilba_tech/rama_works_m65_bx/config.h
@@ -24,7 +24,7 @@
24#define IS31FL3731_I2C_ADDRESS_1 IS31FL3731_I2C_ADDRESS_GND 24#define IS31FL3731_I2C_ADDRESS_1 IS31FL3731_I2C_ADDRESS_GND
25#define IS31FL3731_I2C_ADDRESS_2 IS31FL3731_I2C_ADDRESS_SDA 25#define IS31FL3731_I2C_ADDRESS_2 IS31FL3731_I2C_ADDRESS_SDA
26#define IS31FL3731_DRIVER_COUNT 2 26#define IS31FL3731_DRIVER_COUNT 2
27#define RGB_MATRIX_LED_COUNT 72 27#define IS31FL3731_LED_COUNT 72
28 28
29// Enable WT RGB backlight 29// Enable WT RGB backlight
30#define RGB_BACKLIGHT_ENABLED 1 30#define RGB_BACKLIGHT_ENABLED 1
diff --git a/keyboards/wilba_tech/rama_works_m6_b/config.h b/keyboards/wilba_tech/rama_works_m6_b/config.h
index 27a5e72c04..112cd500be 100644
--- a/keyboards/wilba_tech/rama_works_m6_b/config.h
+++ b/keyboards/wilba_tech/rama_works_m6_b/config.h
@@ -20,7 +20,7 @@
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 23#define IS31FL3218_LED_COUNT 6
24 24
25#define RGB_BACKLIGHT_ENABLED 1 25#define RGB_BACKLIGHT_ENABLED 1
26 26
diff --git a/keyboards/wilba_tech/rama_works_u80_a/config.h b/keyboards/wilba_tech/rama_works_u80_a/config.h
index 4ab2d53c3c..2a0da80fed 100644
--- a/keyboards/wilba_tech/rama_works_u80_a/config.h
+++ b/keyboards/wilba_tech/rama_works_u80_a/config.h
@@ -42,7 +42,7 @@
42#define IS31FL3731_I2C_ADDRESS_2 IS31FL3731_I2C_ADDRESS_SDA 42#define IS31FL3731_I2C_ADDRESS_2 IS31FL3731_I2C_ADDRESS_SDA
43#define IS31FL3731_I2C_ADDRESS_3 IS31FL3731_I2C_ADDRESS_SCL 43#define IS31FL3731_I2C_ADDRESS_3 IS31FL3731_I2C_ADDRESS_SCL
44#define IS31FL3731_DRIVER_COUNT 3 44#define IS31FL3731_DRIVER_COUNT 3
45#define RGB_MATRIX_LED_COUNT 108 45#define IS31FL3731_LED_COUNT 108
46 46
47#define RGB_BACKLIGHT_ENABLED 1 47#define RGB_BACKLIGHT_ENABLED 1
48 48
diff --git a/keyboards/wilba_tech/wt60_a/config.h b/keyboards/wilba_tech/wt60_a/config.h
index c9d448fbb8..25a6f25a1c 100644
--- a/keyboards/wilba_tech/wt60_a/config.h
+++ b/keyboards/wilba_tech/wt60_a/config.h
@@ -64,4 +64,4 @@
64 64
65#define IS31FL3736_I2C_ADDRESS_1 IS31FL3736_I2C_ADDRESS_GND_GND 65#define IS31FL3736_I2C_ADDRESS_1 IS31FL3736_I2C_ADDRESS_GND_GND
66#define IS31FL3736_DRIVER_COUNT 1 66#define IS31FL3736_DRIVER_COUNT 1
67#define LED_MATRIX_LED_COUNT 96 67#define IS31FL3736_LED_COUNT 96
diff --git a/keyboards/wilba_tech/wt60_b/config.h b/keyboards/wilba_tech/wt60_b/config.h
index c5fb1b32c7..926136f332 100644
--- a/keyboards/wilba_tech/wt60_b/config.h
+++ b/keyboards/wilba_tech/wt60_b/config.h
@@ -26,7 +26,7 @@
26#define IS31FL3731_I2C_ADDRESS_1 IS31FL3731_I2C_ADDRESS_GND 26#define IS31FL3731_I2C_ADDRESS_1 IS31FL3731_I2C_ADDRESS_GND
27#define IS31FL3731_I2C_ADDRESS_2 IS31FL3731_I2C_ADDRESS_SDA 27#define IS31FL3731_I2C_ADDRESS_2 IS31FL3731_I2C_ADDRESS_SDA
28#define IS31FL3731_DRIVER_COUNT 2 28#define IS31FL3731_DRIVER_COUNT 2
29#define RGB_MATRIX_LED_COUNT 72 29#define IS31FL3731_LED_COUNT 72
30 30
31#define RGB_BACKLIGHT_ENABLED 1 31#define RGB_BACKLIGHT_ENABLED 1
32 32
diff --git a/keyboards/wilba_tech/wt60_bx/config.h b/keyboards/wilba_tech/wt60_bx/config.h
index f87d9ff48e..85ab052437 100644
--- a/keyboards/wilba_tech/wt60_bx/config.h
+++ b/keyboards/wilba_tech/wt60_bx/config.h
@@ -26,7 +26,7 @@
26#define IS31FL3731_I2C_ADDRESS_1 IS31FL3731_I2C_ADDRESS_GND 26#define IS31FL3731_I2C_ADDRESS_1 IS31FL3731_I2C_ADDRESS_GND
27#define IS31FL3731_I2C_ADDRESS_2 IS31FL3731_I2C_ADDRESS_SDA 27#define IS31FL3731_I2C_ADDRESS_2 IS31FL3731_I2C_ADDRESS_SDA
28#define IS31FL3731_DRIVER_COUNT 2 28#define IS31FL3731_DRIVER_COUNT 2
29#define RGB_MATRIX_LED_COUNT 72 29#define IS31FL3731_LED_COUNT 72
30 30
31#define RGB_BACKLIGHT_ENABLED 1 31#define RGB_BACKLIGHT_ENABLED 1
32 32
diff --git a/keyboards/wilba_tech/wt60_c/config.h b/keyboards/wilba_tech/wt60_c/config.h
index 4a1b8b6ad2..ca7366bc32 100644
--- a/keyboards/wilba_tech/wt60_c/config.h
+++ b/keyboards/wilba_tech/wt60_c/config.h
@@ -26,7 +26,7 @@
26#define IS31FL3731_I2C_ADDRESS_1 IS31FL3731_I2C_ADDRESS_GND 26#define IS31FL3731_I2C_ADDRESS_1 IS31FL3731_I2C_ADDRESS_GND
27#define IS31FL3731_I2C_ADDRESS_2 IS31FL3731_I2C_ADDRESS_SDA 27#define IS31FL3731_I2C_ADDRESS_2 IS31FL3731_I2C_ADDRESS_SDA
28#define IS31FL3731_DRIVER_COUNT 2 28#define IS31FL3731_DRIVER_COUNT 2
29#define RGB_MATRIX_LED_COUNT 72 29#define IS31FL3731_LED_COUNT 72
30 30
31#define RGB_BACKLIGHT_ENABLED 1 31#define RGB_BACKLIGHT_ENABLED 1
32 32
diff --git a/keyboards/wilba_tech/wt65_a/config.h b/keyboards/wilba_tech/wt65_a/config.h
index 04d607e77a..88f28ac844 100644
--- a/keyboards/wilba_tech/wt65_a/config.h
+++ b/keyboards/wilba_tech/wt65_a/config.h
@@ -64,4 +64,4 @@
64 64
65#define IS31FL3736_I2C_ADDRESS_1 IS31FL3736_I2C_ADDRESS_GND_GND 65#define IS31FL3736_I2C_ADDRESS_1 IS31FL3736_I2C_ADDRESS_GND_GND
66#define IS31FL3736_DRIVER_COUNT 1 66#define IS31FL3736_DRIVER_COUNT 1
67#define LED_MATRIX_LED_COUNT 96 67#define IS31FL3736_LED_COUNT 96
diff --git a/keyboards/wilba_tech/wt65_b/config.h b/keyboards/wilba_tech/wt65_b/config.h
index 780b3c80c4..164caecd00 100644
--- a/keyboards/wilba_tech/wt65_b/config.h
+++ b/keyboards/wilba_tech/wt65_b/config.h
@@ -64,4 +64,4 @@
64 64
65#define IS31FL3736_I2C_ADDRESS_1 IS31FL3736_I2C_ADDRESS_GND_GND 65#define IS31FL3736_I2C_ADDRESS_1 IS31FL3736_I2C_ADDRESS_GND_GND
66#define IS31FL3736_DRIVER_COUNT 1 66#define IS31FL3736_DRIVER_COUNT 1
67#define LED_MATRIX_LED_COUNT 96 67#define IS31FL3736_LED_COUNT 96
diff --git a/keyboards/wilba_tech/wt75_a/config.h b/keyboards/wilba_tech/wt75_a/config.h
index 29399e148a..a8185a6807 100644
--- a/keyboards/wilba_tech/wt75_a/config.h
+++ b/keyboards/wilba_tech/wt75_a/config.h
@@ -64,4 +64,4 @@
64 64
65#define IS31FL3736_I2C_ADDRESS_1 IS31FL3736_I2C_ADDRESS_GND_GND 65#define IS31FL3736_I2C_ADDRESS_1 IS31FL3736_I2C_ADDRESS_GND_GND
66#define IS31FL3736_DRIVER_COUNT 1 66#define IS31FL3736_DRIVER_COUNT 1
67#define LED_MATRIX_LED_COUNT 96 67#define IS31FL3736_LED_COUNT 96
diff --git a/keyboards/wilba_tech/wt75_b/config.h b/keyboards/wilba_tech/wt75_b/config.h
index 71ca6891ca..4834251691 100644
--- a/keyboards/wilba_tech/wt75_b/config.h
+++ b/keyboards/wilba_tech/wt75_b/config.h
@@ -64,4 +64,4 @@
64 64
65#define IS31FL3736_I2C_ADDRESS_1 IS31FL3736_I2C_ADDRESS_GND_GND 65#define IS31FL3736_I2C_ADDRESS_1 IS31FL3736_I2C_ADDRESS_GND_GND
66#define IS31FL3736_DRIVER_COUNT 1 66#define IS31FL3736_DRIVER_COUNT 1
67#define LED_MATRIX_LED_COUNT 96 67#define IS31FL3736_LED_COUNT 96
diff --git a/keyboards/wilba_tech/wt75_c/config.h b/keyboards/wilba_tech/wt75_c/config.h
index b404dccfbb..d1e81992f5 100644
--- a/keyboards/wilba_tech/wt75_c/config.h
+++ b/keyboards/wilba_tech/wt75_c/config.h
@@ -64,4 +64,4 @@
64 64
65#define IS31FL3736_I2C_ADDRESS_1 IS31FL3736_I2C_ADDRESS_GND_GND 65#define IS31FL3736_I2C_ADDRESS_1 IS31FL3736_I2C_ADDRESS_GND_GND
66#define IS31FL3736_DRIVER_COUNT 1 66#define IS31FL3736_DRIVER_COUNT 1
67#define LED_MATRIX_LED_COUNT 96 67#define IS31FL3736_LED_COUNT 96
diff --git a/keyboards/wilba_tech/wt80_a/config.h b/keyboards/wilba_tech/wt80_a/config.h
index a1f8fbdef6..c6594c1689 100644
--- a/keyboards/wilba_tech/wt80_a/config.h
+++ b/keyboards/wilba_tech/wt80_a/config.h
@@ -64,4 +64,4 @@
64 64
65#define IS31FL3736_I2C_ADDRESS_1 IS31FL3736_I2C_ADDRESS_GND_GND 65#define IS31FL3736_I2C_ADDRESS_1 IS31FL3736_I2C_ADDRESS_GND_GND
66#define IS31FL3736_DRIVER_COUNT 1 66#define IS31FL3736_DRIVER_COUNT 1
67#define LED_MATRIX_LED_COUNT 96 67#define IS31FL3736_LED_COUNT 96
diff --git a/keyboards/wilba_tech/wt_mono_backlight.c b/keyboards/wilba_tech/wt_mono_backlight.c
index 4add18b14e..e218f0af4b 100644
--- a/keyboards/wilba_tech/wt_mono_backlight.c
+++ b/keyboards/wilba_tech/wt_mono_backlight.c
@@ -50,7 +50,7 @@ backlight_config g_config = {
50 .color_1 = MONO_BACKLIGHT_COLOR_1, 50 .color_1 = MONO_BACKLIGHT_COLOR_1,
51}; 51};
52 52
53const is31fl3736_led_t PROGMEM g_is31fl3736_leds[LED_MATRIX_LED_COUNT] = { 53const is31fl3736_led_t PROGMEM g_is31fl3736_leds[IS31FL3736_LED_COUNT] = {
54 {0, A_1}, 54 {0, A_1},
55 {0, A_2}, 55 {0, A_2},
56 {0, A_3}, 56 {0, A_3},
@@ -170,14 +170,7 @@ uint32_t g_any_key_hit = 0;
170 170
171void backlight_init_drivers(void) 171void backlight_init_drivers(void)
172{ 172{
173 // Initialize I2C 173 is31fl3736_init_drivers();
174 i2c_init();
175 is31fl3736_init( IS31FL3736_I2C_ADDRESS_1 );
176
177 for ( uint8_t index = 0; index < 96; index++ ) {
178 is31fl3736_set_led_control_register( index, true );
179 }
180 is31fl3736_update_led_control_registers( IS31FL3736_I2C_ADDRESS_1, 0 );
181} 174}
182 175
183void backlight_set_key_hit(uint8_t row, uint8_t column) 176void backlight_set_key_hit(uint8_t row, uint8_t column)
diff --git a/keyboards/wilba_tech/wt_rgb_backlight.c b/keyboards/wilba_tech/wt_rgb_backlight.c
index 1c865deecf..8bd04c840f 100644
--- a/keyboards/wilba_tech/wt_rgb_backlight.c
+++ b/keyboards/wilba_tech/wt_rgb_backlight.c
@@ -157,7 +157,7 @@ uint32_t g_any_key_hit = 0;
157#if defined(RGB_BACKLIGHT_HS60) 157#if defined(RGB_BACKLIGHT_HS60)
158#define ISSI_ADDR_1 IS31FL3733_I2C_ADDRESS_GND_GND 158#define ISSI_ADDR_1 IS31FL3733_I2C_ADDRESS_GND_GND
159 159
160const is31fl3733_led_t PROGMEM g_is31fl3733_leds[RGB_MATRIX_LED_COUNT] = { 160const is31fl3733_led_t PROGMEM g_is31fl3733_leds[IS31FL3733_LED_COUNT] = {
161/* Refer to IS31 manual for these locations 161/* Refer to IS31 manual for these locations
162 * driver 162 * driver
163 * | R location 163 * | R location
@@ -234,7 +234,7 @@ const is31fl3733_led_t PROGMEM g_is31fl3733_leds[RGB_MATRIX_LED_COUNT] = {
234#define ISSI_ADDR_1 IS31FL3733_I2C_ADDRESS_GND_GND 234#define ISSI_ADDR_1 IS31FL3733_I2C_ADDRESS_GND_GND
235#define ISSI_ADDR_2 IS31FL3733_I2C_ADDRESS_GND_SDA 235#define ISSI_ADDR_2 IS31FL3733_I2C_ADDRESS_GND_SDA
236 236
237const is31fl3733_led_t PROGMEM g_is31fl3733_leds[RGB_MATRIX_LED_COUNT] = { 237const is31fl3733_led_t PROGMEM g_is31fl3733_leds[IS31FL3733_LED_COUNT] = {
238/* Refer to IS31 manual for these locations 238/* Refer to IS31 manual for these locations
239 * driver 239 * driver
240 * | R location 240 * | R location
@@ -375,7 +375,7 @@ const is31fl3733_led_t PROGMEM g_is31fl3733_leds[RGB_MATRIX_LED_COUNT] = {
375#elif defined(RGB_BACKLIGHT_NEBULA12) 375#elif defined(RGB_BACKLIGHT_NEBULA12)
376#define ISSI_ADDR_1 IS31FL3731_I2C_ADDRESS_GND 376#define ISSI_ADDR_1 IS31FL3731_I2C_ADDRESS_GND
377 377
378const is31fl3731_led_t PROGMEM g_is31fl3731_leds[RGB_MATRIX_LED_COUNT] = { 378const is31fl3731_led_t PROGMEM g_is31fl3731_leds[IS31FL3731_LED_COUNT] = {
379/* Refer to IS31 manual for these locations 379/* Refer to IS31 manual for these locations
380 * driver 380 * driver
381 * | R location 381 * | R location
@@ -406,7 +406,7 @@ const is31fl3731_led_t PROGMEM g_is31fl3731_leds[RGB_MATRIX_LED_COUNT] = {
406#define ISSI_ADDR_2 IS31FL3731_I2C_ADDRESS_SDA 406#define ISSI_ADDR_2 IS31FL3731_I2C_ADDRESS_SDA
407#define ISSI_ADDR_3 IS31FL3731_I2C_ADDRESS_SCL 407#define ISSI_ADDR_3 IS31FL3731_I2C_ADDRESS_SCL
408 408
409const is31fl3731_led_t PROGMEM g_is31fl3731_leds[RGB_MATRIX_LED_COUNT] = { 409const is31fl3731_led_t PROGMEM g_is31fl3731_leds[IS31FL3731_LED_COUNT] = {
410/* Refer to IS31 manual for these locations 410/* Refer to IS31 manual for these locations
411 * driver 411 * driver
412 * | R location 412 * | R location
@@ -531,7 +531,7 @@ const is31fl3731_led_t PROGMEM g_is31fl3731_leds[RGB_MATRIX_LED_COUNT] = {
531#define ISSI_ADDR_1 IS31FL3731_I2C_ADDRESS_GND 531#define ISSI_ADDR_1 IS31FL3731_I2C_ADDRESS_GND
532#define ISSI_ADDR_2 IS31FL3731_I2C_ADDRESS_SDA 532#define ISSI_ADDR_2 IS31FL3731_I2C_ADDRESS_SDA
533 533
534const is31fl3731_led_t PROGMEM g_is31fl3731_leds[RGB_MATRIX_LED_COUNT] = { 534const is31fl3731_led_t PROGMEM g_is31fl3731_leds[IS31FL3731_LED_COUNT] = {
535/* Refer to IS31 manual for these locations 535/* Refer to IS31 manual for these locations
536 * driver 536 * driver
537 * | R location 537 * | R location
@@ -610,7 +610,7 @@ const is31fl3731_led_t PROGMEM g_is31fl3731_leds[RGB_MATRIX_LED_COUNT] = {
610#define ISSI_ADDR_1 IS31FL3731_I2C_ADDRESS_GND 610#define ISSI_ADDR_1 IS31FL3731_I2C_ADDRESS_GND
611#define ISSI_ADDR_2 IS31FL3731_I2C_ADDRESS_VCC 611#define ISSI_ADDR_2 IS31FL3731_I2C_ADDRESS_VCC
612 612
613const is31fl3731_led_t PROGMEM g_is31fl3731_leds[RGB_MATRIX_LED_COUNT] = { 613const is31fl3731_led_t PROGMEM g_is31fl3731_leds[IS31FL3731_LED_COUNT] = {
614/* Refer to IS31 manual for these locations 614/* Refer to IS31 manual for these locations
615 * driver 615 * driver
616 * | R location 616 * | R location
@@ -694,7 +694,7 @@ const is31fl3731_led_t PROGMEM g_is31fl3731_leds[RGB_MATRIX_LED_COUNT] = {
694#define ISSI_ADDR_1 IS31FL3741_I2C_ADDRESS_GND 694#define ISSI_ADDR_1 IS31FL3741_I2C_ADDRESS_GND
695#define ISSI_ADDR_2 695#define ISSI_ADDR_2
696 696
697const is31fl3741_led_t PROGMEM g_is31fl3741_leds[RGB_MATRIX_LED_COUNT] = { 697const is31fl3741_led_t PROGMEM g_is31fl3741_leds[IS31FL3741_LED_COUNT] = {
698/* Refer to IS31 manual for these locations 698/* Refer to IS31 manual for these locations
699 * driver 699 * driver
700 * | R location 700 * | R location
@@ -817,7 +817,7 @@ const is31fl3741_led_t PROGMEM g_is31fl3741_leds[RGB_MATRIX_LED_COUNT] = {
817}; 817};
818 818
819#elif defined(RGB_BACKLIGHT_M6_B) 819#elif defined(RGB_BACKLIGHT_M6_B)
820const is31fl3218_led_t PROGMEM g_is31fl3218_leds[RGB_MATRIX_LED_COUNT] = { 820const is31fl3218_led_t PROGMEM g_is31fl3218_leds[IS31FL3218_LED_COUNT] = {
821 {OUT1, OUT2, OUT3}, 821 {OUT1, OUT2, OUT3},
822 {OUT4, OUT5, OUT6}, 822 {OUT4, OUT5, OUT6},
823 {OUT7, OUT8, OUT9}, 823 {OUT7, OUT8, OUT9},
@@ -829,7 +829,7 @@ const is31fl3218_led_t PROGMEM g_is31fl3218_leds[RGB_MATRIX_LED_COUNT] = {
829#define ISSI_ADDR_1 IS31FL3731_I2C_ADDRESS_GND 829#define ISSI_ADDR_1 IS31FL3731_I2C_ADDRESS_GND
830#define ISSI_ADDR_2 830#define ISSI_ADDR_2
831 831
832const is31fl3731_led_t PROGMEM g_is31fl3731_leds[RGB_MATRIX_LED_COUNT] = { 832const is31fl3731_led_t PROGMEM g_is31fl3731_leds[IS31FL3731_LED_COUNT] = {
833 {0, C1_9, C3_10, C4_10}, // LB1 833 {0, C1_9, C3_10, C4_10}, // LB1
834 {0, C1_10, C2_10, C4_11}, // LB2 834 {0, C1_10, C2_10, C4_11}, // LB2
835 {0, C1_11, C2_11, C3_11}, // LB3 835 {0, C1_11, C2_11, C3_11}, // LB3
@@ -847,7 +847,7 @@ const is31fl3731_led_t PROGMEM g_is31fl3731_leds[RGB_MATRIX_LED_COUNT] = {
847#define ISSI_ADDR_1 IS31FL3731_I2C_ADDRESS_GND 847#define ISSI_ADDR_1 IS31FL3731_I2C_ADDRESS_GND
848#define ISSI_ADDR_2 IS31FL3731_I2C_ADDRESS_SDA 848#define ISSI_ADDR_2 IS31FL3731_I2C_ADDRESS_SDA
849 849
850const is31fl3731_led_t PROGMEM g_is31fl3731_leds[RGB_MATRIX_LED_COUNT] = { 850const is31fl3731_led_t PROGMEM g_is31fl3731_leds[IS31FL3731_LED_COUNT] = {
851/* Refer to IS31 manual for these locations 851/* Refer to IS31 manual for these locations
852 * driver 852 * driver
853 * | R location 853 * | R location
@@ -1817,12 +1817,12 @@ void backlight_set_color( int index, uint8_t red, uint8_t green, uint8_t blue )
1817 is31fl3733_set_color( index, red, green, blue ); 1817 is31fl3733_set_color( index, red, green, blue );
1818 } 1818 }
1819#elif defined(RGB_BACKLIGHT_DAWN60) 1819#elif defined(RGB_BACKLIGHT_DAWN60)
1820 if( index < RGB_MATRIX_LED_COUNT ) { 1820 if( index < IS31FL3731_LED_COUNT ) {
1821 is31fl3731_set_color( index, red, green, blue ); 1821 is31fl3731_set_color( index, red, green, blue );
1822 } else { 1822 } else {
1823 g_ws2812_leds[index - RGB_MATRIX_LED_COUNT].r = red; 1823 g_ws2812_leds[index - IS31FL3731_LED_COUNT].r = red;
1824 g_ws2812_leds[index - RGB_MATRIX_LED_COUNT].g = green; 1824 g_ws2812_leds[index - IS31FL3731_LED_COUNT].g = green;
1825 g_ws2812_leds[index - RGB_MATRIX_LED_COUNT].b = blue; 1825 g_ws2812_leds[index - IS31FL3731_LED_COUNT].b = blue;
1826 ws2812_setleds(g_ws2812_leds, WS2812_LED_TOTAL); 1826 ws2812_setleds(g_ws2812_leds, WS2812_LED_TOTAL);
1827 } 1827 }
1828#else 1828#else
@@ -2111,9 +2111,9 @@ void backlight_effect_alphas_mods(void)
2111 for (int i = 0; i < WS2812_LED_TOTAL; i++) { 2111 for (int i = 0; i < WS2812_LED_TOTAL; i++) {
2112 if ((RGB_UNDERGLOW_ALPHA_TOP_START <= i && i <= RGB_UNDERGLOW_ALPHA_TOP_END) || 2112 if ((RGB_UNDERGLOW_ALPHA_TOP_START <= i && i <= RGB_UNDERGLOW_ALPHA_TOP_END) ||
2113 (RGB_UNDERGLOW_ALPHA_BOT_START <= i && i <= RGB_UNDERGLOW_ALPHA_BOT_END)) { 2113 (RGB_UNDERGLOW_ALPHA_BOT_START <= i && i <= RGB_UNDERGLOW_ALPHA_BOT_END)) {
2114 backlight_set_color(i + RGB_MATRIX_LED_COUNT, rgb1.r, rgb1.g, rgb1.b); 2114 backlight_set_color(i + IS31FL3731_LED_COUNT, rgb1.r, rgb1.g, rgb1.b);
2115 } else { 2115 } else {
2116 backlight_set_color(i + RGB_MATRIX_LED_COUNT, rgb2.r, rgb2.g, rgb2.b); 2116 backlight_set_color(i + IS31FL3731_LED_COUNT, rgb2.r, rgb2.g, rgb2.b);
2117 } 2117 }
2118 } 2118 }
2119#endif 2119#endif
@@ -2902,7 +2902,7 @@ void backlight_init_drivers(void)
2902#if defined(RGB_BACKLIGHT_M6_B) 2902#if defined(RGB_BACKLIGHT_M6_B)
2903 is31fl3218_init(); 2903 is31fl3218_init();
2904 2904
2905 for ( int index = 0; index < RGB_MATRIX_LED_COUNT; index++ ) 2905 for ( int index = 0; index < IS31FL3218_LED_COUNT; index++ )
2906 { 2906 {
2907 bool enabled = true; 2907 bool enabled = true;
2908 2908
@@ -2913,9 +2913,9 @@ void backlight_init_drivers(void)
2913 // This actually updates the LED drivers 2913 // This actually updates the LED drivers
2914 is31fl3218_update_led_control_registers(); 2914 is31fl3218_update_led_control_registers();
2915#elif defined(RGB_BACKLIGHT_HS60) 2915#elif defined(RGB_BACKLIGHT_HS60)
2916 is31fl3733_init( ISSI_ADDR_1, 0 ); 2916 is31fl3733_init( ISSI_ADDR_1, IS31FL3733_SYNC_NONE );
2917 2917
2918 for ( int index = 0; index < RGB_MATRIX_LED_COUNT; index++ ) 2918 for ( int index = 0; index < IS31FL3733_LED_COUNT; index++ )
2919 { 2919 {
2920#if defined(HS60_ANSI) 2920#if defined(HS60_ANSI)
2921 bool enabled = !( ( index == 48-1 ) || //LA48 2921 bool enabled = !( ( index == 48-1 ) || //LA48
@@ -2934,10 +2934,10 @@ void backlight_init_drivers(void)
2934 // This actually updates the LED drivers 2934 // This actually updates the LED drivers
2935 is31fl3733_update_led_control_registers( ISSI_ADDR_1, 0 ); 2935 is31fl3733_update_led_control_registers( ISSI_ADDR_1, 0 );
2936#elif defined(RGB_BACKLIGHT_NK65) 2936#elif defined(RGB_BACKLIGHT_NK65)
2937 is31fl3733_init( ISSI_ADDR_1, 0 ); 2937 is31fl3733_init( ISSI_ADDR_1, IS31FL3733_SYNC_NONE );
2938 is31fl3733_init( ISSI_ADDR_2, 0 ); 2938 is31fl3733_init( ISSI_ADDR_2, IS31FL3733_SYNC_NONE );
2939 2939
2940 for ( int index = 0; index < RGB_MATRIX_LED_COUNT; index++ ) 2940 for ( int index = 0; index < IS31FL3733_LED_COUNT; index++ )
2941 { 2941 {
2942 bool enabled = !( ( index == 61-1 ) || //LA61 2942 bool enabled = !( ( index == 61-1 ) || //LA61
2943 ( index > 6+64-1 ) ); //LB7-LB64 2943 ( index > 6+64-1 ) ); //LB7-LB64
@@ -2949,10 +2949,10 @@ void backlight_init_drivers(void)
2949 is31fl3733_update_led_control_registers( ISSI_ADDR_1, 0 ); 2949 is31fl3733_update_led_control_registers( ISSI_ADDR_1, 0 );
2950 is31fl3733_update_led_control_registers( ISSI_ADDR_2, 1 ); 2950 is31fl3733_update_led_control_registers( ISSI_ADDR_2, 1 );
2951#elif defined(RGB_BACKLIGHT_NK87) 2951#elif defined(RGB_BACKLIGHT_NK87)
2952 is31fl3733_init( ISSI_ADDR_1, 0 ); 2952 is31fl3733_init( ISSI_ADDR_1, IS31FL3733_SYNC_NONE );
2953 is31fl3733_init( ISSI_ADDR_2, 0 ); 2953 is31fl3733_init( ISSI_ADDR_2, IS31FL3733_SYNC_NONE );
2954 2954
2955 for ( int index = 0; index < RGB_MATRIX_LED_COUNT; index++ ) 2955 for ( int index = 0; index < IS31FL3733_LED_COUNT; index++ )
2956 { 2956 {
2957 bool enabled = !( ( index == 61-1 ) || //LA61 2957 bool enabled = !( ( index == 61-1 ) || //LA61
2958 ( (index >= 2+64-1) && (index <= 4+64-1) ) || 2958 ( (index >= 2+64-1) && (index <= 4+64-1) ) ||
@@ -2979,10 +2979,10 @@ void backlight_init_drivers(void)
2979 is31fl3733_update_led_control_registers( ISSI_ADDR_1, 0 ); 2979 is31fl3733_update_led_control_registers( ISSI_ADDR_1, 0 );
2980 is31fl3733_update_led_control_registers( ISSI_ADDR_2, 1 ); 2980 is31fl3733_update_led_control_registers( ISSI_ADDR_2, 1 );
2981#elif defined(RGB_BACKLIGHT_NEBULA68) 2981#elif defined(RGB_BACKLIGHT_NEBULA68)
2982 is31fl3733_init( ISSI_ADDR_1, 0 ); 2982 is31fl3733_init( ISSI_ADDR_1, IS31FL3733_SYNC_NONE );
2983 is31fl3733_init( ISSI_ADDR_2, 0 ); 2983 is31fl3733_init( ISSI_ADDR_2, IS31FL3733_SYNC_NONE );
2984 2984
2985 for ( int index = 0; index < RGB_MATRIX_LED_COUNT; index++ ) 2985 for ( int index = 0; index < IS31FL3733_LED_COUNT; index++ )
2986 { 2986 {
2987 bool enabled = !( ( index == 61-1 ) || //LA61 2987 bool enabled = !( ( index == 61-1 ) || //LA61
2988 ( index > 5+64-1 ) ); //LB6-LB64 2988 ( index > 5+64-1 ) ); //LB6-LB64
@@ -2995,17 +2995,17 @@ void backlight_init_drivers(void)
2995#elif defined(RGB_BACKLIGHT_PORTICO75) 2995#elif defined(RGB_BACKLIGHT_PORTICO75)
2996 is31fl3741_init( ISSI_ADDR_1 ); 2996 is31fl3741_init( ISSI_ADDR_1 );
2997 bool enabled = true; 2997 bool enabled = true;
2998 for ( int index = 0; index < RGB_MATRIX_LED_COUNT; index++ ) 2998 for ( int index = 0; index < IS31FL3741_LED_COUNT; index++ )
2999 { 2999 {
3000 is31fl3741_set_led_control_register( index, enabled, enabled, enabled ); 3000 is31fl3741_set_led_control_register( index, enabled, enabled, enabled );
3001 } 3001 }
3002 // This actually updates the LED drivers 3002 // This actually updates the LED drivers
3003 is31fl3741_update_led_control_registers( ISSI_ADDR_1, 0 ); 3003 is31fl3741_update_led_control_registers( ISSI_ADDR_1, 0 );
3004#elif defined(RGB_BACKLIGHT_KW_MEGA) 3004#elif defined(RGB_BACKLIGHT_KW_MEGA)
3005 is31fl3733_init( ISSI_ADDR_1, 0 ); 3005 is31fl3733_init( ISSI_ADDR_1, IS31FL3733_SYNC_NONE );
3006 is31fl3733_init( ISSI_ADDR_2, 0 ); 3006 is31fl3733_init( ISSI_ADDR_2, IS31FL3733_SYNC_NONE );
3007 3007
3008 for ( int index = 0; index < RGB_MATRIX_LED_COUNT; index++ ) 3008 for ( int index = 0; index < IS31FL3733_LED_COUNT; index++ )
3009 { 3009 {
3010 bool enabled = !( ( index == 61-1 ) || //LA61 3010 bool enabled = !( ( index == 61-1 ) || //LA61
3011 ( index > 6+64-1 ) ); //LB7-LB64 3011 ( index > 6+64-1 ) ); //LB7-LB64
@@ -3032,7 +3032,7 @@ void backlight_init_drivers(void)
3032 bool disable_spacebar_stab_leds = false; 3032 bool disable_spacebar_stab_leds = false;
3033#endif 3033#endif
3034 3034
3035 for ( int index = 0; index < RGB_MATRIX_LED_COUNT; index++ ) 3035 for ( int index = 0; index < BACKLIGHT_LED_COUNT; index++ )
3036 { 3036 {
3037 // OR the possible "disabled" cases together, then NOT the result to get the enabled state 3037 // OR the possible "disabled" cases together, then NOT the result to get the enabled state
3038 // LC6 LD13 not present on Zeal65 3038 // LC6 LD13 not present on Zeal65
diff --git a/keyboards/wilba_tech/zeal60/config.h b/keyboards/wilba_tech/zeal60/config.h
index 3233c6187d..830dd6d78a 100644
--- a/keyboards/wilba_tech/zeal60/config.h
+++ b/keyboards/wilba_tech/zeal60/config.h
@@ -19,7 +19,7 @@
19#define IS31FL3731_I2C_ADDRESS_1 IS31FL3731_I2C_ADDRESS_GND 19#define IS31FL3731_I2C_ADDRESS_1 IS31FL3731_I2C_ADDRESS_GND
20#define IS31FL3731_I2C_ADDRESS_2 IS31FL3731_I2C_ADDRESS_SDA 20#define IS31FL3731_I2C_ADDRESS_2 IS31FL3731_I2C_ADDRESS_SDA
21#define IS31FL3731_DRIVER_COUNT 2 21#define IS31FL3731_DRIVER_COUNT 2
22#define RGB_MATRIX_LED_COUNT 72 22#define IS31FL3731_LED_COUNT 72
23 23
24// Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap 24// Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap
25#define LOCKING_SUPPORT_ENABLE 25#define LOCKING_SUPPORT_ENABLE
diff --git a/keyboards/wilba_tech/zeal65/config.h b/keyboards/wilba_tech/zeal65/config.h
index 1046ee8108..a7d1b81f84 100644
--- a/keyboards/wilba_tech/zeal65/config.h
+++ b/keyboards/wilba_tech/zeal65/config.h
@@ -19,7 +19,7 @@
19#define IS31FL3731_I2C_ADDRESS_1 IS31FL3731_I2C_ADDRESS_GND 19#define IS31FL3731_I2C_ADDRESS_1 IS31FL3731_I2C_ADDRESS_GND
20#define IS31FL3731_I2C_ADDRESS_2 IS31FL3731_I2C_ADDRESS_SDA 20#define IS31FL3731_I2C_ADDRESS_2 IS31FL3731_I2C_ADDRESS_SDA
21#define IS31FL3731_DRIVER_COUNT 2 21#define IS31FL3731_DRIVER_COUNT 2
22#define RGB_MATRIX_LED_COUNT 72 22#define IS31FL3731_LED_COUNT 72
23 23
24// Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap 24// Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap
25#define LOCKING_SUPPORT_ENABLE 25#define LOCKING_SUPPORT_ENABLE
diff --git a/keyboards/xelus/dawn60/rev1/config.h b/keyboards/xelus/dawn60/rev1/config.h
index c7945df3d6..a2a127f0a4 100644
--- a/keyboards/xelus/dawn60/rev1/config.h
+++ b/keyboards/xelus/dawn60/rev1/config.h
@@ -19,7 +19,7 @@
19#define IS31FL3731_I2C_ADDRESS_1 IS31FL3731_I2C_ADDRESS_GND 19#define IS31FL3731_I2C_ADDRESS_1 IS31FL3731_I2C_ADDRESS_GND
20#define IS31FL3731_I2C_ADDRESS_2 IS31FL3731_I2C_ADDRESS_SDA 20#define IS31FL3731_I2C_ADDRESS_2 IS31FL3731_I2C_ADDRESS_SDA
21#define IS31FL3731_DRIVER_COUNT 2 21#define IS31FL3731_DRIVER_COUNT 2
22#define RGB_MATRIX_LED_COUNT 64 22#define IS31FL3731_LED_COUNT 64
23 23
24// Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap 24// Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap
25#define LOCKING_SUPPORT_ENABLE 25#define LOCKING_SUPPORT_ENABLE
diff --git a/keyboards/xelus/dawn60/rev1_qmk/config.h b/keyboards/xelus/dawn60/rev1_qmk/config.h
index 33629a8ef3..e0ffe30843 100644
--- a/keyboards/xelus/dawn60/rev1_qmk/config.h
+++ b/keyboards/xelus/dawn60/rev1_qmk/config.h
@@ -30,8 +30,8 @@
30#define IS31FL3731_DRIVER_COUNT 2 30#define IS31FL3731_DRIVER_COUNT 2
31#define DRIVER_1_LED_TOTAL 32 31#define DRIVER_1_LED_TOTAL 32
32#define DRIVER_2_LED_TOTAL 32 32#define DRIVER_2_LED_TOTAL 32
33#define ISSI_DRIVER_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) 33#define IS31FL3731_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)
34#define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL + WS2812_LED_TOTAL) 34#define RGB_MATRIX_LED_COUNT (IS31FL3731_LED_COUNT + WS2812_LED_TOTAL)
35 35
36#define RGB_MATRIX_DEFAULT_VAL 80 36#define RGB_MATRIX_DEFAULT_VAL 80
37#define RGB_MATRIX_KEYPRESSES 37#define RGB_MATRIX_KEYPRESSES
diff --git a/keyboards/xelus/dawn60/rev1_qmk/rev1_qmk.c b/keyboards/xelus/dawn60/rev1_qmk/rev1_qmk.c
index da83d358b9..35ac5a06b2 100644
--- a/keyboards/xelus/dawn60/rev1_qmk/rev1_qmk.c
+++ b/keyboards/xelus/dawn60/rev1_qmk/rev1_qmk.c
@@ -25,7 +25,7 @@
25#ifdef RGB_MATRIX_ENABLE 25#ifdef RGB_MATRIX_ENABLE
26rgb_led_t rgb_matrix_ws2812_array[WS2812_LED_TOTAL]; 26rgb_led_t rgb_matrix_ws2812_array[WS2812_LED_TOTAL];
27 27
28const is31fl3731_led_t PROGMEM g_is31fl3731_leds[RGB_MATRIX_LED_COUNT] = { 28const is31fl3731_led_t PROGMEM g_is31fl3731_leds[IS31FL3731_LED_COUNT] = {
29/* Refer to IS31 manual for these locations 29/* Refer to IS31 manual for these locations
30 * driver 30 * driver
31 * | R location 31 * | R location
@@ -99,28 +99,6 @@ const is31fl3731_led_t PROGMEM g_is31fl3731_leds[RGB_MATRIX_LED_COUNT] = {
99 {1, C9_14, C8_14, C7_14}, //D14 99 {1, C9_14, C8_14, C7_14}, //D14
100 {1, C9_15, C8_15, C6_14}, //D15 100 {1, C9_15, C8_15, C6_14}, //D15
101 {1, C9_16, C7_15, C6_15}, //D16 101 {1, C9_16, C7_15, C6_15}, //D16
102
103 //fake underglows 1- 20
104 {2, 0, 0, 0},
105 {2, 0, 0, 0},
106 {2, 0, 0, 0},
107 {2, 0, 0, 0},
108 {2, 0, 0, 0},
109 {2, 0, 0, 0},
110 {2, 0, 0, 0},
111 {2, 0, 0, 0},
112 {2, 0, 0, 0},
113 {2, 0, 0, 0},
114 {2, 0, 0, 0},
115 {2, 0, 0, 0},
116 {2, 0, 0, 0},
117 {2, 0, 0, 0},
118 {2, 0, 0, 0},
119 {2, 0, 0, 0},
120 {2, 0, 0, 0},
121 {2, 0, 0, 0},
122 {2, 0, 0, 0},
123 {2, 0, 0, 0}
124}; 102};
125 103
126__attribute__ ((weak)) 104__attribute__ ((weak))
@@ -169,7 +147,7 @@ static void init(void) {
169 i2c_init(); 147 i2c_init();
170 is31fl3731_init(IS31FL3731_I2C_ADDRESS_1); 148 is31fl3731_init(IS31FL3731_I2C_ADDRESS_1);
171 is31fl3731_init(IS31FL3731_I2C_ADDRESS_2); 149 is31fl3731_init(IS31FL3731_I2C_ADDRESS_2);
172 for (int index = 0; index < ISSI_DRIVER_TOTAL; index++) { 150 for (int index = 0; index < IS31FL3731_LED_COUNT; index++) {
173 bool enabled = true; 151 bool enabled = true;
174 is31fl3731_set_led_control_register(index, enabled, enabled, enabled); 152 is31fl3731_set_led_control_register(index, enabled, enabled, enabled);
175 } 153 }
@@ -187,12 +165,12 @@ static void flush(void) {
187} 165}
188 166
189static void set_color(int index, uint8_t red, uint8_t green, uint8_t blue) { 167static void set_color(int index, uint8_t red, uint8_t green, uint8_t blue) {
190 if (index < ISSI_DRIVER_TOTAL) { 168 if (index < IS31FL3731_LED_COUNT) {
191 is31fl3731_set_color(index, red, green, blue); 169 is31fl3731_set_color(index, red, green, blue);
192 } else { 170 } else {
193 rgb_matrix_ws2812_array[index - ISSI_DRIVER_TOTAL].r = red; 171 rgb_matrix_ws2812_array[index - IS31FL3731_LED_COUNT].r = red;
194 rgb_matrix_ws2812_array[index - ISSI_DRIVER_TOTAL].g = green; 172 rgb_matrix_ws2812_array[index - IS31FL3731_LED_COUNT].g = green;
195 rgb_matrix_ws2812_array[index - ISSI_DRIVER_TOTAL].b = blue; 173 rgb_matrix_ws2812_array[index - IS31FL3731_LED_COUNT].b = blue;
196 } 174 }
197} 175}
198 176
diff --git a/keyboards/xelus/pachi/rgb/rev1/config.h b/keyboards/xelus/pachi/rgb/rev1/config.h
index e51a176c84..8d86a977c1 100644
--- a/keyboards/xelus/pachi/rgb/rev1/config.h
+++ b/keyboards/xelus/pachi/rgb/rev1/config.h
@@ -41,8 +41,7 @@
41 41
42#define IS31FL3741_DRIVER_COUNT 1 42#define IS31FL3741_DRIVER_COUNT 1
43#define DRIVER_1_LED_TOTAL 117 43#define DRIVER_1_LED_TOTAL 117
44#define RGB_MATRIX_LED_COUNT DRIVER_1_LED_TOTAL 44#define IS31FL3741_LED_COUNT DRIVER_1_LED_TOTAL
45#define ISSI_DRIVER_TOTAL RGB_MATRIX_LED_COUNT
46 45
47#define RGB_MATRIX_DEFAULT_VAL 80 46#define RGB_MATRIX_DEFAULT_VAL 80
48#define RGB_MATRIX_FRAMEBUFFER_EFFECTS 47#define RGB_MATRIX_FRAMEBUFFER_EFFECTS
diff --git a/keyboards/xelus/pachi/rgb/rev1/rev1.c b/keyboards/xelus/pachi/rgb/rev1/rev1.c
index 1a3d9b2f4d..e43726115e 100644
--- a/keyboards/xelus/pachi/rgb/rev1/rev1.c
+++ b/keyboards/xelus/pachi/rgb/rev1/rev1.c
@@ -22,7 +22,7 @@ void matrix_io_delay(void) { __asm__ volatile("nop\nnop\nnop\n"); }
22#ifdef RGB_MATRIX_ENABLE 22#ifdef RGB_MATRIX_ENABLE
23#include "i2c_master.h" 23#include "i2c_master.h"
24#include "drivers/led/issi/is31fl3741.h" 24#include "drivers/led/issi/is31fl3741.h"
25const is31fl3741_led_t PROGMEM g_is31fl3741_leds[RGB_MATRIX_LED_COUNT] = { 25const is31fl3741_led_t PROGMEM g_is31fl3741_leds[IS31FL3741_LED_COUNT] = {
26/* Refer to IS31 manual for these locations 26/* Refer to IS31 manual for these locations
27 * driver 27 * driver
28 * | R location 28 * | R location
@@ -189,7 +189,7 @@ led_config_t g_led_config = { {
189static void init(void) { 189static void init(void) {
190 i2c_init(); 190 i2c_init();
191 is31fl3741_init(IS31FL3741_I2C_ADDRESS_1); 191 is31fl3741_init(IS31FL3741_I2C_ADDRESS_1);
192 for (int index = 0; index < ISSI_DRIVER_TOTAL; index++) { 192 for (int index = 0; index < IS31FL3741_LED_COUNT; index++) {
193 bool enabled = !( ( index == -1+0+13) || //A13 193 bool enabled = !( ( index == -1+0+13) || //A13
194 ( index == -1+13+3) || //B3 194 ( index == -1+13+3) || //B3
195 ( index == -1+13+13) || //B13 195 ( index == -1+13+13) || //B13
diff --git a/keyboards/xelus/pachi/rgb/rev2/config.h b/keyboards/xelus/pachi/rgb/rev2/config.h
index da989e16a2..0afc9e2a43 100644
--- a/keyboards/xelus/pachi/rgb/rev2/config.h
+++ b/keyboards/xelus/pachi/rgb/rev2/config.h
@@ -41,8 +41,7 @@
41 41
42#define IS31FL3741_DRIVER_COUNT 1 42#define IS31FL3741_DRIVER_COUNT 1
43#define DRIVER_1_LED_TOTAL 117 43#define DRIVER_1_LED_TOTAL 117
44#define RGB_MATRIX_LED_COUNT DRIVER_1_LED_TOTAL 44#define IS31FL3741_LED_COUNT DRIVER_1_LED_TOTAL
45#define ISSI_DRIVER_TOTAL RGB_MATRIX_LED_COUNT
46 45
47#define RGB_MATRIX_DEFAULT_VAL 80 46#define RGB_MATRIX_DEFAULT_VAL 80
48#define RGB_MATRIX_FRAMEBUFFER_EFFECTS 47#define RGB_MATRIX_FRAMEBUFFER_EFFECTS
diff --git a/keyboards/xelus/pachi/rgb/rev2/rev2.c b/keyboards/xelus/pachi/rgb/rev2/rev2.c
index 729b6b0545..25d1406653 100644
--- a/keyboards/xelus/pachi/rgb/rev2/rev2.c
+++ b/keyboards/xelus/pachi/rgb/rev2/rev2.c
@@ -22,7 +22,7 @@ void matrix_io_delay(void) { __asm__ volatile("nop\nnop\nnop\n"); }
22#ifdef RGB_MATRIX_ENABLE 22#ifdef RGB_MATRIX_ENABLE
23#include "i2c_master.h" 23#include "i2c_master.h"
24#include "drivers/led/issi/is31fl3741.h" 24#include "drivers/led/issi/is31fl3741.h"
25const is31fl3741_led_t PROGMEM g_is31fl3741_leds[RGB_MATRIX_LED_COUNT] = { 25const is31fl3741_led_t PROGMEM g_is31fl3741_leds[IS31FL3741_LED_COUNT] = {
26/* Refer to IS31 manual for these locations 26/* Refer to IS31 manual for these locations
27 * driver 27 * driver
28 * | R location 28 * | R location
@@ -195,7 +195,7 @@ led_config_t g_led_config = { {
195static void init(void) { 195static void init(void) {
196 i2c_init(); 196 i2c_init();
197 is31fl3741_init(IS31FL3741_I2C_ADDRESS_1); 197 is31fl3741_init(IS31FL3741_I2C_ADDRESS_1);
198 for (int index = 0; index < ISSI_DRIVER_TOTAL; index++) { 198 for (int index = 0; index < IS31FL3741_LED_COUNT; index++) {
199 bool enabled = !( ( index == -1+0+13) || //A13 199 bool enabled = !( ( index == -1+0+13) || //A13
200 ( index == -1+13+3) || //B3 200 ( index == -1+13+3) || //B3
201 ( index == -1+13+13) || //B13 201 ( index == -1+13+13) || //B13