summaryrefslogtreecommitdiff
path: root/quantum/rgb_matrix
diff options
context:
space:
mode:
authorJoel Challis <git@zvecr.com>2021-07-27 23:55:51 +0100
committerGitHub <noreply@github.com>2021-07-27 23:55:51 +0100
commit3858a784c702d75d207e62c6cdf4449eed41c789 (patch)
tree17713862786ea5951f7fb15605df7e2082fdc34b /quantum/rgb_matrix
parent56443fe3cf19768f34e065319d50164d4e99dd3c (diff)
downloadqmk_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.c12
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 dfdf452190..bfaedaa4a0 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 = {
# include "spi_master.h"
static void init(void) {
spi_init();
- AW20216_init();
+ AW20216_init(DRIVER_1_CS, DRIVER_1_EN);
+# ifdef DRIVER_2_CS
+ AW20216_init(DRIVER_2_CS, DRIVER_2_EN);
+# endif
}
-static void flush(void) { AW20216_update_pwm_buffers(); }
+static void flush(void) {
+ AW20216_update_pwm_buffers(DRIVER_1_CS, 0);
+# ifdef DRIVER_2_CS
+ AW20216_update_pwm_buffers(DRIVER_2_CS, 1);
+# endif
+}
const rgb_matrix_driver_t rgb_matrix_driver = {
.init = init,