diff options
author | a_p_u_r_o <applause@elfmimi.jp> | 2020-10-04 03:15:44 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-04 05:15:44 +1100 |
commit | 1fe7743af88cf0d65800d3ccfc1c59d1c2d65db2 (patch) | |
tree | e420104f54c22db35aac0eb36736824876439633 /drivers/issi/is31fl3741.c | |
parent | a0467fda3816e7c87d8cd0b2584ed701ff78375e (diff) | |
download | qmk_firmware-1fe7743af88cf0d65800d3ccfc1c59d1c2d65db2.tar.gz |
IS31FL3741 driver fixup (#10519)
* Fix issue with data transfer of CS1_SW7 to CS18_SW7.
* Fix issue with handling of scaling register buffer's dirty flag.
* Remove unused extern declaration.
* Compaction of struct is31_led utilizing bit fields.
Diffstat (limited to 'drivers/issi/is31fl3741.c')
-rw-r--r-- | drivers/issi/is31fl3741.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/issi/is31fl3741.c b/drivers/issi/is31fl3741.c index bc434fb29..1b533c9b6 100644 --- a/drivers/issi/is31fl3741.c +++ b/drivers/issi/is31fl3741.c @@ -97,14 +97,13 @@ bool IS31FL3741_write_pwm_buffer(uint8_t addr, uint8_t *pwm_buffer) { IS31FL3741_write_register(addr, ISSI_COMMANDREGISTER, ISSI_PAGE_PWM0); for (int i = 0; i < 342; i += 18) { - g_twi_transfer_buffer[0] = i % 180; - if (i == 180) { // unlock the command register and select PG2 IS31FL3741_write_register(addr, ISSI_COMMANDREGISTER_WRITELOCK, 0xC5); IS31FL3741_write_register(addr, ISSI_COMMANDREGISTER, ISSI_PAGE_PWM1); } + g_twi_transfer_buffer[0] = i % 180; memcpy(g_twi_transfer_buffer + 1, pwm_buffer + i, 18); #if ISSI_PERSISTENCE > 0 @@ -251,4 +250,6 @@ void IS31FL3741_set_scaling_registers(const is31_led *pled, uint8_t red, uint8_t g_scaling_registers[pled->driver][pled->r] = red; g_scaling_registers[pled->driver][pled->g] = green; g_scaling_registers[pled->driver][pled->b] = blue; + + g_scaling_registers_update_required[pled->driver] = true; } |