diff options
author | Joel Challis <git@zvecr.com> | 2021-07-27 23:55:51 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-27 23:55:51 +0100 |
commit | 3858a784c702d75d207e62c6cdf4449eed41c789 (patch) | |
tree | 17713862786ea5951f7fb15605df7e2082fdc34b /quantum/rgb_matrix | |
parent | 56443fe3cf19768f34e065319d50164d4e99dd3c (diff) | |
download | qmk_firmware-3858a784c702d75d207e62c6cdf4449eed41c789.tar.gz qmk_firmware-3858a784c702d75d207e62c6cdf4449eed41c789.zip |
Align AW20216 driver (#13712)
* Align AW20216 driver
* Update drivers/awinic/aw20216.h
Co-authored-by: Ryan <fauxpark@gmail.com>
* Review comments
* formatting fixes
* stop if start failed?
* review comments
Co-authored-by: Ryan <fauxpark@gmail.com>
Diffstat (limited to 'quantum/rgb_matrix')
-rw-r--r-- | quantum/rgb_matrix/rgb_matrix_drivers.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/quantum/rgb_matrix/rgb_matrix_drivers.c b/quantum/rgb_matrix/rgb_matrix_drivers.c index dfdf45219..bfaedaa4a 100644 --- a/quantum/rgb_matrix/rgb_matrix_drivers.c +++ b/quantum/rgb_matrix/rgb_matrix_drivers.c | |||
@@ -186,10 +186,18 @@ const rgb_matrix_driver_t rgb_matrix_driver = { | |||
186 | # include "spi_master.h" | 186 | # include "spi_master.h" |
187 | static void init(void) { | 187 | static void init(void) { |
188 | spi_init(); | 188 | spi_init(); |
189 | AW20216_init(); | 189 | AW20216_init(DRIVER_1_CS, DRIVER_1_EN); |
190 | # ifdef DRIVER_2_CS | ||
191 | AW20216_init(DRIVER_2_CS, DRIVER_2_EN); | ||
192 | # endif | ||
190 | } | 193 | } |
191 | 194 | ||
192 | static void flush(void) { AW20216_update_pwm_buffers(); } | 195 | static void flush(void) { |
196 | AW20216_update_pwm_buffers(DRIVER_1_CS, 0); | ||
197 | # ifdef DRIVER_2_CS | ||
198 | AW20216_update_pwm_buffers(DRIVER_2_CS, 1); | ||
199 | # endif | ||
200 | } | ||
193 | 201 | ||
194 | const rgb_matrix_driver_t rgb_matrix_driver = { | 202 | const rgb_matrix_driver_t rgb_matrix_driver = { |
195 | .init = init, | 203 | .init = init, |