summaryrefslogtreecommitdiff
path: root/drivers/issi/is31fl3733.h
diff options
context:
space:
mode:
authoryiancar <yiangosyiangou@cytanet.com.cy>2019-11-25 20:33:52 +0000
committerJoel Challis <git@zvecr.com>2019-11-25 20:33:52 +0000
commitc0fe8dbfb4ea7b36cc2c5ba65d943c2cbec84244 (patch)
tree3fe648b223538ce54ad1f322f760a8610bd7a388 /drivers/issi/is31fl3733.h
parentf0f161e5724375b7a289699703d86d6de2adae8d (diff)
IS31FL3733 Dirty page fix (#7079)
* IS31FL3733 Dirty page fix Function IS31FL3733_update_led_control_registers was never setting update register to false. As a result the led on/off page was being written every transaction even when it was not modified. This is ineficient and causes lots of bandwidth use. -> Fix the IS31FL3733_update_led_control_registers. -> After testing it was evident that failed I2C transactions could corrupt the Led on/off register. -> Update IS31FL3733_write_pwm_buffer and IS31FL3733_write_register functions to return 0 upon succesful tranmission and 1 if any of the transmitions within the function fail. -> Modify IS31FL3733_update_pwm_buffers function so if any of the IS31FL3733_write_pwm_buffer transuction fails, the g_led_control_registers_update_required register is set to true forcing a rewrite of the led on/off register in case it was corrupted. * Minor comment update * Upsie:) * Update is31fl3733.c * Return fix * more return fix * type change * more boolian logic reversal:)
Diffstat (limited to 'drivers/issi/is31fl3733.h')
-rw-r--r--drivers/issi/is31fl3733.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/issi/is31fl3733.h b/drivers/issi/is31fl3733.h
index 5b3283e035..4cf1867334 100644
--- a/drivers/issi/is31fl3733.h
+++ b/drivers/issi/is31fl3733.h
@@ -32,8 +32,8 @@ typedef struct is31_led {
extern const is31_led g_is31_leds[DRIVER_LED_TOTAL];
void IS31FL3733_init(uint8_t addr, uint8_t sync);
-void IS31FL3733_write_register(uint8_t addr, uint8_t reg, uint8_t data);
-void IS31FL3733_write_pwm_buffer(uint8_t addr, uint8_t *pwm_buffer);
+bool IS31FL3733_write_register(uint8_t addr, uint8_t reg, uint8_t data);
+bool IS31FL3733_write_pwm_buffer(uint8_t addr, uint8_t *pwm_buffer);
void IS31FL3733_set_color(int index, uint8_t red, uint8_t green, uint8_t blue);
void IS31FL3733_set_color_all(uint8_t red, uint8_t green, uint8_t blue);