diff --git a/keyboards/dztech/dz60rgb/v1/config.h b/keyboards/dztech/dz60rgb/v1/config.h
index f6ee7c4e2ff..b4b23a6213b 100644
--- a/keyboards/dztech/dz60rgb/v1/config.h
+++ b/keyboards/dztech/dz60rgb/v1/config.h
@@ -46,8 +46,6 @@
# define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH
# define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_ALL
# define DRIVER_ADDR_1 0b1010000
-# define DRIVER_ADDR_2 0b1010000 // this is here for compliancy reasons.
-# define DRIVER_COUNT 2
-# define DRIVER_1_LED_TOTAL 63
-# define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL
+# define DRIVER_COUNT 1
+# define DRIVER_LED_TOTAL 63
#endif
diff --git a/keyboards/dztech/dz60rgb/v2/config.h b/keyboards/dztech/dz60rgb/v2/config.h
index 6108e990343..338575ee9a6 100644
--- a/keyboards/dztech/dz60rgb/v2/config.h
+++ b/keyboards/dztech/dz60rgb/v2/config.h
@@ -56,8 +56,6 @@
# define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH
# define DISABLE_RGB_MATRIX_DIGITAL_RAIN
# define DRIVER_ADDR_1 0b1010000
-# define DRIVER_ADDR_2 0b1010000 // this is here for compliancy reasons.
-# define DRIVER_COUNT 2
-# define DRIVER_1_LED_TOTAL 63
-# define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL
+# define DRIVER_COUNT 1
+# define DRIVER_LED_TOTAL 63
#endif
diff --git a/keyboards/dztech/dz60rgb/v2_1/config.h b/keyboards/dztech/dz60rgb/v2_1/config.h
index 06d504e3933..e6c08eab42e 100644
--- a/keyboards/dztech/dz60rgb/v2_1/config.h
+++ b/keyboards/dztech/dz60rgb/v2_1/config.h
@@ -72,8 +72,6 @@
# define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH
# define DISABLE_RGB_MATRIX_DIGITAL_RAIN
# define DRIVER_ADDR_1 0b1010000
-# define DRIVER_ADDR_2 0b1010000 // this is here for compliancy reasons.
-# define DRIVER_COUNT 2
-# define DRIVER_1_LED_TOTAL 63
-# define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL
+# define DRIVER_COUNT 1
+# define DRIVER_LED_TOTAL 63
#endif
diff --git a/keyboards/dztech/dz60rgb_ansi/v1/config.h b/keyboards/dztech/dz60rgb_ansi/v1/config.h
index dc2a6f4bc0f..7341c1c02c0 100644
--- a/keyboards/dztech/dz60rgb_ansi/v1/config.h
+++ b/keyboards/dztech/dz60rgb_ansi/v1/config.h
@@ -46,8 +46,6 @@
# define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH
# define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_ALL
# define DRIVER_ADDR_1 0b1010000
-# define DRIVER_ADDR_2 0b1010000 // this is here for compliancy reasons.
-# define DRIVER_COUNT 2
-# define DRIVER_1_LED_TOTAL 61
-# define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL
+# define DRIVER_COUNT 1
+# define DRIVER_LED_TOTAL 61
#endif
diff --git a/keyboards/dztech/dz60rgb_ansi/v2/config.h b/keyboards/dztech/dz60rgb_ansi/v2/config.h
index 6c1e0068217..7e6842d8d66 100644
--- a/keyboards/dztech/dz60rgb_ansi/v2/config.h
+++ b/keyboards/dztech/dz60rgb_ansi/v2/config.h
@@ -56,8 +56,6 @@
# define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH
# define DISABLE_RGB_MATRIX_DIGITAL_RAIN
# define DRIVER_ADDR_1 0b1010000
-# define DRIVER_ADDR_2 0b1010000 // this is here for compliancy reasons.
-# define DRIVER_COUNT 2
-# define DRIVER_1_LED_TOTAL 61
-# define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL
+# define DRIVER_COUNT 1
+# define DRIVER_LED_TOTAL 61
#endif
diff --git a/keyboards/dztech/dz60rgb_wkl/v1/config.h b/keyboards/dztech/dz60rgb_wkl/v1/config.h
index 12317c2d359..c242401f6bc 100644
--- a/keyboards/dztech/dz60rgb_wkl/v1/config.h
+++ b/keyboards/dztech/dz60rgb_wkl/v1/config.h
@@ -46,8 +46,6 @@
# define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH
# define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_ALL
# define DRIVER_ADDR_1 0b1010000
-# define DRIVER_ADDR_2 0b1010000 // this is here for compliancy reasons.
-# define DRIVER_COUNT 2
-# define DRIVER_1_LED_TOTAL 62
-# define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL
+# define DRIVER_COUNT 1
+# define DRIVER_LED_TOTAL 62
#endif
diff --git a/keyboards/dztech/dz60rgb_wkl/v2/config.h b/keyboards/dztech/dz60rgb_wkl/v2/config.h
index 945b591ce6b..45ccf6c9f7e 100644
--- a/keyboards/dztech/dz60rgb_wkl/v2/config.h
+++ b/keyboards/dztech/dz60rgb_wkl/v2/config.h
@@ -56,8 +56,6 @@
# define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH
# define DISABLE_RGB_MATRIX_DIGITAL_RAIN
# define DRIVER_ADDR_1 0b1010000
-# define DRIVER_ADDR_2 0b1010000 // this is here for compliancy reasons.
-# define DRIVER_COUNT 2
-# define DRIVER_1_LED_TOTAL 62
-# define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL
+# define DRIVER_COUNT 1
+# define DRIVER_LED_TOTAL 62
#endif
diff --git a/keyboards/dztech/dz60rgb_wkl/v2_1/config.h b/keyboards/dztech/dz60rgb_wkl/v2_1/config.h
index 76b0b6ea529..0e5bb8f67ba 100644
--- a/keyboards/dztech/dz60rgb_wkl/v2_1/config.h
+++ b/keyboards/dztech/dz60rgb_wkl/v2_1/config.h
@@ -72,8 +72,6 @@
# define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH
# define DISABLE_RGB_MATRIX_DIGITAL_RAIN
# define DRIVER_ADDR_1 0b1010000
-# define DRIVER_ADDR_2 0b1010000 // this is here for compliancy reasons.
-# define DRIVER_COUNT 2
-# define DRIVER_1_LED_TOTAL 62
-# define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL
+# define DRIVER_COUNT 1
+# define DRIVER_LED_TOTAL 62
#endif
diff --git a/keyboards/dztech/dz65rgb/v3/config.h b/keyboards/dztech/dz65rgb/v3/config.h
index dbf2f5b3ce8..053b06fae11 100755
--- a/keyboards/dztech/dz65rgb/v3/config.h
+++ b/keyboards/dztech/dz65rgb/v3/config.h
@@ -49,9 +49,7 @@
# define RGB_MATRIX_LED_FLUSH_LIMIT 26
# define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_ALL
# define DRIVER_ADDR_1 0b0110000
-# define DRIVER_ADDR_2 0b0110000 // this is here for compliancy reasons.
# define DRIVER_COUNT 1
-# define DRIVER_1_LED_TOTAL 68
-# define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL
+# define DRIVER_LED_TOTAL 68
# define DRIVER_INDICATOR_LED_TOTAL 0
#endif
diff --git a/keyboards/evyd13/atom47/rev5/config.h b/keyboards/evyd13/atom47/rev5/config.h
index f1f8eacfa47..07252537ac2 100644
--- a/keyboards/evyd13/atom47/rev5/config.h
+++ b/keyboards/evyd13/atom47/rev5/config.h
@@ -157,8 +157,6 @@ along with this program. If not, see .
// ADDR2 represents A3:A2 of the 7-bit address.
// The result is: 0b101(ADDR2)(ADDR1)
#define DRIVER_ADDR_1 0b1010000
-#define DRIVER_ADDR_2 0b1010000 // this is here for compliancy reasons.
-#define DRIVER_COUNT 2
-#define DRIVER_1_LED_TOTAL 64
-#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL
\ No newline at end of file
+#define DRIVER_COUNT 1
+#define DRIVER_LED_TOTAL 64
diff --git a/keyboards/exclusive/e6_rgb/config.h b/keyboards/exclusive/e6_rgb/config.h
index b1b8b1bed71..fd221f1765d 100644
--- a/keyboards/exclusive/e6_rgb/config.h
+++ b/keyboards/exclusive/e6_rgb/config.h
@@ -31,8 +31,6 @@
#define RGBLIGHT_VAL_STEP 8
#define DRIVER_ADDR_1 0b1010000
-#define DRIVER_ADDR_2 0b1010000 // this is here for compliancy reasons.
-#define DRIVER_COUNT 2
-#define DRIVER_1_LED_TOTAL 63
-#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL
+#define DRIVER_COUNT 1
+#define DRIVER_LED_TOTAL 63
diff --git a/keyboards/kbdfans/bella/rgb/config.h b/keyboards/kbdfans/bella/rgb/config.h
index 07594a34abc..7d93ecb8d74 100644
--- a/keyboards/kbdfans/bella/rgb/config.h
+++ b/keyboards/kbdfans/bella/rgb/config.h
@@ -48,10 +48,8 @@
//#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_SOLID_COLOR
#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_ALL
#define DRIVER_ADDR_1 0b0110000
-#define DRIVER_ADDR_2 0b0110000 // this is here for compliancy reasons.
#define DRIVER_COUNT 1
-#define DRIVER_1_LED_TOTAL 108
-#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL
+#define DRIVER_LED_TOTAL 108
#define DRIVER_INDICATOR_LED_TOTAL 0
#endif
#define DYNAMIC_KEYMAP_LAYER_COUNT 2
diff --git a/keyboards/kbdfans/bella/rgb_iso/config.h b/keyboards/kbdfans/bella/rgb_iso/config.h
index 4fda9986779..9d931cbe85a 100644
--- a/keyboards/kbdfans/bella/rgb_iso/config.h
+++ b/keyboards/kbdfans/bella/rgb_iso/config.h
@@ -48,10 +48,8 @@
//#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_SOLID_COLOR
#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_ALL
#define DRIVER_ADDR_1 0b0110000
-#define DRIVER_ADDR_2 0b0110000 // this is here for compliancy reasons.
#define DRIVER_COUNT 1
-#define DRIVER_1_LED_TOTAL 109
-#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL
+#define DRIVER_LED_TOTAL 109
#define DRIVER_INDICATOR_LED_TOTAL 0
#endif
#define DYNAMIC_KEYMAP_LAYER_COUNT 2
diff --git a/keyboards/kbdfans/boop65/rgb/config.h b/keyboards/kbdfans/boop65/rgb/config.h
index 71db0f8b57d..ba9c627c151 100644
--- a/keyboards/kbdfans/boop65/rgb/config.h
+++ b/keyboards/kbdfans/boop65/rgb/config.h
@@ -54,8 +54,7 @@
# define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_ALL
# define DRIVER_ADDR_1 0b0110000
# define DRIVER_COUNT 1
-# define DRIVER_1_LED_TOTAL 83
-# define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL
+# define DRIVER_LED_TOTAL 83
# define DRIVER_INDICATOR_LED_TOTAL 0
#endif
diff --git a/keyboards/kbdfans/kbd67/mkiirgb/v3/config.h b/keyboards/kbdfans/kbd67/mkiirgb/v3/config.h
index 1ee83cdc942..7111bd5faf8 100755
--- a/keyboards/kbdfans/kbd67/mkiirgb/v3/config.h
+++ b/keyboards/kbdfans/kbd67/mkiirgb/v3/config.h
@@ -67,9 +67,7 @@
#define RGB_MATRIX_LED_FLUSH_LIMIT 26
#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_ALL
#define DRIVER_ADDR_1 0b0110000
-#define DRIVER_ADDR_2 0b0110000 // this is here for compliancy reasons.
#define DRIVER_COUNT 1
-#define DRIVER_1_LED_TOTAL 67
-#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL
+#define DRIVER_LED_TOTAL 67
#define DRIVER_INDICATOR_LED_TOTAL 0
#endif
diff --git a/keyboards/kbdfans/kbdmini/config.h b/keyboards/kbdfans/kbdmini/config.h
index fc65f43411e..beb0637adcd 100644
--- a/keyboards/kbdfans/kbdmini/config.h
+++ b/keyboards/kbdfans/kbdmini/config.h
@@ -54,10 +54,8 @@
#define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH
#define DISABLE_RGB_MATRIX_DIGITAL_RAIN
#define DRIVER_ADDR_1 0b1010000
-#define DRIVER_ADDR_2 0b1010000 // this is here for compliancy reasons.
-#define DRIVER_COUNT 2
-#define DRIVER_1_LED_TOTAL 52
-#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL
+#define DRIVER_COUNT 1
+#define DRIVER_LED_TOTAL 52
#endif
/* disable these deprecated features by default */
diff --git a/keyboards/latin60rgb/config.h b/keyboards/latin60rgb/config.h
index 97b4812910e..5a4b639ab24 100644
--- a/keyboards/latin60rgb/config.h
+++ b/keyboards/latin60rgb/config.h
@@ -72,8 +72,6 @@
# define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH
# define DISABLE_RGB_MATRIX_DIGITAL_RAIN
# define DRIVER_ADDR_1 0b1010000
-# define DRIVER_ADDR_2 0b1010000 // this is here for compliancy reasons.
-# define DRIVER_COUNT 2
-# define DRIVER_1_LED_TOTAL 60
-# define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL
+# define DRIVER_COUNT 1
+# define DRIVER_LED_TOTAL 60
#endif
diff --git a/keyboards/latin6rgb/config.h b/keyboards/latin6rgb/config.h
index 174c23c30c2..fa9abbea6cc 100644
--- a/keyboards/latin6rgb/config.h
+++ b/keyboards/latin6rgb/config.h
@@ -84,14 +84,9 @@
// 0b1110101 AD <-> SCL
// 0b1110110 AD <-> SDA
#define DRIVER_ADDR_1 0b1110100
-//#define DRIVER_ADDR_2 0b1110110
#define DRIVER_COUNT 1
-#define DRIVER_1_LED_TOTAL 6
-//#define DRIVER_1_LED_TOTAL 25
-//#define DRIVER_2_LED_TOTAL 24
-//#define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)
-#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL
+#define DRIVER_LED_TOTAL 6
#endif
//#define RGB_DI_PIN B7
//#ifdef RGB_DI_PIN
diff --git a/keyboards/mechlovin/adelais/rgb_led/rev3/config.h b/keyboards/mechlovin/adelais/rgb_led/rev3/config.h
index f55d386f7ae..5b3a8e8250e 100644
--- a/keyboards/mechlovin/adelais/rgb_led/rev3/config.h
+++ b/keyboards/mechlovin/adelais/rgb_led/rev3/config.h
@@ -50,10 +50,8 @@ along with this program. If not, see .
// 0b1110101 AD <-> SCL
// 0b1110110 AD <-> SDA
#define DRIVER_ADDR_1 0b0110010
-#define DRIVER_ADDR_2 0b0110010
#define DRIVER_COUNT 1
-#define DRIVER_1_LED_TOTAL 66
-#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL
+#define DRIVER_LED_TOTAL 66
#define RGB_MATRIX_KEYPRESSES // reacts to keypresses
#define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses)
#define RGB_MATRIX_FRAMEBUFFER_EFFECTS
diff --git a/keyboards/mechlovin/delphine/rgb_led/config.h b/keyboards/mechlovin/delphine/rgb_led/config.h
index 9a653d75954..edb476ecb75 100644
--- a/keyboards/mechlovin/delphine/rgb_led/config.h
+++ b/keyboards/mechlovin/delphine/rgb_led/config.h
@@ -33,10 +33,7 @@
// 0b1110101 AD <-> SCL
// 0b1110110 AD <-> SDA
#define DRIVER_ADDR_1 0b1110110
-#define DRIVER_ADDR_2 0b1110100
#define DRIVER_COUNT 1
-#define DRIVER_1_LED_TOTAL 25
-#define DRIVER_2_LED_TOTAL 0
#define DRIVER_LED_TOTAL 25
#define RGB_MATRIX_KEYPRESSES // reacts to keypresses
#define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses)
diff --git a/keyboards/mechlovin/infinity87/rgb_rev1/config.h b/keyboards/mechlovin/infinity87/rgb_rev1/config.h
index 76c6e0db731..8cef83f8972 100644
--- a/keyboards/mechlovin/infinity87/rgb_rev1/config.h
+++ b/keyboards/mechlovin/infinity87/rgb_rev1/config.h
@@ -44,8 +44,6 @@
#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_ALL
//#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_SOLID_REACTIVE_SIMPLE
#define DRIVER_ADDR_1 0b0110010
-#define DRIVER_ADDR_2 0b0110010 // this is here for compliancy reasons.
#define DRIVER_COUNT 1
-#define DRIVER_1_LED_TOTAL 91
-#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL
+#define DRIVER_LED_TOTAL 91
#define DRIVER_INDICATOR_LED_TOTAL 0
diff --git a/keyboards/melgeek/mach80/rev1/config.h b/keyboards/melgeek/mach80/rev1/config.h
index e3ae4de76d4..868832d8086 100755
--- a/keyboards/melgeek/mach80/rev1/config.h
+++ b/keyboards/melgeek/mach80/rev1/config.h
@@ -34,8 +34,7 @@
/* COL2ROW, ROW2COL*/
#define DIODE_DIRECTION ROW2COL
-#define DRIVER_1_LED_TOTAL 97
-#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL
+#define DRIVER_LED_TOTAL 97
#define DRIVER_INDICATOR_LED_TOTAL 3
diff --git a/keyboards/melgeek/mj61/config.h b/keyboards/melgeek/mj61/config.h
index 6ba19dd7573..313c4473bca 100644
--- a/keyboards/melgeek/mj61/config.h
+++ b/keyboards/melgeek/mj61/config.h
@@ -47,5 +47,4 @@
//#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_SOLID_COLOR
#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_ALL
#define DRIVER_ADDR_1 0b0110000
-#define DRIVER_ADDR_2 0b0110000 // this is here for compliancy reasons.
#define DRIVER_COUNT 1
diff --git a/keyboards/melgeek/mj61/rev1/config.h b/keyboards/melgeek/mj61/rev1/config.h
index 9586a6930d8..9d73a4fe96a 100644
--- a/keyboards/melgeek/mj61/rev1/config.h
+++ b/keyboards/melgeek/mj61/rev1/config.h
@@ -34,6 +34,5 @@
/* COL2ROW, ROW2COL*/
#define DIODE_DIRECTION COL2ROW
-#define DRIVER_1_LED_TOTAL 63
-#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL
+#define DRIVER_LED_TOTAL 63
#define DRIVER_INDICATOR_LED_TOTAL 0
diff --git a/keyboards/melgeek/mj61/rev2/config.h b/keyboards/melgeek/mj61/rev2/config.h
index e6c6e9610e4..616426df655 100644
--- a/keyboards/melgeek/mj61/rev2/config.h
+++ b/keyboards/melgeek/mj61/rev2/config.h
@@ -34,6 +34,5 @@
/* COL2ROW, ROW2COL*/
#define DIODE_DIRECTION COL2ROW
-#define DRIVER_1_LED_TOTAL 71
-#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL
+#define DRIVER_LED_TOTAL 71
#define DRIVER_INDICATOR_LED_TOTAL 0
diff --git a/keyboards/melgeek/mj63/config.h b/keyboards/melgeek/mj63/config.h
index 46d3b0fb7b9..0292fa64613 100644
--- a/keyboards/melgeek/mj63/config.h
+++ b/keyboards/melgeek/mj63/config.h
@@ -47,5 +47,4 @@
//#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_SOLID_COLOR
#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_ALL
#define DRIVER_ADDR_1 0b0110000
-#define DRIVER_ADDR_2 0b0110000 // this is here for compliancy reasons.
#define DRIVER_COUNT 1
diff --git a/keyboards/melgeek/mj63/rev1/config.h b/keyboards/melgeek/mj63/rev1/config.h
index 1f6914f6610..75f7da43a6b 100644
--- a/keyboards/melgeek/mj63/rev1/config.h
+++ b/keyboards/melgeek/mj63/rev1/config.h
@@ -34,6 +34,5 @@
/* COL2ROW, ROW2COL*/
#define DIODE_DIRECTION COL2ROW
-#define DRIVER_1_LED_TOTAL 65
-#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL
+#define DRIVER_LED_TOTAL 65
#define DRIVER_INDICATOR_LED_TOTAL 0
diff --git a/keyboards/melgeek/mj63/rev2/config.h b/keyboards/melgeek/mj63/rev2/config.h
index e6c6e9610e4..616426df655 100644
--- a/keyboards/melgeek/mj63/rev2/config.h
+++ b/keyboards/melgeek/mj63/rev2/config.h
@@ -34,6 +34,5 @@
/* COL2ROW, ROW2COL*/
#define DIODE_DIRECTION COL2ROW
-#define DRIVER_1_LED_TOTAL 71
-#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL
+#define DRIVER_LED_TOTAL 71
#define DRIVER_INDICATOR_LED_TOTAL 0
diff --git a/keyboards/melgeek/mj64/config.h b/keyboards/melgeek/mj64/config.h
index 920d34acd50..c3741bc062d 100644
--- a/keyboards/melgeek/mj64/config.h
+++ b/keyboards/melgeek/mj64/config.h
@@ -47,5 +47,4 @@
//#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_SOLID_COLOR
#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_ALL
#define DRIVER_ADDR_1 0b0110000
-#define DRIVER_ADDR_2 0b0110000 // this is here for compliancy reasons.
#define DRIVER_COUNT 1
diff --git a/keyboards/melgeek/mj64/rev1/config.h b/keyboards/melgeek/mj64/rev1/config.h
index fb45ef3582a..db846cb0118 100644
--- a/keyboards/melgeek/mj64/rev1/config.h
+++ b/keyboards/melgeek/mj64/rev1/config.h
@@ -34,6 +34,5 @@
/* COL2ROW, ROW2COL*/
#define DIODE_DIRECTION COL2ROW
-#define DRIVER_1_LED_TOTAL 64
-#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL
+#define DRIVER_LED_TOTAL 64
#define DRIVER_INDICATOR_LED_TOTAL 0
diff --git a/keyboards/melgeek/mj64/rev2/config.h b/keyboards/melgeek/mj64/rev2/config.h
index 8af6833b218..fbe170f18eb 100644
--- a/keyboards/melgeek/mj64/rev2/config.h
+++ b/keyboards/melgeek/mj64/rev2/config.h
@@ -34,6 +34,5 @@
/* COL2ROW, ROW2COL*/
#define DIODE_DIRECTION COL2ROW
-#define DRIVER_1_LED_TOTAL 66
-#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL
+#define DRIVER_LED_TOTAL 66
#define DRIVER_INDICATOR_LED_TOTAL 0
diff --git a/keyboards/melgeek/mj64/rev3/config.h b/keyboards/melgeek/mj64/rev3/config.h
index 26909d55984..dfde77f24ac 100644
--- a/keyboards/melgeek/mj64/rev3/config.h
+++ b/keyboards/melgeek/mj64/rev3/config.h
@@ -34,6 +34,5 @@
/* COL2ROW, ROW2COL*/
#define DIODE_DIRECTION COL2ROW
-#define DRIVER_1_LED_TOTAL 72
-#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL
+#define DRIVER_LED_TOTAL 72
#define DRIVER_INDICATOR_LED_TOTAL 0
diff --git a/keyboards/melgeek/mj65/config.h b/keyboards/melgeek/mj65/config.h
index 399c243ac60..bf8ca7c2c36 100644
--- a/keyboards/melgeek/mj65/config.h
+++ b/keyboards/melgeek/mj65/config.h
@@ -47,5 +47,4 @@
//#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_SOLID_COLOR
#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_ALL
#define DRIVER_ADDR_1 0b0110000
-#define DRIVER_ADDR_2 0b0110000 // this is here for compliancy reasons.
#define DRIVER_COUNT 1
diff --git a/keyboards/melgeek/mj65/rev3/config.h b/keyboards/melgeek/mj65/rev3/config.h
index 7955f4be971..d9a8c5a815c 100644
--- a/keyboards/melgeek/mj65/rev3/config.h
+++ b/keyboards/melgeek/mj65/rev3/config.h
@@ -34,6 +34,5 @@
/* COL2ROW, ROW2COL*/
#define DIODE_DIRECTION COL2ROW
-#define DRIVER_1_LED_TOTAL 76
-#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL
+#define DRIVER_LED_TOTAL 76
#define DRIVER_INDICATOR_LED_TOTAL 0
diff --git a/keyboards/melgeek/mojo68/config.h b/keyboards/melgeek/mojo68/config.h
index c4c1dbb0b72..923c15b06a7 100755
--- a/keyboards/melgeek/mojo68/config.h
+++ b/keyboards/melgeek/mojo68/config.h
@@ -47,5 +47,4 @@
//#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_SOLID_COLOR
#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_ALL
#define DRIVER_ADDR_1 0b0110000
-#define DRIVER_ADDR_2 0b0110000 // this is here for compliancy reasons.
#define DRIVER_COUNT 1
diff --git a/keyboards/melgeek/mojo68/rev1/config.h b/keyboards/melgeek/mojo68/rev1/config.h
index aed2a45c37f..74a7e3dc26e 100755
--- a/keyboards/melgeek/mojo68/rev1/config.h
+++ b/keyboards/melgeek/mojo68/rev1/config.h
@@ -34,6 +34,5 @@
/* COL2ROW, ROW2COL*/
#define DIODE_DIRECTION COL2ROW
-#define DRIVER_1_LED_TOTAL 68
-#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL
+#define DRIVER_LED_TOTAL 68
#define DRIVER_INDICATOR_LED_TOTAL 3
diff --git a/keyboards/melgeek/mojo75/config.h b/keyboards/melgeek/mojo75/config.h
index d5bb4b4547f..34f64e844e4 100644
--- a/keyboards/melgeek/mojo75/config.h
+++ b/keyboards/melgeek/mojo75/config.h
@@ -48,5 +48,4 @@
#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_ALL
//#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_SOLID_REACTIVE_SIMPLE
#define DRIVER_ADDR_1 0b0110000
-#define DRIVER_ADDR_2 0b0110000 // this is here for compliancy reasons.
#define DRIVER_COUNT 1
diff --git a/keyboards/melgeek/mojo75/rev1/config.h b/keyboards/melgeek/mojo75/rev1/config.h
index c841c96fdec..eaac850b6d3 100644
--- a/keyboards/melgeek/mojo75/rev1/config.h
+++ b/keyboards/melgeek/mojo75/rev1/config.h
@@ -34,7 +34,6 @@
/* COL2ROW, ROW2COL*/
#define DIODE_DIRECTION COL2ROW
-#define DRIVER_1_LED_TOTAL 92
-#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL
+#define DRIVER_LED_TOTAL 92
#define DRIVER_INDICATOR_LED_TOTAL 0
diff --git a/keyboards/melgeek/z70ultra/config.h b/keyboards/melgeek/z70ultra/config.h
index e4530e2eaa7..d01d0222ce1 100644
--- a/keyboards/melgeek/z70ultra/config.h
+++ b/keyboards/melgeek/z70ultra/config.h
@@ -46,8 +46,6 @@
//#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_SOLID_COLOR
#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_ALL
#define DRIVER_ADDR_1 0b0110000
-#define DRIVER_ADDR_2 0b0110000 // this is here for compliancy reasons.
#define DRIVER_COUNT 1
-#define DRIVER_1_LED_TOTAL 69
-#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL
+#define DRIVER_LED_TOTAL 69
#define DRIVER_INDICATOR_LED_TOTAL 6
diff --git a/keyboards/miller/gm862/config.h b/keyboards/miller/gm862/config.h
index e6e1b4c1dfd..7c4bfacd43c 100644
--- a/keyboards/miller/gm862/config.h
+++ b/keyboards/miller/gm862/config.h
@@ -55,8 +55,6 @@
# define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH
# define DISABLE_RGB_MATRIX_DIGITAL_RAIN
# define DRIVER_ADDR_1 0b1010000
-# define DRIVER_ADDR_2 0b1010000 // this is here for compliancy reasons.
-# define DRIVER_COUNT 2
-# define DRIVER_1_LED_TOTAL 62
-# define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL
+# define DRIVER_COUNT 1
+# define DRIVER_LED_TOTAL 62
#endif
diff --git a/keyboards/mt64rgb/config.h b/keyboards/mt64rgb/config.h
index 8574d723600..810285d1e07 100644
--- a/keyboards/mt64rgb/config.h
+++ b/keyboards/mt64rgb/config.h
@@ -54,11 +54,9 @@
#define RGB_MATRIX_LED_PROCESS_LIMIT 20
#define RGB_MATRIX_LED_FLUSH_LIMIT 26
#define DRIVER_ADDR_1 0b1010000
-#define DRIVER_ADDR_2 0b1010000
-#define DRIVER_COUNT 2
-#define DRIVER_1_LED_TOTAL 64
-#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL
+#define DRIVER_COUNT 1
+#define DRIVER_LED_TOTAL 64
#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE
diff --git a/keyboards/neson_design/n6/config.h b/keyboards/neson_design/n6/config.h
index d3b49becb32..4a9d3c56c69 100644
--- a/keyboards/neson_design/n6/config.h
+++ b/keyboards/neson_design/n6/config.h
@@ -59,9 +59,8 @@
#define RGBLIGHT_SAT_STEP 8
#define RGBLIGHT_VAL_STEP 8
-#define DRIVER_1_LED_TOTAL 32
#define DRIVER_ADDR_1 0b1110100
#define DRIVER_COUNT 1
-#define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL)
+#define DRIVER_LED_TOTAL 32
#define CAPS_PIN F5
diff --git a/keyboards/opendeck/32/rev1/config.h b/keyboards/opendeck/32/rev1/config.h
index 8b25ab2564e..9c7d4ddd9f8 100644
--- a/keyboards/opendeck/32/rev1/config.h
+++ b/keyboards/opendeck/32/rev1/config.h
@@ -36,8 +36,7 @@
// RGB matrix
#define DRIVER_ADDR_1 0b1110100
#define DRIVER_COUNT 1
-#define DRIVER_1_LED_TOTAL (4 * 8 * 3)
-#define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL)
+#define DRIVER_LED_TOTAL (4 * 8 * 3)
#define RGB_DISABLE_WHEN_USB_SUSPENDED
#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_SPIRAL
#define RGB_MATRIX_DISABLE_KEYCODES
diff --git a/keyboards/owlab/voice65/hotswap/config.h b/keyboards/owlab/voice65/hotswap/config.h
index fc894bd3cec..7a389264db9 100644
--- a/keyboards/owlab/voice65/hotswap/config.h
+++ b/keyboards/owlab/voice65/hotswap/config.h
@@ -77,10 +77,8 @@ along with this program. If not, see .
# define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200
# define RGB_MATRIX_STARTUP_VAL 128
# define DRIVER_ADDR_1 0b0110000
-# define DRIVER_ADDR_2 0b0110000
-# define DRIVER_COUNT 2
-# define DRIVER_1_LED_TOTAL 67
-# define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL
+# define DRIVER_COUNT 1
+# define DRIVER_LED_TOTAL 67
#endif
/* Encoder */
diff --git a/keyboards/owlab/voice65/soldered/config.h b/keyboards/owlab/voice65/soldered/config.h
index e0e53a5d5dd..9e5dc7bb18f 100644
--- a/keyboards/owlab/voice65/soldered/config.h
+++ b/keyboards/owlab/voice65/soldered/config.h
@@ -76,10 +76,8 @@ along with this program. If not, see .
# define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200
# define RGB_MATRIX_STARTUP_VAL 128
# define DRIVER_ADDR_1 0b0110000
-# define DRIVER_ADDR_2 0b0110000
-# define DRIVER_COUNT 2
-# define DRIVER_1_LED_TOTAL 71
-# define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL
+# define DRIVER_COUNT 1
+# define DRIVER_LED_TOTAL 71
#endif
/* Encoder */
diff --git a/keyboards/planck/ez/config.h b/keyboards/planck/ez/config.h
index 4d1f1e92fe7..504ab812e16 100644
--- a/keyboards/planck/ez/config.h
+++ b/keyboards/planck/ez/config.h
@@ -120,11 +120,9 @@
//#define WS2812_EXTERNAL_PULLUP
#define DRIVER_ADDR_1 0b1010000
-#define DRIVER_ADDR_2 0b1010000 // this is here for compliancy reasons.
#define DRIVER_COUNT 1
-#define DRIVER_1_LED_TOTAL 47
-#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL
+#define DRIVER_LED_TOTAL 47
#define RGB_MATRIX_KEYPRESSES
#define RGB_MATRIX_FRAMEBUFFER_EFFECTS
diff --git a/keyboards/smallkeyboard/config.h b/keyboards/smallkeyboard/config.h
index 689d53d54eb..24c81258c75 100644
--- a/keyboards/smallkeyboard/config.h
+++ b/keyboards/smallkeyboard/config.h
@@ -84,14 +84,9 @@
// 0b1110101 AD <-> SCL
// 0b1110110 AD <-> SDA
#define DRIVER_ADDR_1 0b1110100
-//#define DRIVER_ADDR_2 0b1110110
#define DRIVER_COUNT 1
-#define DRIVER_1_LED_TOTAL 6
-//#define DRIVER_1_LED_TOTAL 25
-//#define DRIVER_2_LED_TOTAL 24
-//#define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)
-#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL
+#define DRIVER_LED_TOTAL 6
#endif
//#define RGB_DI_PIN B7
//#ifdef RGB_DI_PIN
diff --git a/keyboards/xbows/numpad/config.h b/keyboards/xbows/numpad/config.h
index d3ef6ed9d12..4617ce36afa 100644
--- a/keyboards/xbows/numpad/config.h
+++ b/keyboards/xbows/numpad/config.h
@@ -46,6 +46,5 @@
# define DRIVER_ADDR_1 0b1110111
# define DRIVER_COUNT 1
-# define DRIVER_1_LED_TOTAL 22
-# define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL)
+# define DRIVER_LED_TOTAL 22
#endif
diff --git a/keyboards/xelus/pachi/rgb/config.h b/keyboards/xelus/pachi/rgb/config.h
index 3bc7071ec97..f144db47a25 100644
--- a/keyboards/xelus/pachi/rgb/config.h
+++ b/keyboards/xelus/pachi/rgb/config.h
@@ -60,11 +60,10 @@
// RGB Matrix defines
#define DRIVER_ADDR_1 0b0110000
-#define DRIVER_ADDR_2 0b0110001
+//#define DRIVER_ADDR_2 0b0110001
#define DRIVER_COUNT 1
-#define DRIVER_1_LED_TOTAL 117
-#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL
+#define DRIVER_LED_TOTAL 117
#define ISSI_DRIVER_TOTAL DRIVER_LED_TOTAL
#define RGB_MATRIX_STARTUP_VAL 80
diff --git a/quantum/led_matrix/led_matrix_drivers.c b/quantum/led_matrix/led_matrix_drivers.c
index 1d46b2c5066..efe0082dcb1 100644
--- a/quantum/led_matrix/led_matrix_drivers.c
+++ b/quantum/led_matrix/led_matrix_drivers.c
@@ -26,128 +26,123 @@
*/
#if defined(IS31FL3731) || defined(IS31FL3733)
-
# include "i2c_master.h"
static void init(void) {
i2c_init();
-# ifdef IS31FL3731
-# ifdef LED_DRIVER_ADDR_1
+
+# if defined(IS31FL3731)
IS31FL3731_init(LED_DRIVER_ADDR_1);
-# endif
-# ifdef LED_DRIVER_ADDR_2
+# if defined(LED_DRIVER_ADDR_2)
IS31FL3731_init(LED_DRIVER_ADDR_2);
-# endif
-# ifdef LED_DRIVER_ADDR_3
+# if defined(LED_DRIVER_ADDR_3)
IS31FL3731_init(LED_DRIVER_ADDR_3);
-# endif
-# ifdef LED_DRIVER_ADDR_4
+# if defined(LED_DRIVER_ADDR_4)
IS31FL3731_init(LED_DRIVER_ADDR_4);
-# endif
-# else
-# ifdef LED_DRIVER_ADDR_1
-# ifndef LED_DRIVER_SYNC_1
-# define LED_DRIVER_SYNC_1 0
+# endif
# endif
- IS31FL3733_init(LED_DRIVER_ADDR_1, LED_DRIVER_SYNC_1);
# endif
-# ifdef LED_DRIVER_ADDR_2
-# ifndef LED_DRIVER_SYNC_2
+
+# elif defined(IS31FL3733)
+# if !defined(LED_DRIVER_SYNC_1)
+# define LED_DRIVER_SYNC_1 0
+# endif
+ IS31FL3733_init(LED_DRIVER_ADDR_1, LED_DRIVER_SYNC_1);
+# if defined(LED_DRIVER_ADDR_2)
+# if !defined(LED_DRIVER_SYNC_2)
# define LED_DRIVER_SYNC_2 0
# endif
IS31FL3733_init(LED_DRIVER_ADDR_2, LED_DRIVER_SYNC_2);
-# endif
-# ifdef LED_DRIVER_ADDR_3
-# ifndef LED_DRIVER_SYNC_3
-# define LED_DRIVER_SYNC_3 0
-# endif
+# if defined(LED_DRIVER_ADDR_3)
+# if !defined(LED_DRIVER_SYNC_3)
+# define LED_DRIVER_SYNC_3 0
+# endif
IS31FL3733_init(LED_DRIVER_ADDR_3, LED_DRIVER_SYNC_3);
-# endif
-# ifdef LED_DRIVER_ADDR_4
-# ifndef LED_DRIVER_SYNC_4
-# define LED_DRIVER_SYNC_4 0
-# endif
+# if defined(LED_DRIVER_ADDR_4)
+# if !defined(LED_DRIVER_SYNC_4)
+# define LED_DRIVER_SYNC_4 0
+# endif
IS31FL3733_init(LED_DRIVER_ADDR_4, LED_DRIVER_SYNC_4);
+# endif
+# endif
# endif
# endif
for (int index = 0; index < DRIVER_LED_TOTAL; index++) {
-# ifdef IS31FL3731
+# if defined(IS31FL3731)
IS31FL3731_set_led_control_register(index, true);
-# else
+# elif defined(IS31FL3733)
IS31FL3733_set_led_control_register(index, true);
# endif
}
+
// This actually updates the LED drivers
-# ifdef IS31FL3731
-# ifdef LED_DRIVER_ADDR_1
+# if defined(IS31FL3731)
IS31FL3731_update_led_control_registers(LED_DRIVER_ADDR_1, 0);
-# endif
-# ifdef LED_DRIVER_ADDR_2
+# if defined(LED_DRIVER_ADDR_2)
IS31FL3731_update_led_control_registers(LED_DRIVER_ADDR_2, 1);
-# endif
-# ifdef LED_DRIVER_ADDR_3
+# if defined(LED_DRIVER_ADDR_3)
IS31FL3731_update_led_control_registers(LED_DRIVER_ADDR_3, 2);
-# endif
-# ifdef LED_DRIVER_ADDR_4
+# if defined(LED_DRIVER_ADDR_4)
IS31FL3731_update_led_control_registers(LED_DRIVER_ADDR_4, 3);
+# endif
+# endif
# endif
-# else
-# ifdef LED_DRIVER_ADDR_1
+
+# elif defined(IS31FL3733)
IS31FL3733_update_led_control_registers(LED_DRIVER_ADDR_1, 0);
-# endif
-# ifdef LED_DRIVER_ADDR_2
+# if defined(LED_DRIVER_ADDR_2)
IS31FL3733_update_led_control_registers(LED_DRIVER_ADDR_2, 1);
-# endif
-# ifdef LED_DRIVER_ADDR_3
+# if defined(LED_DRIVER_ADDR_3)
IS31FL3733_update_led_control_registers(LED_DRIVER_ADDR_3, 2);
-# endif
-# ifdef LED_DRIVER_ADDR_4
+# if defined(LED_DRIVER_ADDR_4)
IS31FL3733_update_led_control_registers(LED_DRIVER_ADDR_4, 3);
+# endif
+# endif
# endif
# endif
}
+# if defined(IS31FL3731)
static void flush(void) {
-# ifdef IS31FL3731
-# ifdef LED_DRIVER_ADDR_1
IS31FL3731_update_pwm_buffers(LED_DRIVER_ADDR_1, 0);
-# endif
-# ifdef LED_DRIVER_ADDR_2
+# if defined(LED_DRIVER_ADDR_2)
IS31FL3731_update_pwm_buffers(LED_DRIVER_ADDR_2, 1);
-# endif
-# ifdef LED_DRIVER_ADDR_3
+# if defined(LED_DRIVER_ADDR_3)
IS31FL3731_update_pwm_buffers(LED_DRIVER_ADDR_3, 2);
-# endif
-# ifdef LED_DRIVER_ADDR_4
+# if defined(LED_DRIVER_ADDR_4)
IS31FL3731_update_pwm_buffers(LED_DRIVER_ADDR_4, 3);
+# endif
+# endif
# endif
-# else
-# ifdef LED_DRIVER_ADDR_1
+}
+
+const led_matrix_driver_t led_matrix_driver = {
+ .init = init,
+ .flush = flush,
+ .set_value = IS31FL3731_set_value,
+ .set_value_all = IS31FL3731_set_value_all,
+};
+
+# elif defined(IS31FL3733)
+static void flush(void) {
IS31FL3733_update_pwm_buffers(LED_DRIVER_ADDR_1, 0);
-# endif
-# ifdef LED_DRIVER_ADDR_2
+# if defined(LED_DRIVER_ADDR_2)
IS31FL3733_update_pwm_buffers(LED_DRIVER_ADDR_2, 1);
-# endif
-# ifdef LED_DRIVER_ADDR_3
+# if defined(LED_DRIVER_ADDR_3)
IS31FL3733_update_pwm_buffers(LED_DRIVER_ADDR_3, 2);
-# endif
-# ifdef LED_DRIVER_ADDR_4
+# if defined(LED_DRIVER_ADDR_4)
IS31FL3733_update_pwm_buffers(LED_DRIVER_ADDR_4, 3);
+# endif
+# endif
# endif
# endif
}
const led_matrix_driver_t led_matrix_driver = {
- .init = init,
- .flush = flush,
-# ifdef IS31FL3731
- .set_value = IS31FL3731_set_value,
- .set_value_all = IS31FL3731_set_value_all,
-# else
- .set_value = IS31FL3733_set_value,
+ .init = init,
+ .flush = flush,
+ .set_value = IS31FL3733_set_value,
.set_value_all = IS31FL3733_set_value_all,
-# endif
};
-
#endif
diff --git a/quantum/rgb_matrix/rgb_matrix_drivers.c b/quantum/rgb_matrix/rgb_matrix_drivers.c
index 2cec162e22c..4335088eb89 100644
--- a/quantum/rgb_matrix/rgb_matrix_drivers.c
+++ b/quantum/rgb_matrix/rgb_matrix_drivers.c
@@ -24,110 +24,126 @@
*/
#if defined(IS31FL3731) || defined(IS31FL3733) || defined(IS31FL3737) || defined(IS31FL3741)
-
# include "i2c_master.h"
+// TODO: Remove this at some later date
+# if defined(DRIVER_ADDR_1) && defined(DRIVER_ADDR_2)
+# if DRIVER_ADDR_1 == DRIVER_ADDR_2
+# error "Setting DRIVER_ADDR_2 == DRIVER_ADDR_1 is obsolete. If you are only using one ISSI driver, set DRIVER_COUNT to 1 and remove DRIVER_ADDR_2"
+# endif
+# endif
+
static void init(void) {
i2c_init();
-# ifdef IS31FL3731
+
+# if defined(IS31FL3731)
IS31FL3731_init(DRIVER_ADDR_1);
-# ifdef DRIVER_ADDR_2
+# if defined(DRIVER_ADDR_2)
IS31FL3731_init(DRIVER_ADDR_2);
-# endif
-# ifdef DRIVER_ADDR_3
+# if defined(DRIVER_ADDR_3)
IS31FL3731_init(DRIVER_ADDR_3);
-# endif
-# ifdef DRIVER_ADDR_4
+# if defined(DRIVER_ADDR_4)
IS31FL3731_init(DRIVER_ADDR_4);
+# endif
+# endif
# endif
+
# elif defined(IS31FL3733)
-# ifndef DRIVER_SYNC_1
+# if !defined(DRIVER_SYNC_1)
# define DRIVER_SYNC_1 0
# endif
IS31FL3733_init(DRIVER_ADDR_1, DRIVER_SYNC_1);
-# if defined DRIVER_ADDR_2 && (DRIVER_ADDR_1 != DRIVER_ADDR_2)
-# ifndef DRIVER_SYNC_2
+# if defined(DRIVER_ADDR_2)
+# if !defined(DRIVER_SYNC_2)
# define DRIVER_SYNC_2 0
# endif
IS31FL3733_init(DRIVER_ADDR_2, DRIVER_SYNC_2);
-# endif
-# ifdef DRIVER_ADDR_3
-# ifndef DRIVER_SYNC_3
-# define DRIVER_SYNC_3 0
-# endif
+# if defined(DRIVER_ADDR_3)
+# if !defined(DRIVER_SYNC_3)
+# define DRIVER_SYNC_3 0
+# endif
IS31FL3733_init(DRIVER_ADDR_3, DRIVER_SYNC_3);
-# endif
-# ifdef DRIVER_ADDR_4
-# ifndef DRIVER_SYNC_4
-# define DRIVER_SYNC_4 0
-# endif
+# if defined(DRIVER_ADDR_4)
+# if !defined(DRIVER_SYNC_4)
+# define DRIVER_SYNC_4 0
+# endif
IS31FL3733_init(DRIVER_ADDR_4, DRIVER_SYNC_4);
+# endif
+# endif
# endif
+
# elif defined(IS31FL3737)
IS31FL3737_init(DRIVER_ADDR_1);
-# if defined(DRIVER_ADDR_2) && (DRIVER_ADDR_2 != DRIVER_ADDR_1) // provides backward compatibility
+# if defined(DRIVER_ADDR_2)
IS31FL3737_init(DRIVER_ADDR_2);
# endif
-# else
+
+# elif defined(IS31FL3741)
IS31FL3741_init(DRIVER_ADDR_1);
# endif
+
for (int index = 0; index < DRIVER_LED_TOTAL; index++) {
bool enabled = true;
+
// This only caches it for later
-# ifdef IS31FL3731
+# if defined(IS31FL3731)
IS31FL3731_set_led_control_register(index, enabled, enabled, enabled);
# elif defined(IS31FL3733)
IS31FL3733_set_led_control_register(index, enabled, enabled, enabled);
# elif defined(IS31FL3737)
IS31FL3737_set_led_control_register(index, enabled, enabled, enabled);
-# else
+# elif defined(IS31FL3741)
IS31FL3741_set_led_control_register(index, enabled, enabled, enabled);
# endif
}
+
// This actually updates the LED drivers
-# ifdef IS31FL3731
+# if defined(IS31FL3731)
IS31FL3731_update_led_control_registers(DRIVER_ADDR_1, 0);
-# ifdef DRIVER_ADDR_2
+# if defined(DRIVER_ADDR_2)
IS31FL3731_update_led_control_registers(DRIVER_ADDR_2, 1);
-# endif
-# ifdef DRIVER_ADDR_3
+# if defined(DRIVER_ADDR_3)
IS31FL3731_update_led_control_registers(DRIVER_ADDR_3, 2);
-# endif
-# ifdef DRIVER_ADDR_4
+# if defined(DRIVER_ADDR_4)
IS31FL3731_update_led_control_registers(DRIVER_ADDR_4, 3);
+# endif
+# endif
# endif
+
# elif defined(IS31FL3733)
IS31FL3733_update_led_control_registers(DRIVER_ADDR_1, 0);
-# ifdef DRIVER_ADDR_2
+# if defined(DRIVER_ADDR_2)
IS31FL3733_update_led_control_registers(DRIVER_ADDR_2, 1);
-# endif
-# ifdef DRIVER_ADDR_3
+# if defined(DRIVER_ADDR_3)
IS31FL3733_update_led_control_registers(DRIVER_ADDR_3, 2);
-# endif
-# ifdef DRIVER_ADDR_4
+# if defined(DRIVER_ADDR_4)
IS31FL3733_update_led_control_registers(DRIVER_ADDR_4, 3);
+# endif
+# endif
# endif
+
# elif defined(IS31FL3737)
IS31FL3737_update_led_control_registers(DRIVER_ADDR_1, 0);
-# if defined(DRIVER_ADDR_2) && (DRIVER_ADDR_2 != DRIVER_ADDR_1) // provides backward compatibility
+# if defined(DRIVER_ADDR_2)
IS31FL3737_update_led_control_registers(DRIVER_ADDR_2, 1);
# endif
-# else
+
+# elif defined(IS31FL3741)
IS31FL3741_update_led_control_registers(DRIVER_ADDR_1, 0);
# endif
}
-# ifdef IS31FL3731
+# if defined(IS31FL3731)
static void flush(void) {
IS31FL3731_update_pwm_buffers(DRIVER_ADDR_1, 0);
-# ifdef DRIVER_ADDR_2
+# if defined(DRIVER_ADDR_2)
IS31FL3731_update_pwm_buffers(DRIVER_ADDR_2, 1);
-# endif
-# ifdef DRIVER_ADDR_3
+# if defined(DRIVER_ADDR_3)
IS31FL3731_update_pwm_buffers(DRIVER_ADDR_3, 2);
-# endif
-# ifdef DRIVER_ADDR_4
+# if defined(DRIVER_ADDR_4)
IS31FL3731_update_pwm_buffers(DRIVER_ADDR_4, 3);
+# endif
+# endif
# endif
}
@@ -137,17 +153,18 @@ const rgb_matrix_driver_t rgb_matrix_driver = {
.set_color = IS31FL3731_set_color,
.set_color_all = IS31FL3731_set_color_all,
};
+
# elif defined(IS31FL3733)
static void flush(void) {
IS31FL3733_update_pwm_buffers(DRIVER_ADDR_1, 0);
-# ifdef DRIVER_ADDR_2
+# if defined(DRIVER_ADDR_2)
IS31FL3733_update_pwm_buffers(DRIVER_ADDR_2, 1);
-# endif
-# ifdef DRIVER_ADDR_3
+# if defined(DRIVER_ADDR_3)
IS31FL3733_update_pwm_buffers(DRIVER_ADDR_3, 2);
-# endif
-# ifdef DRIVER_ADDR_4
+# if defined(DRIVER_ADDR_4)
IS31FL3733_update_pwm_buffers(DRIVER_ADDR_4, 3);
+# endif
+# endif
# endif
}
@@ -157,10 +174,11 @@ const rgb_matrix_driver_t rgb_matrix_driver = {
.set_color = IS31FL3733_set_color,
.set_color_all = IS31FL3733_set_color_all,
};
+
# elif defined(IS31FL3737)
static void flush(void) {
IS31FL3737_update_pwm_buffers(DRIVER_ADDR_1, 0);
-# if defined(DRIVER_ADDR_2) && (DRIVER_ADDR_2 != DRIVER_ADDR_1) // provides backward compatibility
+# if defined(DRIVER_ADDR_2)
IS31FL3737_update_pwm_buffers(DRIVER_ADDR_2, 1);
# endif
}
@@ -171,10 +189,11 @@ const rgb_matrix_driver_t rgb_matrix_driver = {
.set_color = IS31FL3737_set_color,
.set_color_all = IS31FL3737_set_color_all,
};
-# else
+
+# elif defined(IS31FL3741)
static void flush(void) {
IS31FL3741_update_pwm_buffers(DRIVER_ADDR_1, 0);
-# if defined(DRIVER_ADDR_2) && (DRIVER_ADDR_2 != DRIVER_ADDR_1) // provides backward compatibility
+# if defined(DRIVER_ADDR_2)
IS31FL3741_update_pwm_buffers(DRIVER_ADDR_2, 1);
# endif
}
@@ -189,17 +208,19 @@ const rgb_matrix_driver_t rgb_matrix_driver = {
#elif defined(AW20216)
# include "spi_master.h"
+
static void init(void) {
spi_init();
+
AW20216_init(DRIVER_1_CS, DRIVER_1_EN);
-# ifdef DRIVER_2_CS
+# if defined(DRIVER_2_CS)
AW20216_init(DRIVER_2_CS, DRIVER_2_EN);
# endif
}
static void flush(void) {
AW20216_update_pwm_buffers(DRIVER_1_CS, 0);
-# ifdef DRIVER_2_CS
+# if defined(DRIVER_2_CS)
AW20216_update_pwm_buffers(DRIVER_2_CS, 1);
# endif
}