diff --git a/drivers/led/issi/is31fl3218-mono.c b/drivers/led/issi/is31fl3218-mono.c index de2c44b29b4..1c5e4c055c9 100644 --- a/drivers/led/issi/is31fl3218-mono.c +++ b/drivers/led/issi/is31fl3218-mono.c @@ -38,20 +38,20 @@ bool g_led_control_registers_update_required = false; void is31fl3218_write_register(uint8_t reg, uint8_t data) { #if IS31FL3218_I2C_PERSISTENCE > 0 for (uint8_t i = 0; i < IS31FL3218_I2C_PERSISTENCE; i++) { - if (i2c_writeReg(IS31FL3218_I2C_ADDRESS << 1, reg, &data, 1, IS31FL3218_I2C_TIMEOUT) == I2C_STATUS_SUCCESS) break; + if (i2c_write_register(IS31FL3218_I2C_ADDRESS << 1, reg, &data, 1, IS31FL3218_I2C_TIMEOUT) == I2C_STATUS_SUCCESS) break; } #else - i2c_writeReg(IS31FL3218_I2C_ADDRESS << 1, reg, &data, 1, IS31FL3218_I2C_TIMEOUT); + i2c_write_register(IS31FL3218_I2C_ADDRESS << 1, reg, &data, 1, IS31FL3218_I2C_TIMEOUT); #endif } void is31fl3218_write_pwm_buffer(void) { #if IS31FL3218_I2C_PERSISTENCE > 0 for (uint8_t i = 0; i < IS31FL3218_I2C_PERSISTENCE; i++) { - if (i2c_writeReg(IS31FL3218_I2C_ADDRESS << 1, IS31FL3218_REG_PWM, g_pwm_buffer, 18, IS31FL3218_I2C_TIMEOUT) == I2C_STATUS_SUCCESS) break; + if (i2c_write_register(IS31FL3218_I2C_ADDRESS << 1, IS31FL3218_REG_PWM, g_pwm_buffer, 18, IS31FL3218_I2C_TIMEOUT) == I2C_STATUS_SUCCESS) break; } #else - i2c_writeReg(IS31FL3218_I2C_ADDRESS << 1, IS31FL3218_REG_PWM, g_pwm_buffer, 18, IS31FL3218_I2C_TIMEOUT); + i2c_write_register(IS31FL3218_I2C_ADDRESS << 1, IS31FL3218_REG_PWM, g_pwm_buffer, 18, IS31FL3218_I2C_TIMEOUT); #endif } diff --git a/drivers/led/issi/is31fl3218.c b/drivers/led/issi/is31fl3218.c index 2f6668b301a..5099480023c 100644 --- a/drivers/led/issi/is31fl3218.c +++ b/drivers/led/issi/is31fl3218.c @@ -38,20 +38,20 @@ bool g_led_control_registers_update_required = false; void is31fl3218_write_register(uint8_t reg, uint8_t data) { #if IS31FL3218_I2C_PERSISTENCE > 0 for (uint8_t i = 0; i < IS31FL3218_I2C_PERSISTENCE; i++) { - if (i2c_writeReg(IS31FL3218_I2C_ADDRESS << 1, reg, &data, 1, IS31FL3218_I2C_TIMEOUT) == I2C_STATUS_SUCCESS) break; + if (i2c_write_register(IS31FL3218_I2C_ADDRESS << 1, reg, &data, 1, IS31FL3218_I2C_TIMEOUT) == I2C_STATUS_SUCCESS) break; } #else - i2c_writeReg(IS31FL3218_I2C_ADDRESS << 1, reg, &data, 1, IS31FL3218_I2C_TIMEOUT); + i2c_write_register(IS31FL3218_I2C_ADDRESS << 1, reg, &data, 1, IS31FL3218_I2C_TIMEOUT); #endif } void is31fl3218_write_pwm_buffer(void) { #if IS31FL3218_I2C_PERSISTENCE > 0 for (uint8_t i = 0; i < IS31FL3218_I2C_PERSISTENCE; i++) { - if (i2c_writeReg(IS31FL3218_I2C_ADDRESS << 1, IS31FL3218_REG_PWM, g_pwm_buffer, 18, IS31FL3218_I2C_TIMEOUT) == I2C_STATUS_SUCCESS) break; + if (i2c_write_register(IS31FL3218_I2C_ADDRESS << 1, IS31FL3218_REG_PWM, g_pwm_buffer, 18, IS31FL3218_I2C_TIMEOUT) == I2C_STATUS_SUCCESS) break; } #else - i2c_writeReg(IS31FL3218_I2C_ADDRESS << 1, IS31FL3218_REG_PWM, g_pwm_buffer, 18, IS31FL3218_I2C_TIMEOUT); + i2c_write_register(IS31FL3218_I2C_ADDRESS << 1, IS31FL3218_REG_PWM, g_pwm_buffer, 18, IS31FL3218_I2C_TIMEOUT); #endif } diff --git a/drivers/led/issi/is31fl3731-mono.c b/drivers/led/issi/is31fl3731-mono.c index 908922fb709..ca4e3449b25 100644 --- a/drivers/led/issi/is31fl3731-mono.c +++ b/drivers/led/issi/is31fl3731-mono.c @@ -46,10 +46,10 @@ bool g_led_control_registers_update_required[IS31FL3731_DRIVER_COUNT] void is31fl3731_write_register(uint8_t addr, uint8_t reg, uint8_t data) { #if IS31FL3731_I2C_PERSISTENCE > 0 for (uint8_t i = 0; i < IS31FL3731_I2C_PERSISTENCE; i++) { - if (i2c_writeReg(addr << 1, reg, &data, 1, IS31FL3731_I2C_TIMEOUT) == I2C_STATUS_SUCCESS) break; + if (i2c_write_register(addr << 1, reg, &data, 1, IS31FL3731_I2C_TIMEOUT) == I2C_STATUS_SUCCESS) break; } #else - i2c_writeReg(addr << 1, reg, &data, 1, IS31FL3731_I2C_TIMEOUT); + i2c_write_register(addr << 1, reg, &data, 1, IS31FL3731_I2C_TIMEOUT); #endif } @@ -65,10 +65,10 @@ void is31fl3731_write_pwm_buffer(uint8_t addr, uint8_t index) { 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, g_pwm_buffer[index] + i, 16, IS31FL3731_I2C_TIMEOUT) == I2C_STATUS_SUCCESS) break; + if (i2c_write_register(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, g_pwm_buffer[index] + i, 16, IS31FL3731_I2C_TIMEOUT); + i2c_write_register(addr << 1, IS31FL3731_FRAME_REG_PWM + i, g_pwm_buffer[index] + i, 16, IS31FL3731_I2C_TIMEOUT); #endif } } diff --git a/drivers/led/issi/is31fl3731.c b/drivers/led/issi/is31fl3731.c index b188d128d91..07f8194c0b7 100644 --- a/drivers/led/issi/is31fl3731.c +++ b/drivers/led/issi/is31fl3731.c @@ -45,10 +45,10 @@ bool g_led_control_registers_update_required[IS31FL3731_DRIVER_COUNT] void is31fl3731_write_register(uint8_t addr, uint8_t reg, uint8_t data) { #if IS31FL3731_I2C_PERSISTENCE > 0 for (uint8_t i = 0; i < IS31FL3731_I2C_PERSISTENCE; i++) { - if (i2c_writeReg(addr << 1, reg, &data, 1, IS31FL3731_I2C_TIMEOUT) == I2C_STATUS_SUCCESS) break; + if (i2c_write_register(addr << 1, reg, &data, 1, IS31FL3731_I2C_TIMEOUT) == I2C_STATUS_SUCCESS) break; } #else - i2c_writeReg(addr << 1, reg, &data, 1, IS31FL3731_I2C_TIMEOUT); + i2c_write_register(addr << 1, reg, &data, 1, IS31FL3731_I2C_TIMEOUT); #endif } @@ -64,10 +64,10 @@ void is31fl3731_write_pwm_buffer(uint8_t addr, uint8_t index) { 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, g_pwm_buffer[index] + i, 16, IS31FL3731_I2C_TIMEOUT) == I2C_STATUS_SUCCESS) break; + if (i2c_write_register(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, g_pwm_buffer[index] + i, 16, IS31FL3731_I2C_TIMEOUT); + i2c_write_register(addr << 1, IS31FL3731_FRAME_REG_PWM + i, g_pwm_buffer[index] + i, 16, IS31FL3731_I2C_TIMEOUT); #endif } } diff --git a/drivers/led/issi/is31fl3733-mono.c b/drivers/led/issi/is31fl3733-mono.c index de20c169fea..fe8419e2bc1 100644 --- a/drivers/led/issi/is31fl3733-mono.c +++ b/drivers/led/issi/is31fl3733-mono.c @@ -77,10 +77,10 @@ bool g_led_control_registers_update_required[IS31FL3733_DRIVER_COUNT] void is31fl3733_write_register(uint8_t addr, uint8_t reg, uint8_t data) { #if IS31FL3733_I2C_PERSISTENCE > 0 for (uint8_t i = 0; i < IS31FL3733_I2C_PERSISTENCE; i++) { - if (i2c_writeReg(addr << 1, reg, &data, 1, IS31FL3733_I2C_TIMEOUT) == I2C_STATUS_SUCCESS) break; + if (i2c_write_register(addr << 1, reg, &data, 1, IS31FL3733_I2C_TIMEOUT) == I2C_STATUS_SUCCESS) break; } #else - i2c_writeReg(addr << 1, reg, &data, 1, IS31FL3733_I2C_TIMEOUT); + i2c_write_register(addr << 1, reg, &data, 1, IS31FL3733_I2C_TIMEOUT); #endif } @@ -97,10 +97,10 @@ void is31fl3733_write_pwm_buffer(uint8_t addr, uint8_t index) { for (uint8_t i = 0; i < IS31FL3733_PWM_REGISTER_COUNT; i += 16) { #if IS31FL3733_I2C_PERSISTENCE > 0 for (uint8_t j = 0; j < IS31FL3733_I2C_PERSISTENCE; j++) { - if (i2c_writeReg(addr << 1, i, g_pwm_buffer[index] + i, 16, IS31FL3733_I2C_TIMEOUT) == I2C_STATUS_SUCCESS) break; + if (i2c_write_register(addr << 1, i, g_pwm_buffer[index] + i, 16, IS31FL3733_I2C_TIMEOUT) == I2C_STATUS_SUCCESS) break; } #else - i2c_writeReg(addr << 1, i, g_pwm_buffer[index] + i, 16, IS31FL3733_I2C_TIMEOUT); + i2c_write_register(addr << 1, i, g_pwm_buffer[index] + i, 16, IS31FL3733_I2C_TIMEOUT); #endif } } diff --git a/drivers/led/issi/is31fl3733.c b/drivers/led/issi/is31fl3733.c index de2dbd74d58..a54b9c90baf 100644 --- a/drivers/led/issi/is31fl3733.c +++ b/drivers/led/issi/is31fl3733.c @@ -76,10 +76,10 @@ bool g_led_control_registers_update_required[IS31FL3733_DRIVER_COUNT] void is31fl3733_write_register(uint8_t addr, uint8_t reg, uint8_t data) { #if IS31FL3733_I2C_PERSISTENCE > 0 for (uint8_t i = 0; i < IS31FL3733_I2C_PERSISTENCE; i++) { - if (i2c_writeReg(addr << 1, reg, &data, 1, IS31FL3733_I2C_TIMEOUT) == I2C_STATUS_SUCCESS) break; + if (i2c_write_register(addr << 1, reg, &data, 1, IS31FL3733_I2C_TIMEOUT) == I2C_STATUS_SUCCESS) break; } #else - i2c_writeReg(addr << 1, reg, &data, 1, IS31FL3733_I2C_TIMEOUT); + i2c_write_register(addr << 1, reg, &data, 1, IS31FL3733_I2C_TIMEOUT); #endif } @@ -96,10 +96,10 @@ void is31fl3733_write_pwm_buffer(uint8_t addr, uint8_t index) { for (uint8_t i = 0; i < IS31FL3733_PWM_REGISTER_COUNT; i += 16) { #if IS31FL3733_I2C_PERSISTENCE > 0 for (uint8_t j = 0; j < IS31FL3733_I2C_PERSISTENCE; j++) { - if (i2c_writeReg(addr << 1, i, g_pwm_buffer[index] + i, 16, IS31FL3733_I2C_TIMEOUT) == I2C_STATUS_SUCCESS) break; + if (i2c_write_register(addr << 1, i, g_pwm_buffer[index] + i, 16, IS31FL3733_I2C_TIMEOUT) == I2C_STATUS_SUCCESS) break; } #else - i2c_writeReg(addr << 1, i, g_pwm_buffer[index] + i, 16, IS31FL3733_I2C_TIMEOUT); + i2c_write_register(addr << 1, i, g_pwm_buffer[index] + i, 16, IS31FL3733_I2C_TIMEOUT); #endif } } diff --git a/drivers/led/issi/is31fl3736-mono.c b/drivers/led/issi/is31fl3736-mono.c index 1cbc6edcff8..2bb83169a42 100644 --- a/drivers/led/issi/is31fl3736-mono.c +++ b/drivers/led/issi/is31fl3736-mono.c @@ -61,10 +61,10 @@ bool g_led_control_registers_update_required[IS31FL3736_DRIVER_COUNT] void is31fl3736_write_register(uint8_t addr, uint8_t reg, uint8_t data) { #if IS31FL3736_I2C_PERSISTENCE > 0 for (uint8_t i = 0; i < IS31FL3736_I2C_PERSISTENCE; i++) { - if (i2c_writeReg(addr << 1, reg, &data, 1, IS31FL3736_I2C_TIMEOUT) == I2C_STATUS_SUCCESS) break; + if (i2c_write_register(addr << 1, reg, &data, 1, IS31FL3736_I2C_TIMEOUT) == I2C_STATUS_SUCCESS) break; } #else - i2c_writeReg(addr << 1, reg, &data, 1, IS31FL3736_I2C_TIMEOUT); + i2c_write_register(addr << 1, reg, &data, 1, IS31FL3736_I2C_TIMEOUT); #endif } @@ -81,10 +81,10 @@ void is31fl3736_write_pwm_buffer(uint8_t addr, uint8_t index) { for (uint8_t i = 0; i < IS31FL3736_PWM_REGISTER_COUNT; i += 16) { #if IS31FL3736_I2C_PERSISTENCE > 0 for (uint8_t j = 0; j < IS31FL3736_I2C_PERSISTENCE; j++) { - if (i2c_writeReg(addr << 1, i, g_pwm_buffer[index] + i, 16, IS31FL3736_I2C_TIMEOUT) == I2C_STATUS_SUCCESS) break; + if (i2c_write_register(addr << 1, i, g_pwm_buffer[index] + i, 16, IS31FL3736_I2C_TIMEOUT) == I2C_STATUS_SUCCESS) break; } #else - i2c_writeReg(addr << 1, i, g_pwm_buffer[index] + i, 16, IS31FL3736_I2C_TIMEOUT); + i2c_write_register(addr << 1, i, g_pwm_buffer[index] + i, 16, IS31FL3736_I2C_TIMEOUT); #endif } } diff --git a/drivers/led/issi/is31fl3736.c b/drivers/led/issi/is31fl3736.c index 979d1add85d..e4cba2c398b 100644 --- a/drivers/led/issi/is31fl3736.c +++ b/drivers/led/issi/is31fl3736.c @@ -61,10 +61,10 @@ bool g_led_control_registers_update_required[IS31FL3736_DRIVER_COUNT] void is31fl3736_write_register(uint8_t addr, uint8_t reg, uint8_t data) { #if IS31FL3736_I2C_PERSISTENCE > 0 for (uint8_t i = 0; i < IS31FL3736_I2C_PERSISTENCE; i++) { - if (i2c_writeReg(addr << 1, reg, &data, 1, IS31FL3736_I2C_TIMEOUT) == I2C_STATUS_SUCCESS) break; + if (i2c_write_register(addr << 1, reg, &data, 1, IS31FL3736_I2C_TIMEOUT) == I2C_STATUS_SUCCESS) break; } #else - i2c_writeReg(addr << 1, reg, &data, 1, IS31FL3736_I2C_TIMEOUT); + i2c_write_register(addr << 1, reg, &data, 1, IS31FL3736_I2C_TIMEOUT); #endif } @@ -81,10 +81,10 @@ void is31fl3736_write_pwm_buffer(uint8_t addr, uint8_t index) { for (uint8_t i = 0; i < IS31FL3736_PWM_REGISTER_COUNT; i += 16) { #if IS31FL3736_I2C_PERSISTENCE > 0 for (uint8_t j = 0; j < IS31FL3736_I2C_PERSISTENCE; j++) { - if (i2c_writeReg(addr << 1, i, g_pwm_buffer[index] + i, 16, IS31FL3736_I2C_TIMEOUT) == I2C_STATUS_SUCCESS) break; + if (i2c_write_register(addr << 1, i, g_pwm_buffer[index] + i, 16, IS31FL3736_I2C_TIMEOUT) == I2C_STATUS_SUCCESS) break; } #else - i2c_writeReg(addr << 1, i, g_pwm_buffer[index] + i, 16, IS31FL3736_I2C_TIMEOUT); + i2c_write_register(addr << 1, i, g_pwm_buffer[index] + i, 16, IS31FL3736_I2C_TIMEOUT); #endif } } diff --git a/drivers/led/issi/is31fl3737-mono.c b/drivers/led/issi/is31fl3737-mono.c index 067d98d5eed..0e22ea8a6a1 100644 --- a/drivers/led/issi/is31fl3737-mono.c +++ b/drivers/led/issi/is31fl3737-mono.c @@ -64,10 +64,10 @@ bool g_led_control_registers_update_required[IS31FL3737_DRIVER_COUNT] void is31fl3737_write_register(uint8_t addr, uint8_t reg, uint8_t data) { #if IS31FL3737_I2C_PERSISTENCE > 0 for (uint8_t i = 0; i < IS31FL3737_I2C_PERSISTENCE; i++) { - if (i2c_writeReg(addr << 1, reg, &data, 1, IS31FL3737_I2C_TIMEOUT) == I2C_STATUS_SUCCESS) break; + if (i2c_write_register(addr << 1, reg, &data, 1, IS31FL3737_I2C_TIMEOUT) == I2C_STATUS_SUCCESS) break; } #else - i2c_writeReg(addr << 1, reg, &data, 1, IS31FL3737_I2C_TIMEOUT); + i2c_write_register(addr << 1, reg, &data, 1, IS31FL3737_I2C_TIMEOUT); #endif } @@ -84,10 +84,10 @@ void is31fl3737_write_pwm_buffer(uint8_t addr, uint8_t index) { for (uint8_t i = 0; i < IS31FL3737_PWM_REGISTER_COUNT; i += 16) { #if IS31FL3737_I2C_PERSISTENCE > 0 for (uint8_t j = 0; j < IS31FL3737_I2C_PERSISTENCE; j++) { - if (i2c_writeReg(addr << 1, i, g_pwm_buffer[index] + i, 16, IS31FL3737_I2C_TIMEOUT) == I2C_STATUS_SUCCESS) break; + if (i2c_write_register(addr << 1, i, g_pwm_buffer[index] + i, 16, IS31FL3737_I2C_TIMEOUT) == I2C_STATUS_SUCCESS) break; } #else - i2c_writeReg(addr << 1, i, g_pwm_buffer[index] + i, 16, IS31FL3737_I2C_TIMEOUT); + i2c_write_register(addr << 1, i, g_pwm_buffer[index] + i, 16, IS31FL3737_I2C_TIMEOUT); #endif } } diff --git a/drivers/led/issi/is31fl3737.c b/drivers/led/issi/is31fl3737.c index 2df189bcea2..e17d73c36f6 100644 --- a/drivers/led/issi/is31fl3737.c +++ b/drivers/led/issi/is31fl3737.c @@ -64,10 +64,10 @@ bool g_led_control_registers_update_required[IS31FL3737_DRIVER_COUNT] void is31fl3737_write_register(uint8_t addr, uint8_t reg, uint8_t data) { #if IS31FL3737_I2C_PERSISTENCE > 0 for (uint8_t i = 0; i < IS31FL3737_I2C_PERSISTENCE; i++) { - if (i2c_writeReg(addr << 1, reg, &data, 1, IS31FL3737_I2C_TIMEOUT) == I2C_STATUS_SUCCESS) break; + if (i2c_write_register(addr << 1, reg, &data, 1, IS31FL3737_I2C_TIMEOUT) == I2C_STATUS_SUCCESS) break; } #else - i2c_writeReg(addr << 1, reg, &data, 1, IS31FL3737_I2C_TIMEOUT); + i2c_write_register(addr << 1, reg, &data, 1, IS31FL3737_I2C_TIMEOUT); #endif } @@ -84,10 +84,10 @@ void is31fl3737_write_pwm_buffer(uint8_t addr, uint8_t index) { for (uint8_t i = 0; i < IS31FL3737_PWM_REGISTER_COUNT; i += 16) { #if IS31FL3737_I2C_PERSISTENCE > 0 for (uint8_t j = 0; j < IS31FL3737_I2C_PERSISTENCE; j++) { - if (i2c_writeReg(addr << 1, i, g_pwm_buffer[index] + i, 16, IS31FL3737_I2C_TIMEOUT) == I2C_STATUS_SUCCESS) break; + if (i2c_write_register(addr << 1, i, g_pwm_buffer[index] + i, 16, IS31FL3737_I2C_TIMEOUT) == I2C_STATUS_SUCCESS) break; } #else - i2c_writeReg(addr << 1, i, g_pwm_buffer[index] + i, 16, IS31FL3737_I2C_TIMEOUT); + i2c_write_register(addr << 1, i, g_pwm_buffer[index] + i, 16, IS31FL3737_I2C_TIMEOUT); #endif } } diff --git a/drivers/led/issi/is31fl3741-mono.c b/drivers/led/issi/is31fl3741-mono.c index 37ce58ed3f4..4f388f56b08 100644 --- a/drivers/led/issi/is31fl3741-mono.c +++ b/drivers/led/issi/is31fl3741-mono.c @@ -67,10 +67,10 @@ uint8_t g_scaling_registers[IS31FL3741_DRIVER_COUNT][IS31FL3741_SCALING_REGISTER void is31fl3741_write_register(uint8_t addr, uint8_t reg, uint8_t data) { #if IS31FL3741_I2C_PERSISTENCE > 0 for (uint8_t i = 0; i < IS31FL3741_I2C_PERSISTENCE; i++) { - if (i2c_writeReg(addr << 1, reg, &data, 1, IS31FL3741_I2C_TIMEOUT) == I2C_STATUS_SUCCESS) break; + if (i2c_write_register(addr << 1, reg, &data, 1, IS31FL3741_I2C_TIMEOUT) == I2C_STATUS_SUCCESS) break; } #else - i2c_writeReg(addr << 1, reg, &data, 1, IS31FL3741_I2C_TIMEOUT); + i2c_write_register(addr << 1, reg, &data, 1, IS31FL3741_I2C_TIMEOUT); #endif } @@ -89,20 +89,20 @@ void is31fl3741_write_pwm_buffer(uint8_t addr, uint8_t index) { #if IS31FL3741_I2C_PERSISTENCE > 0 for (uint8_t j = 0; j < IS31FL3741_I2C_PERSISTENCE; j++) { - if (i2c_writeReg(addr << 1, i % 180, g_pwm_buffer[index] + i, 18, IS31FL3741_I2C_TIMEOUT) == I2C_STATUS_SUCCESS) break; + if (i2c_write_register(addr << 1, i % 180, g_pwm_buffer[index] + i, 18, IS31FL3741_I2C_TIMEOUT) == I2C_STATUS_SUCCESS) break; } #else - i2c_writeReg(addr << 1, i % 180, g_pwm_buffer[index] + i, 18, IS31FL3741_I2C_TIMEOUT); + i2c_write_register(addr << 1, i % 180, g_pwm_buffer[index] + i, 18, IS31FL3741_I2C_TIMEOUT); #endif } // transfer the left cause the total number is 351 #if IS31FL3741_I2C_PERSISTENCE > 0 for (uint8_t i = 0; i < IS31FL3741_I2C_PERSISTENCE; i++) { - if (i2c_writeReg(addr << 1, 162, g_pwm_buffer[index] + 342, 9, IS31FL3741_I2C_TIMEOUT) == I2C_STATUS_SUCCESS) break; + if (i2c_write_register(addr << 1, 162, g_pwm_buffer[index] + 342, 9, IS31FL3741_I2C_TIMEOUT) == I2C_STATUS_SUCCESS) break; } #else - i2c_writeReg(addr << 1, 162, g_pwm_buffer[index] + 342, 9, IS31FL3741_I2C_TIMEOUT); + i2c_write_register(addr << 1, 162, g_pwm_buffer[index] + 342, 9, IS31FL3741_I2C_TIMEOUT); #endif } diff --git a/drivers/led/issi/is31fl3741.c b/drivers/led/issi/is31fl3741.c index 6eca5009c28..5f641aa53f5 100644 --- a/drivers/led/issi/is31fl3741.c +++ b/drivers/led/issi/is31fl3741.c @@ -67,10 +67,10 @@ uint8_t g_scaling_registers[IS31FL3741_DRIVER_COUNT][IS31FL3741_SCALING_REGISTER void is31fl3741_write_register(uint8_t addr, uint8_t reg, uint8_t data) { #if IS31FL3741_I2C_PERSISTENCE > 0 for (uint8_t i = 0; i < IS31FL3741_I2C_PERSISTENCE; i++) { - if (i2c_writeReg(addr << 1, reg, &data, 1, IS31FL3741_I2C_TIMEOUT) == I2C_STATUS_SUCCESS) break; + if (i2c_write_register(addr << 1, reg, &data, 1, IS31FL3741_I2C_TIMEOUT) == I2C_STATUS_SUCCESS) break; } #else - i2c_writeReg(addr << 1, reg, &data, 1, IS31FL3741_I2C_TIMEOUT); + i2c_write_register(addr << 1, reg, &data, 1, IS31FL3741_I2C_TIMEOUT); #endif } @@ -89,20 +89,20 @@ void is31fl3741_write_pwm_buffer(uint8_t addr, uint8_t index) { #if IS31FL3741_I2C_PERSISTENCE > 0 for (uint8_t j = 0; j < IS31FL3741_I2C_PERSISTENCE; j++) { - if (i2c_writeReg(addr << 1, i % 180, g_pwm_buffer[index] + i, 18, IS31FL3741_I2C_TIMEOUT) == I2C_STATUS_SUCCESS) break; + if (i2c_write_register(addr << 1, i % 180, g_pwm_buffer[index] + i, 18, IS31FL3741_I2C_TIMEOUT) == I2C_STATUS_SUCCESS) break; } #else - i2c_writeReg(addr << 1, i % 180, g_pwm_buffer[index] + i, 18, IS31FL3741_I2C_TIMEOUT); + i2c_write_register(addr << 1, i % 180, g_pwm_buffer[index] + i, 18, IS31FL3741_I2C_TIMEOUT); #endif } // transfer the left cause the total number is 351 #if IS31FL3741_I2C_PERSISTENCE > 0 for (uint8_t i = 0; i < IS31FL3741_I2C_PERSISTENCE; i++) { - if (i2c_writeReg(addr << 1, 162, g_pwm_buffer[index] + 342, 9, IS31FL3741_I2C_TIMEOUT) == I2C_STATUS_SUCCESS) break; + if (i2c_write_register(addr << 1, 162, g_pwm_buffer[index] + 342, 9, IS31FL3741_I2C_TIMEOUT) == I2C_STATUS_SUCCESS) break; } #else - i2c_writeReg(addr << 1, 162, g_pwm_buffer[index] + 342, 9, IS31FL3741_I2C_TIMEOUT); + i2c_write_register(addr << 1, 162, g_pwm_buffer[index] + 342, 9, IS31FL3741_I2C_TIMEOUT); #endif } diff --git a/drivers/led/issi/is31fl3742a-mono.c b/drivers/led/issi/is31fl3742a-mono.c index f36605f14a1..3a607f02d19 100644 --- a/drivers/led/issi/is31fl3742a-mono.c +++ b/drivers/led/issi/is31fl3742a-mono.c @@ -62,10 +62,10 @@ uint8_t g_scaling_registers[IS31FL3742A_DRIVER_COUNT][IS31FL3742A_SCALING_REGIST void is31fl3742a_write_register(uint8_t addr, uint8_t reg, uint8_t data) { #if IS31FL3742A_I2C_PERSISTENCE > 0 for (uint8_t i = 0; i < IS31FL3742A_I2C_PERSISTENCE; i++) { - if (i2c_writeReg(addr << 1, reg, &data, 1, IS31FL3742A_I2C_TIMEOUT) == I2C_STATUS_SUCCESS) break; + if (i2c_write_register(addr << 1, reg, &data, 1, IS31FL3742A_I2C_TIMEOUT) == I2C_STATUS_SUCCESS) break; } #else - i2c_writeReg(addr << 1, reg, &data, 1, IS31FL3742A_I2C_TIMEOUT); + i2c_write_register(addr << 1, reg, &data, 1, IS31FL3742A_I2C_TIMEOUT); #endif } @@ -82,10 +82,10 @@ void is31fl3742a_write_pwm_buffer(uint8_t addr, uint8_t index) { for (uint8_t i = 0; i < IS31FL3742A_PWM_REGISTER_COUNT; i += 30) { #if IS31FL3742A_I2C_PERSISTENCE > 0 for (uint8_t j = 0; j < IS31FL3742A_I2C_PERSISTENCE; j++) { - if (i2c_writeReg(addr << 1, i, g_pwm_buffer[index] + i, 30, IS31FL3742A_I2C_TIMEOUT) == I2C_STATUS_SUCCESS) break; + if (i2c_write_register(addr << 1, i, g_pwm_buffer[index] + i, 30, IS31FL3742A_I2C_TIMEOUT) == I2C_STATUS_SUCCESS) break; } #else - i2c_writeReg(addr << 1, i, g_pwm_buffer[index] + i, 30, IS31FL3742A_I2C_TIMEOUT); + i2c_write_register(addr << 1, i, g_pwm_buffer[index] + i, 30, IS31FL3742A_I2C_TIMEOUT); #endif } } diff --git a/drivers/led/issi/is31fl3742a.c b/drivers/led/issi/is31fl3742a.c index 1ba8ee7b472..2e6cf151c3b 100644 --- a/drivers/led/issi/is31fl3742a.c +++ b/drivers/led/issi/is31fl3742a.c @@ -62,10 +62,10 @@ uint8_t g_scaling_registers[IS31FL3742A_DRIVER_COUNT][IS31FL3742A_SCALING_REGIST void is31fl3742a_write_register(uint8_t addr, uint8_t reg, uint8_t data) { #if IS31FL3742A_I2C_PERSISTENCE > 0 for (uint8_t i = 0; i < IS31FL3742A_I2C_PERSISTENCE; i++) { - if (i2c_writeReg(addr << 1, reg, &data, 1, IS31FL3742A_I2C_TIMEOUT) == I2C_STATUS_SUCCESS) break; + if (i2c_write_register(addr << 1, reg, &data, 1, IS31FL3742A_I2C_TIMEOUT) == I2C_STATUS_SUCCESS) break; } #else - i2c_writeReg(addr << 1, reg, &data, 1, IS31FL3742A_I2C_TIMEOUT); + i2c_write_register(addr << 1, reg, &data, 1, IS31FL3742A_I2C_TIMEOUT); #endif } @@ -82,10 +82,10 @@ void is31fl3742a_write_pwm_buffer(uint8_t addr, uint8_t index) { for (uint8_t i = 0; i < IS31FL3742A_PWM_REGISTER_COUNT; i += 30) { #if IS31FL3742A_I2C_PERSISTENCE > 0 for (uint8_t j = 0; j < IS31FL3742A_I2C_PERSISTENCE; j++) { - if (i2c_writeReg(addr << 1, i, g_pwm_buffer[index] + i, 30, IS31FL3742A_I2C_TIMEOUT) == I2C_STATUS_SUCCESS) break; + if (i2c_write_register(addr << 1, i, g_pwm_buffer[index] + i, 30, IS31FL3742A_I2C_TIMEOUT) == I2C_STATUS_SUCCESS) break; } #else - i2c_writeReg(addr << 1, i, g_pwm_buffer[index] + i, 30, IS31FL3742A_I2C_TIMEOUT); + i2c_write_register(addr << 1, i, g_pwm_buffer[index] + i, 30, IS31FL3742A_I2C_TIMEOUT); #endif } } diff --git a/drivers/led/issi/is31fl3743a-mono.c b/drivers/led/issi/is31fl3743a-mono.c index b49decf6340..4df0956ed29 100644 --- a/drivers/led/issi/is31fl3743a-mono.c +++ b/drivers/led/issi/is31fl3743a-mono.c @@ -71,10 +71,10 @@ uint8_t g_scaling_registers[IS31FL3743A_DRIVER_COUNT][IS31FL3743A_SCALING_REGIST void is31fl3743a_write_register(uint8_t addr, uint8_t reg, uint8_t data) { #if IS31FL3743A_I2C_PERSISTENCE > 0 for (uint8_t i = 0; i < IS31FL3743A_I2C_PERSISTENCE; i++) { - if (i2c_writeReg(addr << 1, reg, &data, 1, IS31FL3743A_I2C_TIMEOUT) == I2C_STATUS_SUCCESS) break; + if (i2c_write_register(addr << 1, reg, &data, 1, IS31FL3743A_I2C_TIMEOUT) == I2C_STATUS_SUCCESS) break; } #else - i2c_writeReg(addr << 1, reg, &data, 1, IS31FL3743A_I2C_TIMEOUT); + i2c_write_register(addr << 1, reg, &data, 1, IS31FL3743A_I2C_TIMEOUT); #endif } @@ -91,10 +91,10 @@ void is31fl3743a_write_pwm_buffer(uint8_t addr, uint8_t index) { 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, g_pwm_buffer[index] + i, 18, IS31FL3743A_I2C_TIMEOUT) == I2C_STATUS_SUCCESS) break; + if (i2c_write_register(addr << 1, i + 1, g_pwm_buffer[index] + i, 18, IS31FL3743A_I2C_TIMEOUT) == I2C_STATUS_SUCCESS) break; } #else - i2c_writeReg(addr << 1, i + 1, g_pwm_buffer[index] + i, 18, IS31FL3743A_I2C_TIMEOUT); + i2c_write_register(addr << 1, i + 1, g_pwm_buffer[index] + i, 18, IS31FL3743A_I2C_TIMEOUT); #endif } } diff --git a/drivers/led/issi/is31fl3743a.c b/drivers/led/issi/is31fl3743a.c index df094952a11..f9cdb130dab 100644 --- a/drivers/led/issi/is31fl3743a.c +++ b/drivers/led/issi/is31fl3743a.c @@ -71,10 +71,10 @@ uint8_t g_scaling_registers[IS31FL3743A_DRIVER_COUNT][IS31FL3743A_SCALING_REGIST void is31fl3743a_write_register(uint8_t addr, uint8_t reg, uint8_t data) { #if IS31FL3743A_I2C_PERSISTENCE > 0 for (uint8_t i = 0; i < IS31FL3743A_I2C_PERSISTENCE; i++) { - if (i2c_writeReg(addr << 1, reg, &data, 1, IS31FL3743A_I2C_TIMEOUT) == I2C_STATUS_SUCCESS) break; + if (i2c_write_register(addr << 1, reg, &data, 1, IS31FL3743A_I2C_TIMEOUT) == I2C_STATUS_SUCCESS) break; } #else - i2c_writeReg(addr << 1, reg, &data, 1, IS31FL3743A_I2C_TIMEOUT); + i2c_write_register(addr << 1, reg, &data, 1, IS31FL3743A_I2C_TIMEOUT); #endif } @@ -91,10 +91,10 @@ void is31fl3743a_write_pwm_buffer(uint8_t addr, uint8_t index) { 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, g_pwm_buffer[index] + i, 18, IS31FL3743A_I2C_TIMEOUT) == I2C_STATUS_SUCCESS) break; + if (i2c_write_register(addr << 1, i + 1, g_pwm_buffer[index] + i, 18, IS31FL3743A_I2C_TIMEOUT) == I2C_STATUS_SUCCESS) break; } #else - i2c_writeReg(addr << 1, i + 1, g_pwm_buffer[index] + i, 18, IS31FL3743A_I2C_TIMEOUT); + i2c_write_register(addr << 1, i + 1, g_pwm_buffer[index] + i, 18, IS31FL3743A_I2C_TIMEOUT); #endif } } diff --git a/drivers/led/issi/is31fl3745-mono.c b/drivers/led/issi/is31fl3745-mono.c index 2c9f5accbab..2b68c963269 100644 --- a/drivers/led/issi/is31fl3745-mono.c +++ b/drivers/led/issi/is31fl3745-mono.c @@ -71,10 +71,10 @@ uint8_t g_scaling_registers[IS31FL3745_DRIVER_COUNT][IS31FL3745_SCALING_REGISTER void is31fl3745_write_register(uint8_t addr, uint8_t reg, uint8_t data) { #if IS31FL3745_I2C_PERSISTENCE > 0 for (uint8_t i = 0; i < IS31FL3745_I2C_PERSISTENCE; i++) { - if (i2c_writeReg(addr << 1, reg, &data, 1, IS31FL3745_I2C_TIMEOUT) == I2C_STATUS_SUCCESS) break; + if (i2c_write_register(addr << 1, reg, &data, 1, IS31FL3745_I2C_TIMEOUT) == I2C_STATUS_SUCCESS) break; } #else - i2c_writeReg(addr << 1, reg, &data, 1, IS31FL3745_I2C_TIMEOUT); + i2c_write_register(addr << 1, reg, &data, 1, IS31FL3745_I2C_TIMEOUT); #endif } @@ -91,10 +91,10 @@ void is31fl3745_write_pwm_buffer(uint8_t addr, uint8_t index) { for (uint8_t i = 0; i < IS31FL3745_PWM_REGISTER_COUNT; i += 18) { #if IS31FL3745_I2C_PERSISTENCE > 0 for (uint8_t j = 0; j < IS31FL3745_I2C_PERSISTENCE; j++) { - if (i2c_writeReg(addr << 1, i + 1, g_pwm_buffer[index] + i, 18, IS31FL3745_I2C_TIMEOUT) == I2C_STATUS_SUCCESS) break; + if (i2c_write_register(addr << 1, i + 1, g_pwm_buffer[index] + i, 18, IS31FL3745_I2C_TIMEOUT) == I2C_STATUS_SUCCESS) break; } #else - i2c_writeReg(addr << 1, i + 1, g_pwm_buffer[index] + i, 18, IS31FL3745_I2C_TIMEOUT); + i2c_write_register(addr << 1, i + 1, g_pwm_buffer[index] + i, 18, IS31FL3745_I2C_TIMEOUT); #endif } } diff --git a/drivers/led/issi/is31fl3745.c b/drivers/led/issi/is31fl3745.c index aed8876f289..0f91a75bcce 100644 --- a/drivers/led/issi/is31fl3745.c +++ b/drivers/led/issi/is31fl3745.c @@ -71,10 +71,10 @@ uint8_t g_scaling_registers[IS31FL3745_DRIVER_COUNT][IS31FL3745_SCALING_REGISTER void is31fl3745_write_register(uint8_t addr, uint8_t reg, uint8_t data) { #if IS31FL3745_I2C_PERSISTENCE > 0 for (uint8_t i = 0; i < IS31FL3745_I2C_PERSISTENCE; i++) { - if (i2c_writeReg(addr << 1, reg, &data, 1, IS31FL3745_I2C_TIMEOUT) == I2C_STATUS_SUCCESS) break; + if (i2c_write_register(addr << 1, reg, &data, 1, IS31FL3745_I2C_TIMEOUT) == I2C_STATUS_SUCCESS) break; } #else - i2c_writeReg(addr << 1, reg, &data, 1, IS31FL3745_I2C_TIMEOUT); + i2c_write_register(addr << 1, reg, &data, 1, IS31FL3745_I2C_TIMEOUT); #endif } @@ -91,10 +91,10 @@ void is31fl3745_write_pwm_buffer(uint8_t addr, uint8_t index) { for (uint8_t i = 0; i < IS31FL3745_PWM_REGISTER_COUNT; i += 18) { #if IS31FL3745_I2C_PERSISTENCE > 0 for (uint8_t j = 0; j < IS31FL3745_I2C_PERSISTENCE; j++) { - if (i2c_writeReg(addr << 1, i + 1, g_pwm_buffer[index] + i, 18, IS31FL3745_I2C_TIMEOUT) == I2C_STATUS_SUCCESS) break; + if (i2c_write_register(addr << 1, i + 1, g_pwm_buffer[index] + i, 18, IS31FL3745_I2C_TIMEOUT) == I2C_STATUS_SUCCESS) break; } #else - i2c_writeReg(addr << 1, i + 1, g_pwm_buffer[index] + i, 18, IS31FL3745_I2C_TIMEOUT); + i2c_write_register(addr << 1, i + 1, g_pwm_buffer[index] + i, 18, IS31FL3745_I2C_TIMEOUT); #endif } } diff --git a/drivers/led/issi/is31fl3746a-mono.c b/drivers/led/issi/is31fl3746a-mono.c index d66866aacbe..c21269b3a33 100644 --- a/drivers/led/issi/is31fl3746a-mono.c +++ b/drivers/led/issi/is31fl3746a-mono.c @@ -62,10 +62,10 @@ uint8_t g_scaling_registers[IS31FL3746A_DRIVER_COUNT][IS31FL3746A_SCALING_REGIST void is31fl3746a_write_register(uint8_t addr, uint8_t reg, uint8_t data) { #if IS31FL3746A_I2C_PERSISTENCE > 0 for (uint8_t i = 0; i < IS31FL3746A_I2C_PERSISTENCE; i++) { - if (i2c_writeReg(addr << 1, reg, &data, 1, IS31FL3746A_I2C_TIMEOUT) == I2C_STATUS_SUCCESS) break; + if (i2c_write_register(addr << 1, reg, &data, 1, IS31FL3746A_I2C_TIMEOUT) == I2C_STATUS_SUCCESS) break; } #else - i2c_writeReg(addr << 1, reg, &data, 1, IS31FL3746A_I2C_TIMEOUT); + i2c_write_register(addr << 1, reg, &data, 1, IS31FL3746A_I2C_TIMEOUT); #endif } @@ -82,10 +82,10 @@ void is31fl3746a_write_pwm_buffer(uint8_t addr, uint8_t index) { for (uint8_t i = 0; i < IS31FL3746A_PWM_REGISTER_COUNT; i += 18) { #if IS31FL3746A_I2C_PERSISTENCE > 0 for (uint8_t j = 0; j < IS31FL3746A_I2C_PERSISTENCE; j++) { - if (i2c_writeReg(addr << 1, i + 1, g_pwm_buffer[index] + i, 18, IS31FL3746A_I2C_TIMEOUT) == I2C_STATUS_SUCCESS) break; + if (i2c_write_register(addr << 1, i + 1, g_pwm_buffer[index] + i, 18, IS31FL3746A_I2C_TIMEOUT) == I2C_STATUS_SUCCESS) break; } #else - i2c_writeReg(addr << 1, i + 1, g_pwm_buffer[index] + i, 18, IS31FL3746A_I2C_TIMEOUT); + i2c_write_register(addr << 1, i + 1, g_pwm_buffer[index] + i, 18, IS31FL3746A_I2C_TIMEOUT); #endif } } diff --git a/drivers/led/issi/is31fl3746a.c b/drivers/led/issi/is31fl3746a.c index 17346f39a43..d167cdd90b8 100644 --- a/drivers/led/issi/is31fl3746a.c +++ b/drivers/led/issi/is31fl3746a.c @@ -62,10 +62,10 @@ uint8_t g_scaling_registers[IS31FL3746A_DRIVER_COUNT][IS31FL3746A_SCALING_REGIST void is31fl3746a_write_register(uint8_t addr, uint8_t reg, uint8_t data) { #if IS31FL3746A_I2C_PERSISTENCE > 0 for (uint8_t i = 0; i < IS31FL3746A_I2C_PERSISTENCE; i++) { - if (i2c_writeReg(addr << 1, reg, &data, 1, IS31FL3746A_I2C_TIMEOUT) == I2C_STATUS_SUCCESS) break; + if (i2c_write_register(addr << 1, reg, &data, 1, IS31FL3746A_I2C_TIMEOUT) == I2C_STATUS_SUCCESS) break; } #else - i2c_writeReg(addr << 1, reg, &data, 1, IS31FL3746A_I2C_TIMEOUT); + i2c_write_register(addr << 1, reg, &data, 1, IS31FL3746A_I2C_TIMEOUT); #endif } @@ -82,10 +82,10 @@ void is31fl3746a_write_pwm_buffer(uint8_t addr, uint8_t index) { for (uint8_t i = 0; i < IS31FL3746A_PWM_REGISTER_COUNT; i += 18) { #if IS31FL3746A_I2C_PERSISTENCE > 0 for (uint8_t j = 0; j < IS31FL3746A_I2C_PERSISTENCE; j++) { - if (i2c_writeReg(addr << 1, i + 1, g_pwm_buffer[index] + i, 18, IS31FL3746A_I2C_TIMEOUT) == I2C_STATUS_SUCCESS) break; + if (i2c_write_register(addr << 1, i + 1, g_pwm_buffer[index] + i, 18, IS31FL3746A_I2C_TIMEOUT) == I2C_STATUS_SUCCESS) break; } #else - i2c_writeReg(addr << 1, i + 1, g_pwm_buffer[index] + i, 18, IS31FL3746A_I2C_TIMEOUT); + i2c_write_register(addr << 1, i + 1, g_pwm_buffer[index] + i, 18, IS31FL3746A_I2C_TIMEOUT); #endif } } diff --git a/drivers/led/snled27351-mono.c b/drivers/led/snled27351-mono.c index f75e81ef12e..854d21d3dc6 100644 --- a/drivers/led/snled27351-mono.c +++ b/drivers/led/snled27351-mono.c @@ -52,10 +52,10 @@ bool g_led_control_registers_update_required[SNLED27351_DRIVER_COUNT] void snled27351_write_register(uint8_t addr, uint8_t reg, uint8_t data) { #if SNLED27351_I2C_PERSISTENCE > 0 for (uint8_t i = 0; i < SNLED27351_I2C_PERSISTENCE; i++) { - if (i2c_writeReg(addr << 1, reg, &data, 1, SNLED27351_I2C_TIMEOUT) == I2C_STATUS_SUCCESS) break; + if (i2c_write_register(addr << 1, reg, &data, 1, SNLED27351_I2C_TIMEOUT) == I2C_STATUS_SUCCESS) break; } #else - i2c_writeReg(addr << 1, reg, &data, 1, SNLED27351_I2C_TIMEOUT); + i2c_write_register(addr << 1, reg, &data, 1, SNLED27351_I2C_TIMEOUT); #endif } @@ -71,10 +71,10 @@ void snled27351_write_pwm_buffer(uint8_t addr, uint8_t index) { for (uint8_t i = 0; i < SNLED27351_PWM_REGISTER_COUNT; i += 16) { #if SNLED27351_I2C_PERSISTENCE > 0 for (uint8_t j = 0; j < SNLED27351_I2C_PERSISTENCE; j++) { - if (i2c_writeReg(addr << 1, i, g_pwm_buffer[index] + i, 16, SNLED27351_I2C_TIMEOUT) == I2C_STATUS_SUCCESS) break; + if (i2c_write_register(addr << 1, i, g_pwm_buffer[index] + i, 16, SNLED27351_I2C_TIMEOUT) == I2C_STATUS_SUCCESS) break; } #else - i2c_writeReg(addr << 1, i, g_pwm_buffer[index] + i, 16, SNLED27351_I2C_TIMEOUT); + i2c_write_register(addr << 1, i, g_pwm_buffer[index] + i, 16, SNLED27351_I2C_TIMEOUT); #endif } } diff --git a/drivers/led/snled27351.c b/drivers/led/snled27351.c index 52ec54c34b4..662335afd22 100644 --- a/drivers/led/snled27351.c +++ b/drivers/led/snled27351.c @@ -52,10 +52,10 @@ bool g_led_control_registers_update_required[SNLED27351_DRIVER_COUNT] void snled27351_write_register(uint8_t addr, uint8_t reg, uint8_t data) { #if SNLED27351_I2C_PERSISTENCE > 0 for (uint8_t i = 0; i < SNLED27351_I2C_PERSISTENCE; i++) { - if (i2c_writeReg(addr << 1, reg, &data, 1, SNLED27351_I2C_TIMEOUT) == I2C_STATUS_SUCCESS) break; + if (i2c_write_register(addr << 1, reg, &data, 1, SNLED27351_I2C_TIMEOUT) == I2C_STATUS_SUCCESS) break; } #else - i2c_writeReg(addr << 1, reg, &data, 1, SNLED27351_I2C_TIMEOUT); + i2c_write_register(addr << 1, reg, &data, 1, SNLED27351_I2C_TIMEOUT); #endif } @@ -71,10 +71,10 @@ void snled27351_write_pwm_buffer(uint8_t addr, uint8_t index) { for (uint8_t i = 0; i < SNLED27351_PWM_REGISTER_COUNT; i += 16) { #if SNLED27351_I2C_PERSISTENCE > 0 for (uint8_t j = 0; j < SNLED27351_I2C_PERSISTENCE; j++) { - if (i2c_writeReg(addr << 1, i, g_pwm_buffer[index] + i, 16, SNLED27351_I2C_TIMEOUT) == I2C_STATUS_SUCCESS) break; + if (i2c_write_register(addr << 1, i, g_pwm_buffer[index] + i, 16, SNLED27351_I2C_TIMEOUT) == I2C_STATUS_SUCCESS) break; } #else - i2c_writeReg(addr << 1, i, g_pwm_buffer[index] + i, 16, SNLED27351_I2C_TIMEOUT); + i2c_write_register(addr << 1, i, g_pwm_buffer[index] + i, 16, SNLED27351_I2C_TIMEOUT); #endif } } diff --git a/keyboards/input_club/k_type/i2c_master.c b/keyboards/input_club/k_type/i2c_master.c index af34d55ef6a..e25ae2ef6f1 100644 --- a/keyboards/input_club/k_type/i2c_master.c +++ b/keyboards/input_club/k_type/i2c_master.c @@ -114,7 +114,7 @@ i2c_status_t i2c_receive(uint8_t index, uint8_t address, uint8_t* data, uint16_t return chibios_to_qmk(&status); } -i2c_status_t i2c_writeReg(uint8_t index, uint8_t devaddr, uint8_t regaddr, const uint8_t* data, uint16_t length, uint16_t timeout) { +i2c_status_t i2c_write_register(uint8_t index, uint8_t devaddr, uint8_t regaddr, const uint8_t* data, uint16_t length, uint16_t timeout) { if(index >= I2C_COUNT) { return I2C_STATUS_ERROR; } @@ -131,7 +131,7 @@ i2c_status_t i2c_writeReg(uint8_t index, uint8_t devaddr, uint8_t regaddr, const return chibios_to_qmk(&status); } -i2c_status_t i2c_readReg(uint8_t index, uint8_t devaddr, uint8_t regaddr, uint8_t* data, uint16_t length, uint16_t timeout) { +i2c_status_t i2c_read_register(uint8_t index, uint8_t devaddr, uint8_t regaddr, uint8_t* data, uint16_t length, uint16_t timeout) { if(index >= I2C_COUNT) { return I2C_STATUS_ERROR; } diff --git a/keyboards/input_club/k_type/i2c_master.h b/keyboards/input_club/k_type/i2c_master.h index db4f12e43c4..aa6ffe48b25 100644 --- a/keyboards/input_club/k_type/i2c_master.h +++ b/keyboards/input_club/k_type/i2c_master.h @@ -123,6 +123,6 @@ void i2c_init(I2CDriver *driver, ioline_t scl_pin, ioline_t sda_pin); i2c_status_t i2c_start(uint8_t index, uint8_t address); i2c_status_t i2c_transmit(uint8_t index, uint8_t address, const uint8_t* data, uint16_t length, uint16_t timeout); i2c_status_t i2c_receive(uint8_t index, uint8_t address, uint8_t* data, uint16_t length, uint16_t timeout); -i2c_status_t i2c_writeReg(uint8_t index, uint8_t devaddr, uint8_t regaddr, const uint8_t* data, uint16_t length, uint16_t timeout); -i2c_status_t i2c_readReg(uint8_t index, uint8_t devaddr, uint8_t regaddr, uint8_t* data, uint16_t length, uint16_t timeout); +i2c_status_t i2c_write_register(uint8_t index, uint8_t devaddr, uint8_t regaddr, const uint8_t* data, uint16_t length, uint16_t timeout); +i2c_status_t i2c_read_register(uint8_t index, uint8_t devaddr, uint8_t regaddr, uint8_t* data, uint16_t length, uint16_t timeout); void i2c_stop(uint8_t index); diff --git a/keyboards/input_club/k_type/is31fl3733-dual.c b/keyboards/input_club/k_type/is31fl3733-dual.c index 7e32ba30b0a..dce371d444a 100644 --- a/keyboards/input_club/k_type/is31fl3733-dual.c +++ b/keyboards/input_club/k_type/is31fl3733-dual.c @@ -75,10 +75,10 @@ bool g_led_control_registers_update_required[IS31FL3733_DRIVER_COUNT] void is31fl3733_write_register(uint8_t index, uint8_t addr, uint8_t reg, uint8_t data) { #if IS31FL3733_I2C_PERSISTENCE > 0 for (uint8_t i = 0; i < IS31FL3733_I2C_PERSISTENCE; i++) { - if (i2c_writeReg(index, addr << 1, reg, &data, 1, IS31FL3733_I2C_TIMEOUT) == I2C_STATUS_SUCCESS) break; + if (i2c_write_register(index, addr << 1, reg, &data, 1, IS31FL3733_I2C_TIMEOUT) == I2C_STATUS_SUCCESS) break; } #else - i2c_writeReg(index, addr << 1, reg, &data, 1, IS31FL3733_I2C_TIMEOUT); + i2c_write_register(index, addr << 1, reg, &data, 1, IS31FL3733_I2C_TIMEOUT); #endif } @@ -95,10 +95,10 @@ void is31fl3733_write_pwm_buffer(uint8_t addr, uint8_t index) { for (uint8_t i = 0; i < IS31FL3733_PWM_REGISTER_COUNT; i += 16) { #if IS31FL3733_I2C_PERSISTENCE > 0 for (uint8_t j = 0; j < IS31FL3733_I2C_PERSISTENCE; j++) { - if (i2c_writeReg(index, addr << 1, i, g_pwm_buffer[index] + i, 16, IS31FL3733_I2C_TIMEOUT) == I2C_STATUS_SUCCESS) break; + if (i2c_write_register(index, addr << 1, i, g_pwm_buffer[index] + i, 16, IS31FL3733_I2C_TIMEOUT) == I2C_STATUS_SUCCESS) break; } #else - i2c_writeReg(index, addr << 1, i, g_pwm_buffer[index] + i, 16, IS31FL3733_I2C_TIMEOUT); + i2c_write_register(index, addr << 1, i, g_pwm_buffer[index] + i, 16, IS31FL3733_I2C_TIMEOUT); #endif } }