diff options
author | André Greiner-Petter <5708782+AndreG-P@users.noreply.github.com> | 2023-05-27 12:26:14 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-27 13:26:14 +1000 |
commit | 249fb3c2c2cb1a62f3ea99a67963f5127e280b1f (patch) | |
tree | 9c464d09de470af2aa3d02109113cb2fa88f8b1b /drivers/led | |
parent | 5642bd18077061fa21f4850124a9f4eeb8f23ca3 (diff) |
[BUG] Allow multiple IS31FL3741 drivers per board in rgb_matrix (#20988)
Diffstat (limited to 'drivers/led')
-rw-r--r-- | drivers/led/issi/is31fl3741.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/led/issi/is31fl3741.c b/drivers/led/issi/is31fl3741.c index d5dfaf1de6..2f43473fc1 100644 --- a/drivers/led/issi/is31fl3741.c +++ b/drivers/led/issi/is31fl3741.c @@ -104,11 +104,11 @@ void IS31FL3741_write_register(uint8_t addr, uint8_t reg, uint8_t data) { } bool IS31FL3741_write_pwm_buffer(uint8_t addr, uint8_t *pwm_buffer) { - // Assume PG1 is already selected + // Assume PG0 is already selected for (int i = 0; i < 342; i += 18) { if (i == 180) { - // unlock the command register and select PG2 + // unlock the command register and select PG1 IS31FL3741_write_register(addr, ISSI_COMMANDREGISTER_WRITELOCK, 0xC5); IS31FL3741_write_register(addr, ISSI_COMMANDREGISTER, ISSI_PAGE_PWM1); } @@ -246,7 +246,7 @@ void IS31FL3741_update_led_control_registers(uint8_t addr, uint8_t index) { // CS1_SW1 to CS30_SW6 are on PG2 for (int i = CS1_SW1; i <= CS30_SW6; ++i) { - IS31FL3741_write_register(addr, i, g_scaling_registers[0][i]); + IS31FL3741_write_register(addr, i, g_scaling_registers[index][i]); } // unlock the command register and select PG3 @@ -255,7 +255,7 @@ void IS31FL3741_update_led_control_registers(uint8_t addr, uint8_t index) { // CS1_SW7 to CS39_SW9 are on PG3 for (int i = CS1_SW7; i <= CS39_SW9; ++i) { - IS31FL3741_write_register(addr, i - CS1_SW7, g_scaling_registers[0][i]); + IS31FL3741_write_register(addr, i - CS1_SW7, g_scaling_registers[index][i]); } g_scaling_registers_update_required[index] = false; |