summaryrefslogtreecommitdiff
path: root/quantum
diff options
context:
space:
mode:
authorAndré Greiner-Petter <5708782+AndreG-P@users.noreply.github.com>2023-05-27 12:26:14 +0900
committerGitHub <noreply@github.com>2023-05-27 13:26:14 +1000
commit249fb3c2c2cb1a62f3ea99a67963f5127e280b1f (patch)
tree9c464d09de470af2aa3d02109113cb2fa88f8b1b /quantum
parent5642bd18077061fa21f4850124a9f4eeb8f23ca3 (diff)
[BUG] Allow multiple IS31FL3741 drivers per board in rgb_matrix (#20988)
Diffstat (limited to 'quantum')
-rw-r--r--quantum/rgb_matrix/rgb_matrix_drivers.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/quantum/rgb_matrix/rgb_matrix_drivers.c b/quantum/rgb_matrix/rgb_matrix_drivers.c
index d65121baf4..d66fc801dd 100644
--- a/quantum/rgb_matrix/rgb_matrix_drivers.c
+++ b/quantum/rgb_matrix/rgb_matrix_drivers.c
@@ -98,6 +98,15 @@ static void init(void) {
# elif defined(IS31FL3741)
IS31FL3741_init(DRIVER_ADDR_1);
+# if defined(DRIVER_ADDR_2)
+ IS31FL3741_init(DRIVER_ADDR_2);
+# if defined(DRIVER_ADDR_3)
+ IS31FL3741_init(DRIVER_ADDR_3);
+# if defined(DRIVER_ADDR_4)
+ IS31FL3741_init(DRIVER_ADDR_4);
+# endif
+# endif
+# endif
# elif defined(IS31FLCOMMON)
IS31FL_common_init(DRIVER_ADDR_1, ISSI_SSR_1);
@@ -196,6 +205,15 @@ static void init(void) {
# elif defined(IS31FL3741)
IS31FL3741_update_led_control_registers(DRIVER_ADDR_1, 0);
+# if defined(DRIVER_ADDR_2)
+ IS31FL3741_update_led_control_registers(DRIVER_ADDR_2, 1);
+# if defined(DRIVER_ADDR_3)
+ IS31FL3741_update_led_control_registers(DRIVER_ADDR_3, 2);
+# if defined(DRIVER_ADDR_4)
+ IS31FL3741_update_led_control_registers(DRIVER_ADDR_4, 3);
+# endif
+# endif
+# endif
# elif defined(IS31FLCOMMON)
# ifdef ISSI_MANUAL_SCALING
@@ -315,6 +333,12 @@ static void flush(void) {
IS31FL3741_update_pwm_buffers(DRIVER_ADDR_1, 0);
# if defined(DRIVER_ADDR_2)
IS31FL3741_update_pwm_buffers(DRIVER_ADDR_2, 1);
+# if defined(DRIVER_ADDR_3)
+ IS31FL3741_update_pwm_buffers(DRIVER_ADDR_3, 2);
+# if defined(DRIVER_ADDR_4)
+ IS31FL3741_update_pwm_buffers(DRIVER_ADDR_4, 3);
+# endif
+# endif
# endif
}