From 0e40e9e7097401ca01d682e0714af43178a3e838 Mon Sep 17 00:00:00 2001 From: a_p_u_r_o Date: Sat, 3 Oct 2020 15:43:21 +0900 Subject: [PATCH] Fix issue with data transfer of CS1_SW7 to CS18_SW7. --- drivers/issi/is31fl3741.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/issi/is31fl3741.c b/drivers/issi/is31fl3741.c index bc434fb29707..56e7955f0207 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