diff options
Diffstat (limited to 'drivers/led/issi/is31fl3731-mono.c')
-rw-r--r-- | drivers/led/issi/is31fl3731-mono.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/led/issi/is31fl3731-mono.c b/drivers/led/issi/is31fl3731-mono.c index 4533f2e7ea..908922fb70 100644 --- a/drivers/led/issi/is31fl3731-mono.c +++ b/drivers/led/issi/is31fl3731-mono.c @@ -57,7 +57,7 @@ void is31fl3731_select_page(uint8_t addr, uint8_t page) { is31fl3731_write_register(addr, IS31FL3731_REG_COMMAND, page); } -void is31fl3731_write_pwm_buffer(uint8_t addr, uint8_t *pwm_buffer) { +void is31fl3731_write_pwm_buffer(uint8_t addr, uint8_t index) { // Assumes page 0 is already selected. // Transmit PWM registers in 9 transfers of 16 bytes. @@ -65,10 +65,10 @@ void is31fl3731_write_pwm_buffer(uint8_t addr, uint8_t *pwm_buffer) { for (uint8_t i = 0; i < IS31FL3731_PWM_REGISTER_COUNT; i += 16) { #if IS31FL3731_I2C_PERSISTENCE > 0 for (uint8_t j = 0; j < IS31FL3731_I2C_PERSISTENCE; j++) { - if (i2c_writeReg(addr << 1, IS31FL3731_FRAME_REG_PWM + i, pwm_buffer + i, 16, IS31FL3731_I2C_TIMEOUT) == I2C_STATUS_SUCCESS) break; + if (i2c_writeReg(addr << 1, IS31FL3731_FRAME_REG_PWM + i, g_pwm_buffer[index] + i, 16, IS31FL3731_I2C_TIMEOUT) == I2C_STATUS_SUCCESS) break; } #else - i2c_writeReg(addr << 1, IS31FL3731_FRAME_REG_PWM + i, pwm_buffer + i, 16, IS31FL3731_I2C_TIMEOUT); + i2c_writeReg(addr << 1, IS31FL3731_FRAME_REG_PWM + i, g_pwm_buffer[index] + i, 16, IS31FL3731_I2C_TIMEOUT); #endif } } @@ -194,7 +194,7 @@ void is31fl3731_set_led_control_register(uint8_t index, bool value) { void is31fl3731_update_pwm_buffers(uint8_t addr, uint8_t index) { if (g_pwm_buffer_update_required[index]) { - is31fl3731_write_pwm_buffer(addr, g_pwm_buffer[index]); + is31fl3731_write_pwm_buffer(addr, index); g_pwm_buffer_update_required[index] = false; } |