From 838dfcf7cc073fce4bf7b0476ed1193dc3fd38fa Mon Sep 17 00:00:00 2001 From: X-Bows Tech <41098278+XBowsTech@users.noreply.github.com> Date: Fri, 6 Nov 2020 03:58:46 +0800 Subject: [PATCH] Add support for 4 IS31FL3731 devices (#10860) This is a simple change.Support for IS31FL3731 has been changed from 2 to 4. --- quantum/rgb_matrix_drivers.c | 30 ++++++++++++++++++++++++------ 1 file changed, 24 insertions(+), 6 deletions(-) diff --git a/quantum/rgb_matrix_drivers.c b/quantum/rgb_matrix_drivers.c index 8f670f9a3364..2978e7bed9ca 100644 --- a/quantum/rgb_matrix_drivers.c +++ b/quantum/rgb_matrix_drivers.c @@ -31,9 +31,15 @@ static void init(void) { i2c_init(); # ifdef IS31FL3731 IS31FL3731_init(DRIVER_ADDR_1); -# ifdef DRIVER_ADDR_2 +# ifdef DRIVER_ADDR_2 IS31FL3731_init(DRIVER_ADDR_2); -# endif +# endif +# ifdef DRIVER_ADDR_3 + IS31FL3731_init(DRIVER_ADDR_3); +# endif +# ifdef DRIVER_ADDR_4 + IS31FL3731_init(DRIVER_ADDR_4); +# endif # elif defined(IS31FL3733) IS31FL3733_init(DRIVER_ADDR_1, 0); # elif defined(IS31FL3737) @@ -57,9 +63,15 @@ static void init(void) { // This actually updates the LED drivers # ifdef IS31FL3731 IS31FL3731_update_led_control_registers(DRIVER_ADDR_1, 0); -# ifdef DRIVER_ADDR_2 +# ifdef DRIVER_ADDR_2 IS31FL3731_update_led_control_registers(DRIVER_ADDR_2, 1); -# endif +# endif +# ifdef DRIVER_ADDR_3 + IS31FL3731_update_led_control_registers(DRIVER_ADDR_3, 2); +# endif +# ifdef DRIVER_ADDR_4 + IS31FL3731_update_led_control_registers(DRIVER_ADDR_4, 3); +# endif # elif defined(IS31FL3733) IS31FL3733_update_led_control_registers(DRIVER_ADDR_1, 0); IS31FL3733_update_led_control_registers(DRIVER_ADDR_2, 1); @@ -73,9 +85,15 @@ static void init(void) { # ifdef IS31FL3731 static void flush(void) { IS31FL3731_update_pwm_buffers(DRIVER_ADDR_1, 0); -# ifdef DRIVER_ADDR_2 +# ifdef DRIVER_ADDR_2 IS31FL3731_update_pwm_buffers(DRIVER_ADDR_2, 1); -# endif +# endif +# ifdef DRIVER_ADDR_3 + IS31FL3731_update_pwm_buffers(DRIVER_ADDR_3, 2); +# endif +# ifdef DRIVER_ADDR_4 + IS31FL3731_update_pwm_buffers(DRIVER_ADDR_4, 3); +# endif } const rgb_matrix_driver_t rgb_matrix_driver = {