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/rgb_matrix | |
parent | e07401bb5ac4f0e23aac8c943d9f03fa257834a3 (diff) | |
download | qmk_firmware-70267b35c357f2744262300db03eafe642159734.tar.gz qmk_firmware-70267b35c357f2744262300db03eafe642159734.zip |
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/rgb_matrix')
-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 6a11d4791..dfdf45219 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) { | |||
65 | # endif | 65 | # endif |
66 | # elif defined(IS31FL3737) | 66 | # elif defined(IS31FL3737) |
67 | IS31FL3737_init(DRIVER_ADDR_1); | 67 | IS31FL3737_init(DRIVER_ADDR_1); |
68 | # if defined(DRIVER_ADDR_2) && (DRIVER_ADDR_2 != DRIVER_ADDR_1) // provides backward compatibility | ||
69 | IS31FL3737_init(DRIVER_ADDR_2); | ||
70 | # endif | ||
68 | # else | 71 | # else |
69 | IS31FL3741_init(DRIVER_ADDR_1); | 72 | IS31FL3741_init(DRIVER_ADDR_1); |
70 | # endif | 73 | # endif |
@@ -105,7 +108,10 @@ static void init(void) { | |||
105 | IS31FL3733_update_led_control_registers(DRIVER_ADDR_4, 3); | 108 | IS31FL3733_update_led_control_registers(DRIVER_ADDR_4, 3); |
106 | # endif | 109 | # endif |
107 | # elif defined(IS31FL3737) | 110 | # elif defined(IS31FL3737) |
108 | IS31FL3737_update_led_control_registers(DRIVER_ADDR_1, DRIVER_ADDR_2); | 111 | IS31FL3737_update_led_control_registers(DRIVER_ADDR_1, 0); |
112 | # if defined(DRIVER_ADDR_2) && (DRIVER_ADDR_2 != DRIVER_ADDR_1) // provides backward compatibility | ||
113 | IS31FL3737_update_led_control_registers(DRIVER_ADDR_2, 1); | ||
114 | # endif | ||
109 | # else | 115 | # else |
110 | IS31FL3741_update_led_control_registers(DRIVER_ADDR_1, 0); | 116 | IS31FL3741_update_led_control_registers(DRIVER_ADDR_1, 0); |
111 | # endif | 117 | # endif |
@@ -152,7 +158,12 @@ const rgb_matrix_driver_t rgb_matrix_driver = { | |||
152 | .set_color_all = IS31FL3733_set_color_all, | 158 | .set_color_all = IS31FL3733_set_color_all, |
153 | }; | 159 | }; |
154 | # elif defined(IS31FL3737) | 160 | # elif defined(IS31FL3737) |
155 | static void flush(void) { IS31FL3737_update_pwm_buffers(DRIVER_ADDR_1, DRIVER_ADDR_2); } | 161 | static void flush(void) { |
162 | IS31FL3737_update_pwm_buffers(DRIVER_ADDR_1, 0); | ||
163 | # if defined(DRIVER_ADDR_2) && (DRIVER_ADDR_2 != DRIVER_ADDR_1) // provides backward compatibility | ||
164 | IS31FL3737_update_pwm_buffers(DRIVER_ADDR_2, 1); | ||
165 | # endif | ||
166 | } | ||
156 | 167 | ||
157 | const rgb_matrix_driver_t rgb_matrix_driver = { | 168 | const rgb_matrix_driver_t rgb_matrix_driver = { |
158 | .init = init, | 169 | .init = init, |