diff options
author | Chris Cullin <chris@miplace.com> | 2021-07-16 07:52:05 +1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-15 22:52:05 +0100 |
commit | 70267b35c357f2744262300db03eafe642159734 (patch) | |
tree | 954f0ed828294d30c4beed4c02a00cb7ad507c60 /quantum | |
parent | e07401bb5ac4f0e23aac8c943d9f03fa257834a3 (diff) |
Dual RGB Matrix IS31FL3737 driver support to address #13442 (#13457)
* initial commit
* removed changes to write_pwm_buffer
* backward compatbility added
* fixed issue with backward compatibility
* documentation update
* removed unneccessary comment. branched from master
* updated per comments #13457
* removed blank line
* cformat on diff files
Diffstat (limited to 'quantum')
-rw-r--r-- | quantum/rgb_matrix/rgb_matrix_drivers.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/quantum/rgb_matrix/rgb_matrix_drivers.c b/quantum/rgb_matrix/rgb_matrix_drivers.c index 6a11d4791e..dfdf452190 100644 --- a/quantum/rgb_matrix/rgb_matrix_drivers.c +++ b/quantum/rgb_matrix/rgb_matrix_drivers.c @@ -65,6 +65,9 @@ static void init(void) { # endif # elif defined(IS31FL3737) IS31FL3737_init(DRIVER_ADDR_1); +# if defined(DRIVER_ADDR_2) && (DRIVER_ADDR_2 != DRIVER_ADDR_1) // provides backward compatibility + IS31FL3737_init(DRIVER_ADDR_2); +# endif # else IS31FL3741_init(DRIVER_ADDR_1); # endif @@ -105,7 +108,10 @@ static void init(void) { IS31FL3733_update_led_control_registers(DRIVER_ADDR_4, 3); # endif # elif defined(IS31FL3737) - IS31FL3737_update_led_control_registers(DRIVER_ADDR_1, DRIVER_ADDR_2); + IS31FL3737_update_led_control_registers(DRIVER_ADDR_1, 0); +# if defined(DRIVER_ADDR_2) && (DRIVER_ADDR_2 != DRIVER_ADDR_1) // provides backward compatibility + IS31FL3737_update_led_control_registers(DRIVER_ADDR_2, 1); +# endif # else IS31FL3741_update_led_control_registers(DRIVER_ADDR_1, 0); # endif @@ -152,7 +158,12 @@ const rgb_matrix_driver_t rgb_matrix_driver = { .set_color_all = IS31FL3733_set_color_all, }; # elif defined(IS31FL3737) -static void flush(void) { IS31FL3737_update_pwm_buffers(DRIVER_ADDR_1, DRIVER_ADDR_2); } +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 + IS31FL3737_update_pwm_buffers(DRIVER_ADDR_2, 1); +# endif +} const rgb_matrix_driver_t rgb_matrix_driver = { .init = init, |