From d96ac7084e213de1b1714d7299f3c390aed84105 Mon Sep 17 00:00:00 2001 From: Ryan Date: Wed, 24 Jan 2024 09:18:44 +1100 Subject: LED drivers: remove `write_pwm_buffer()` from public API (#22884) --- drivers/led/issi/is31fl3743a.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'drivers/led/issi/is31fl3743a.c') diff --git a/drivers/led/issi/is31fl3743a.c b/drivers/led/issi/is31fl3743a.c index 71a4bd1b32..df094952a1 100644 --- a/drivers/led/issi/is31fl3743a.c +++ b/drivers/led/issi/is31fl3743a.c @@ -83,7 +83,7 @@ void is31fl3743a_select_page(uint8_t addr, uint8_t page) { is31fl3743a_write_register(addr, IS31FL3743A_REG_COMMAND, page); } -void is31fl3743a_write_pwm_buffer(uint8_t addr, uint8_t *pwm_buffer) { +void is31fl3743a_write_pwm_buffer(uint8_t addr, uint8_t index) { // Assumes page 0 is already selected. // Transmit PWM registers in 11 transfers of 18 bytes. @@ -91,10 +91,10 @@ void is31fl3743a_write_pwm_buffer(uint8_t addr, uint8_t *pwm_buffer) { for (uint8_t i = 0; i < IS31FL3743A_PWM_REGISTER_COUNT; i += 18) { #if IS31FL3743A_I2C_PERSISTENCE > 0 for (uint8_t j = 0; j < IS31FL3743A_I2C_PERSISTENCE; j++) { - if (i2c_writeReg(addr << 1, i + 1, pwm_buffer + i, 18, IS31FL3743A_I2C_TIMEOUT) == I2C_STATUS_SUCCESS) break; + if (i2c_writeReg(addr << 1, i + 1, g_pwm_buffer[index] + i, 18, IS31FL3743A_I2C_TIMEOUT) == I2C_STATUS_SUCCESS) break; } #else - i2c_writeReg(addr << 1, i + 1, pwm_buffer + i, 18, IS31FL3743A_I2C_TIMEOUT); + i2c_writeReg(addr << 1, i + 1, g_pwm_buffer[index] + i, 18, IS31FL3743A_I2C_TIMEOUT); #endif } } @@ -196,7 +196,7 @@ void is31fl3743a_update_pwm_buffers(uint8_t addr, uint8_t index) { if (g_pwm_buffer_update_required[index]) { is31fl3743a_select_page(addr, IS31FL3743A_COMMAND_PWM); - is31fl3743a_write_pwm_buffer(addr, g_pwm_buffer[index]); + is31fl3743a_write_pwm_buffer(addr, index); g_pwm_buffer_update_required[index] = false; } -- cgit v1.2.3