From 249fb3c2c2cb1a62f3ea99a67963f5127e280b1f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Greiner-Petter?= <5708782+AndreG-P@users.noreply.github.com> Date: Sat, 27 May 2023 12:26:14 +0900 Subject: [BUG] Allow multiple IS31FL3741 drivers per board in rgb_matrix (#20988) --- quantum/rgb_matrix/rgb_matrix_drivers.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'quantum/rgb_matrix') 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 } -- cgit v1.2.3