summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRyan <fauxpark@gmail.com>2021-10-11 10:57:49 +1100
committerGitHub <noreply@github.com>2021-10-10 16:57:49 -0700
commitb487e10753c26204146ef8f1e71d18ff503675d2 (patch)
treee207c357d2b6733ff9c0ea64e78b14498051976a
parenta7810db7ba35c5354708891ad3da317937e953d3 (diff)
Clean up LED/RGB Matrix driver config (#14760)
-rw-r--r--keyboards/dztech/dz60rgb/v1/config.h6
-rw-r--r--keyboards/dztech/dz60rgb/v2/config.h6
-rw-r--r--keyboards/dztech/dz60rgb/v2_1/config.h6
-rw-r--r--keyboards/dztech/dz60rgb_ansi/v1/config.h6
-rw-r--r--keyboards/dztech/dz60rgb_ansi/v2/config.h6
-rw-r--r--keyboards/dztech/dz60rgb_wkl/v1/config.h6
-rw-r--r--keyboards/dztech/dz60rgb_wkl/v2/config.h6
-rw-r--r--keyboards/dztech/dz60rgb_wkl/v2_1/config.h6
-rwxr-xr-xkeyboards/dztech/dz65rgb/v3/config.h4
-rw-r--r--keyboards/evyd13/atom47/rev5/config.h6
-rw-r--r--keyboards/exclusive/e6_rgb/config.h6
-rw-r--r--keyboards/kbdfans/bella/rgb/config.h4
-rw-r--r--keyboards/kbdfans/bella/rgb_iso/config.h4
-rw-r--r--keyboards/kbdfans/boop65/rgb/config.h3
-rwxr-xr-xkeyboards/kbdfans/kbd67/mkiirgb/v3/config.h4
-rw-r--r--keyboards/kbdfans/kbdmini/config.h6
-rw-r--r--keyboards/latin60rgb/config.h6
-rw-r--r--keyboards/latin6rgb/config.h7
-rw-r--r--keyboards/mechlovin/adelais/rgb_led/rev3/config.h4
-rw-r--r--keyboards/mechlovin/delphine/rgb_led/config.h3
-rw-r--r--keyboards/mechlovin/infinity87/rgb_rev1/config.h4
-rwxr-xr-xkeyboards/melgeek/mach80/rev1/config.h3
-rw-r--r--keyboards/melgeek/mj61/config.h1
-rw-r--r--keyboards/melgeek/mj61/rev1/config.h3
-rw-r--r--keyboards/melgeek/mj61/rev2/config.h3
-rw-r--r--keyboards/melgeek/mj63/config.h1
-rw-r--r--keyboards/melgeek/mj63/rev1/config.h3
-rw-r--r--keyboards/melgeek/mj63/rev2/config.h3
-rw-r--r--keyboards/melgeek/mj64/config.h1
-rw-r--r--keyboards/melgeek/mj64/rev1/config.h3
-rw-r--r--keyboards/melgeek/mj64/rev2/config.h3
-rw-r--r--keyboards/melgeek/mj64/rev3/config.h3
-rw-r--r--keyboards/melgeek/mj65/config.h1
-rw-r--r--keyboards/melgeek/mj65/rev3/config.h3
-rwxr-xr-xkeyboards/melgeek/mojo68/config.h1
-rwxr-xr-xkeyboards/melgeek/mojo68/rev1/config.h3
-rw-r--r--keyboards/melgeek/mojo75/config.h1
-rw-r--r--keyboards/melgeek/mojo75/rev1/config.h3
-rw-r--r--keyboards/melgeek/z70ultra/config.h4
-rw-r--r--keyboards/miller/gm862/config.h6
-rw-r--r--keyboards/mt64rgb/config.h6
-rw-r--r--keyboards/neson_design/n6/config.h3
-rw-r--r--keyboards/opendeck/32/rev1/config.h3
-rw-r--r--keyboards/owlab/voice65/hotswap/config.h6
-rw-r--r--keyboards/owlab/voice65/soldered/config.h6
-rw-r--r--keyboards/planck/ez/config.h4
-rw-r--r--keyboards/smallkeyboard/config.h7
-rw-r--r--keyboards/xbows/numpad/config.h3
-rw-r--r--keyboards/xelus/pachi/rgb/config.h5
-rw-r--r--quantum/led_matrix/led_matrix_drivers.c135
-rw-r--r--quantum/rgb_matrix/rgb_matrix_drivers.c127
51 files changed, 198 insertions, 265 deletions
diff --git a/keyboards/dztech/dz60rgb/v1/config.h b/keyboards/dztech/dz60rgb/v1/config.h
index f6ee7c4e2f..b4b23a6213 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 6108e99034..338575ee9a 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 06d504e393..e6c08eab42 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 dc2a6f4bc0..7341c1c02c 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 6c1e006821..7e6842d8d6 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 12317c2d35..c242401f6b 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 945b591ce6..45ccf6c9f7 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 76b0b6ea52..0e5bb8f67b 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 dbf2f5b3ce..053b06fae1 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 f1f8eacfa4..07252537ac 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 <http://www.gnu.org/licenses/>.
// 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 b1b8b1bed7..fd221f1765 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 07594a34ab..7d93ecb8d7 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 4fda998677..9d931cbe85 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 71db0f8b57..ba9c627c15 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 1ee83cdc94..7111bd5faf 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 fc65f43411..beb0637adc 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 97b4812910..5a4b639ab2 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 174c23c30c..fa9abbea6c 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 f55d386f7a..5b3a8e8250 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 <http://www.gnu.org/licenses/>.
// 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 9a653d7595..edb476ecb7 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 76c6e0db73..8cef83f897 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 e3ae4de76d..868832d808 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 6ba19dd757..313c4473bc 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 9586a6930d..9d73a4fe96 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 e6c6e9610e..616426df65 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 46d3b0fb7b..0292fa6461 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 1f6914f661..75f7da43a6 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 e6c6e9610e..616426df65 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 920d34acd5..c3741bc062 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 fb45ef3582..db846cb011 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 8af6833b21..fbe170f18e 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 26909d5598..dfde77f24a 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 399c243ac6..bf8ca7c2c3 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 7955f4be97..d9a8c5a815 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 c4c1dbb0b7..923c15b06a 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 aed2a45c37..74a7e3dc26 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 d5bb4b4547..34f64e844e 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 c841c96fde..eaac850b6d 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 e4530e2eaa..d01d0222ce 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 e6e1b4c1df..7c4bfacd43 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 8574d72360..810285d1e0 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 d3b49becb3..4a9d3c56c6 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 8b25ab2564..9c7d4ddd9f 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 fc894bd3ce..7a389264db 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 <http://www.gnu.org/licenses/>.
# 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 e0e53a5d5d..9e5dc7bb18 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 <http://www.gnu.org/licenses/>.
# 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 4d1f1e92fe..504ab812e1 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 689d53d54e..24c81258c7 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 d3ef6ed9d1..4617ce36af 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 3bc7071ec9..f144db47a2 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 1d46b2c506..efe0082dcb 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 2cec162e22..4335088eb8 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
}