Skip to content

Commit

Permalink
Fix issue with data transfer of CS1_SW7 to CS18_SW7.
Browse files Browse the repository at this point in the history
  • Loading branch information
elfmimi committed Oct 3, 2020
1 parent 9e9b604 commit 0e40e9e
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/issi/is31fl3741.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 0e40e9e

Please sign in to comment.