diff --git a/drivers/led/aw20216s.c b/drivers/led/aw20216s.c
index 078a694d30..988cb6e9f6 100644
--- a/drivers/led/aw20216s.c
+++ b/drivers/led/aw20216s.c
@@ -166,3 +166,10 @@ void aw20216s_update_pwm_buffers(pin_t cs_pin, uint8_t index) {
}
g_pwm_buffer_update_required[index] = false;
}
+
+void aw20216s_flush(void) {
+ aw20216s_update_pwm_buffers(AW20216S_CS_PIN_1, 0);
+#if defined(AW20216S_CS_PIN_2)
+ aw20216s_update_pwm_buffers(AW20216S_CS_PIN_2, 1);
+#endif
+}
diff --git a/drivers/led/aw20216s.h b/drivers/led/aw20216s.h
index f8c0efcc6f..8abc2ee4af 100644
--- a/drivers/led/aw20216s.h
+++ b/drivers/led/aw20216s.h
@@ -68,6 +68,8 @@ void aw20216s_set_color(int index, uint8_t red, uint8_t green, uint8_t blue);
void aw20216s_set_color_all(uint8_t red, uint8_t green, uint8_t blue);
void aw20216s_update_pwm_buffers(pin_t cs_pin, uint8_t index);
+void aw20216s_flush(void);
+
#define CS1_SW1 0x00
#define CS2_SW1 0x01
#define CS3_SW1 0x02
diff --git a/drivers/led/issi/is31fl3731-simple.c b/drivers/led/issi/is31fl3731-simple.c
index f9ad703ced..adf2ccfca0 100644
--- a/drivers/led/issi/is31fl3731-simple.c
+++ b/drivers/led/issi/is31fl3731-simple.c
@@ -211,3 +211,16 @@ void is31fl3731_update_led_control_registers(uint8_t addr, uint8_t index) {
g_led_control_registers_update_required[index] = false;
}
}
+
+void is31fl3731_flush(void) {
+ is31fl3731_update_pwm_buffers(IS31FL3731_I2C_ADDRESS_1, 0);
+#if defined(IS31FL3731_I2C_ADDRESS_2)
+ is31fl3731_update_pwm_buffers(IS31FL3731_I2C_ADDRESS_2, 1);
+# if defined(IS31FL3731_I2C_ADDRESS_3)
+ is31fl3731_update_pwm_buffers(IS31FL3731_I2C_ADDRESS_3, 2);
+# if defined(IS31FL3731_I2C_ADDRESS_4)
+ is31fl3731_update_pwm_buffers(IS31FL3731_I2C_ADDRESS_4, 3);
+# endif
+# endif
+#endif
+}
diff --git a/drivers/led/issi/is31fl3731-simple.h b/drivers/led/issi/is31fl3731-simple.h
index 3233fdc0d7..69d38e74da 100644
--- a/drivers/led/issi/is31fl3731-simple.h
+++ b/drivers/led/issi/is31fl3731-simple.h
@@ -80,6 +80,8 @@ void is31fl3731_set_led_control_register(uint8_t index, bool value);
void is31fl3731_update_pwm_buffers(uint8_t addr, uint8_t index);
void is31fl3731_update_led_control_registers(uint8_t addr, uint8_t index);
+void is31fl3731_flush(void);
+
#define C1_1 0x24
#define C1_2 0x25
#define C1_3 0x26
diff --git a/drivers/led/issi/is31fl3731.c b/drivers/led/issi/is31fl3731.c
index a30e8fcbc2..767c0da0d9 100644
--- a/drivers/led/issi/is31fl3731.c
+++ b/drivers/led/issi/is31fl3731.c
@@ -223,3 +223,16 @@ void is31fl3731_update_led_control_registers(uint8_t addr, uint8_t index) {
}
g_led_control_registers_update_required[index] = false;
}
+
+void is31fl3731_flush(void) {
+ is31fl3731_update_pwm_buffers(IS31FL3731_I2C_ADDRESS_1, 0);
+#if defined(IS31FL3731_I2C_ADDRESS_2)
+ is31fl3731_update_pwm_buffers(IS31FL3731_I2C_ADDRESS_2, 1);
+# if defined(IS31FL3731_I2C_ADDRESS_3)
+ is31fl3731_update_pwm_buffers(IS31FL3731_I2C_ADDRESS_3, 2);
+# if defined(IS31FL3731_I2C_ADDRESS_4)
+ is31fl3731_update_pwm_buffers(IS31FL3731_I2C_ADDRESS_4, 3);
+# endif
+# endif
+#endif
+}
diff --git a/drivers/led/issi/is31fl3731.h b/drivers/led/issi/is31fl3731.h
index fff91bfdbf..cab6d40c5a 100644
--- a/drivers/led/issi/is31fl3731.h
+++ b/drivers/led/issi/is31fl3731.h
@@ -81,6 +81,8 @@ void is31fl3731_set_led_control_register(uint8_t index, bool red, bool green, bo
void is31fl3731_update_pwm_buffers(uint8_t addr, uint8_t index);
void is31fl3731_update_led_control_registers(uint8_t addr, uint8_t index);
+void is31fl3731_flush(void);
+
#define C1_1 0x24
#define C1_2 0x25
#define C1_3 0x26
diff --git a/drivers/led/issi/is31fl3733-simple.c b/drivers/led/issi/is31fl3733-simple.c
index e94b4c7d78..dbbf86a8f5 100644
--- a/drivers/led/issi/is31fl3733-simple.c
+++ b/drivers/led/issi/is31fl3733-simple.c
@@ -233,3 +233,16 @@ void is31fl3733_update_led_control_registers(uint8_t addr, uint8_t index) {
g_led_control_registers_update_required[index] = false;
}
}
+
+void is31fl3733_flush(void) {
+ is31fl3733_update_pwm_buffers(IS31FL3733_I2C_ADDRESS_1, 0);
+#if defined(IS31FL3733_I2C_ADDRESS_2)
+ is31fl3733_update_pwm_buffers(IS31FL3733_I2C_ADDRESS_2, 1);
+# if defined(IS31FL3733_I2C_ADDRESS_3)
+ is31fl3733_update_pwm_buffers(IS31FL3733_I2C_ADDRESS_3, 2);
+# if defined(IS31FL3733_I2C_ADDRESS_4)
+ is31fl3733_update_pwm_buffers(IS31FL3733_I2C_ADDRESS_4, 3);
+# endif
+# endif
+#endif
+}
diff --git a/drivers/led/issi/is31fl3733-simple.h b/drivers/led/issi/is31fl3733-simple.h
index 8041a7f0f3..b8a4530260 100644
--- a/drivers/led/issi/is31fl3733-simple.h
+++ b/drivers/led/issi/is31fl3733-simple.h
@@ -99,6 +99,8 @@ void is31fl3733_set_led_control_register(uint8_t index, bool value);
void is31fl3733_update_pwm_buffers(uint8_t addr, uint8_t index);
void is31fl3733_update_led_control_registers(uint8_t addr, uint8_t index);
+void is31fl3733_flush(void);
+
#define IS31FL3733_PUR_0R 0x00 // No PUR resistor
#define IS31FL3733_PUR_05KR 0x02 // 0.5k Ohm resistor in t_NOL
#define IS31FL3733_PUR_3KR 0x03 // 3.0k Ohm resistor on all the time
diff --git a/drivers/led/issi/is31fl3733.c b/drivers/led/issi/is31fl3733.c
index efc5929587..35ec96a55a 100644
--- a/drivers/led/issi/is31fl3733.c
+++ b/drivers/led/issi/is31fl3733.c
@@ -248,3 +248,16 @@ void is31fl3733_update_led_control_registers(uint8_t addr, uint8_t index) {
g_led_control_registers_update_required[index] = false;
}
}
+
+void is31fl3733_flush(void) {
+ is31fl3733_update_pwm_buffers(IS31FL3733_I2C_ADDRESS_1, 0);
+#if defined(IS31FL3733_I2C_ADDRESS_2)
+ is31fl3733_update_pwm_buffers(IS31FL3733_I2C_ADDRESS_2, 1);
+# if defined(IS31FL3733_I2C_ADDRESS_3)
+ is31fl3733_update_pwm_buffers(IS31FL3733_I2C_ADDRESS_3, 2);
+# if defined(IS31FL3733_I2C_ADDRESS_4)
+ is31fl3733_update_pwm_buffers(IS31FL3733_I2C_ADDRESS_4, 3);
+# endif
+# endif
+#endif
+}
diff --git a/drivers/led/issi/is31fl3733.h b/drivers/led/issi/is31fl3733.h
index e56d04f66f..2a02576979 100644
--- a/drivers/led/issi/is31fl3733.h
+++ b/drivers/led/issi/is31fl3733.h
@@ -124,6 +124,8 @@ void is31fl3733_set_led_control_register(uint8_t index, bool red, bool green, bo
void is31fl3733_update_pwm_buffers(uint8_t addr, uint8_t index);
void is31fl3733_update_led_control_registers(uint8_t addr, uint8_t index);
+void is31fl3733_flush(void);
+
#define IS31FL3733_PUR_0R 0x00 // No PUR resistor
#define IS31FL3733_PUR_05KR 0x02 // 0.5k Ohm resistor in t_NOL
#define IS31FL3733_PUR_3KR 0x03 // 3.0k Ohm resistor on all the time
diff --git a/drivers/led/issi/is31fl3736-simple.c b/drivers/led/issi/is31fl3736-simple.c
index f3f202efb2..d8262c3416 100644
--- a/drivers/led/issi/is31fl3736-simple.c
+++ b/drivers/led/issi/is31fl3736-simple.c
@@ -220,3 +220,16 @@ void is31fl3736_update_led_control_registers(uint8_t addr, uint8_t index) {
g_led_control_registers_update_required[index] = false;
}
}
+
+void is31fl3736_flush(void) {
+ is31fl3736_update_pwm_buffers(IS31FL3736_I2C_ADDRESS_1, 0);
+#if defined(IS31FL3736_I2C_ADDRESS_2)
+ is31fl3736_update_pwm_buffers(IS31FL3736_I2C_ADDRESS_2, 1);
+# if defined(IS31FL3736_I2C_ADDRESS_3)
+ is31fl3736_update_pwm_buffers(IS31FL3736_I2C_ADDRESS_3, 2);
+# if defined(IS31FL3736_I2C_ADDRESS_4)
+ is31fl3736_update_pwm_buffers(IS31FL3736_I2C_ADDRESS_4, 3);
+# endif
+# endif
+#endif
+}
diff --git a/drivers/led/issi/is31fl3736-simple.h b/drivers/led/issi/is31fl3736-simple.h
index d5525e460d..4f9dee47b0 100644
--- a/drivers/led/issi/is31fl3736-simple.h
+++ b/drivers/led/issi/is31fl3736-simple.h
@@ -94,6 +94,8 @@ void is31fl3736_set_led_control_register(uint8_t index, bool value);
void is31fl3736_update_pwm_buffers(uint8_t addr, uint8_t index);
void is31fl3736_update_led_control_registers(uint8_t addr, uint8_t index);
+void is31fl3736_flush(void);
+
#define IS31FL3736_PUR_0R 0x00 // No PUR resistor
#define IS31FL3736_PUR_05KR 0x01 // 0.5k Ohm resistor
#define IS31FL3736_PUR_1KR 0x02 // 1.0k Ohm resistor
diff --git a/drivers/led/issi/is31fl3736.c b/drivers/led/issi/is31fl3736.c
index 03f50873df..4edf1b04c8 100644
--- a/drivers/led/issi/is31fl3736.c
+++ b/drivers/led/issi/is31fl3736.c
@@ -237,3 +237,16 @@ void is31fl3736_update_led_control_registers(uint8_t addr, uint8_t index) {
g_led_control_registers_update_required[index] = false;
}
}
+
+void is31fl3736_flush(void) {
+ is31fl3736_update_pwm_buffers(IS31FL3736_I2C_ADDRESS_1, 0);
+#if defined(IS31FL3736_I2C_ADDRESS_2)
+ is31fl3736_update_pwm_buffers(IS31FL3736_I2C_ADDRESS_2, 1);
+# if defined(IS31FL3736_I2C_ADDRESS_3)
+ is31fl3736_update_pwm_buffers(IS31FL3736_I2C_ADDRESS_3, 2);
+# if defined(IS31FL3736_I2C_ADDRESS_4)
+ is31fl3736_update_pwm_buffers(IS31FL3736_I2C_ADDRESS_4, 3);
+# endif
+# endif
+#endif
+}
diff --git a/drivers/led/issi/is31fl3736.h b/drivers/led/issi/is31fl3736.h
index 91312384ae..cd3505b0b6 100644
--- a/drivers/led/issi/is31fl3736.h
+++ b/drivers/led/issi/is31fl3736.h
@@ -108,6 +108,8 @@ void is31fl3736_set_led_control_register(uint8_t index, bool red, bool green, bo
void is31fl3736_update_pwm_buffers(uint8_t addr, uint8_t index);
void is31fl3736_update_led_control_registers(uint8_t addr, uint8_t index);
+void is31fl3736_flush(void);
+
#define IS31FL3736_PUR_0R 0x00 // No PUR resistor
#define IS31FL3736_PUR_05KR 0x01 // 0.5k Ohm resistor
#define IS31FL3736_PUR_1KR 0x02 // 1.0k Ohm resistor
diff --git a/drivers/led/issi/is31fl3737-simple.c b/drivers/led/issi/is31fl3737-simple.c
index 3db7b7ed33..7a4263d9af 100644
--- a/drivers/led/issi/is31fl3737-simple.c
+++ b/drivers/led/issi/is31fl3737-simple.c
@@ -217,3 +217,16 @@ void is31fl3737_update_led_control_registers(uint8_t addr, uint8_t index) {
g_led_control_registers_update_required[index] = false;
}
}
+
+void is31fl3737_flush(void) {
+ is31fl3737_update_pwm_buffers(IS31FL3737_I2C_ADDRESS_1, 0);
+#if defined(IS31FL3737_I2C_ADDRESS_2)
+ is31fl3737_update_pwm_buffers(IS31FL3737_I2C_ADDRESS_2, 1);
+# if defined(IS31FL3737_I2C_ADDRESS_3)
+ is31fl3737_update_pwm_buffers(IS31FL3737_I2C_ADDRESS_3, 2);
+# if defined(IS31FL3737_I2C_ADDRESS_4)
+ is31fl3737_update_pwm_buffers(IS31FL3737_I2C_ADDRESS_4, 3);
+# endif
+# endif
+#endif
+}
diff --git a/drivers/led/issi/is31fl3737-simple.h b/drivers/led/issi/is31fl3737-simple.h
index 0f4e0d014b..106127e737 100644
--- a/drivers/led/issi/is31fl3737-simple.h
+++ b/drivers/led/issi/is31fl3737-simple.h
@@ -84,6 +84,8 @@ void is31fl3737_set_led_control_register(uint8_t index, bool value);
void is31fl3737_update_pwm_buffers(uint8_t addr, uint8_t index);
void is31fl3737_update_led_control_registers(uint8_t addr, uint8_t index);
+void is31fl3737_flush(void);
+
#define IS31FL3737_PUR_0R 0x00 // No PUR resistor
#define IS31FL3737_PUR_05KR 0x01 // 0.5k Ohm resistor in t_NOL
#define IS31FL3737_PUR_1KR 0x02 // 1.0k Ohm resistor in t_NOL
diff --git a/drivers/led/issi/is31fl3737.c b/drivers/led/issi/is31fl3737.c
index c2af75bbb8..d769bb9707 100644
--- a/drivers/led/issi/is31fl3737.c
+++ b/drivers/led/issi/is31fl3737.c
@@ -233,3 +233,16 @@ void is31fl3737_update_led_control_registers(uint8_t addr, uint8_t index) {
g_led_control_registers_update_required[index] = false;
}
}
+
+void is31fl3737_flush(void) {
+ is31fl3737_update_pwm_buffers(IS31FL3737_I2C_ADDRESS_1, 0);
+#if defined(IS31FL3737_I2C_ADDRESS_2)
+ is31fl3737_update_pwm_buffers(IS31FL3737_I2C_ADDRESS_2, 1);
+# if defined(IS31FL3737_I2C_ADDRESS_3)
+ is31fl3737_update_pwm_buffers(IS31FL3737_I2C_ADDRESS_3, 2);
+# if defined(IS31FL3737_I2C_ADDRESS_4)
+ is31fl3737_update_pwm_buffers(IS31FL3737_I2C_ADDRESS_4, 3);
+# endif
+# endif
+#endif
+}
diff --git a/drivers/led/issi/is31fl3737.h b/drivers/led/issi/is31fl3737.h
index a2a81640f6..bb4afbcccb 100644
--- a/drivers/led/issi/is31fl3737.h
+++ b/drivers/led/issi/is31fl3737.h
@@ -101,6 +101,8 @@ void is31fl3737_set_led_control_register(uint8_t index, bool red, bool green, bo
void is31fl3737_update_pwm_buffers(uint8_t addr, uint8_t index);
void is31fl3737_update_led_control_registers(uint8_t addr, uint8_t index);
+void is31fl3737_flush(void);
+
#define IS31FL3737_PUR_0R 0x00 // No PUR resistor
#define IS31FL3737_PUR_05KR 0x01 // 0.5k Ohm resistor in t_NOL
#define IS31FL3737_PUR_1KR 0x02 // 1.0k Ohm resistor in t_NOL
diff --git a/drivers/led/issi/is31fl3741-simple.c b/drivers/led/issi/is31fl3741-simple.c
index 93c02fbc26..c7335866ec 100644
--- a/drivers/led/issi/is31fl3741-simple.c
+++ b/drivers/led/issi/is31fl3741-simple.c
@@ -251,3 +251,16 @@ void is31fl3741_set_scaling_registers(const is31fl3741_led_t *pled, uint8_t valu
g_scaling_registers_update_required[pled->driver] = true;
}
+
+void is31fl3741_flush(void) {
+ is31fl3741_update_pwm_buffers(IS31FL3741_I2C_ADDRESS_1, 0);
+#if defined(IS31FL3741_I2C_ADDRESS_2)
+ is31fl3741_update_pwm_buffers(IS31FL3741_I2C_ADDRESS_2, 1);
+# if defined(IS31FL3741_I2C_ADDRESS_3)
+ is31fl3741_update_pwm_buffers(IS31FL3741_I2C_ADDRESS_3, 2);
+# if defined(IS31FL3741_I2C_ADDRESS_4)
+ is31fl3741_update_pwm_buffers(IS31FL3741_I2C_ADDRESS_4, 3);
+# endif
+# endif
+#endif
+}
diff --git a/drivers/led/issi/is31fl3741-simple.h b/drivers/led/issi/is31fl3741-simple.h
index 46c058c644..29e6dc261d 100644
--- a/drivers/led/issi/is31fl3741-simple.h
+++ b/drivers/led/issi/is31fl3741-simple.h
@@ -87,6 +87,8 @@ void is31fl3741_set_scaling_registers(const is31fl3741_led_t *pled, uint8_t valu
void is31fl3741_set_pwm_buffer(const is31fl3741_led *pled, uint8_t value);
+void is31fl3741_flush(void);
+
#define IS31FL3741_PUR_0R 0x00 // No PUR resistor
#define IS31FL3741_PUR_05KR 0x01 // 0.5k Ohm resistor
#define IS31FL3741_PUR_1KR 0x02 // 1.0k Ohm resistor
diff --git a/drivers/led/issi/is31fl3741.c b/drivers/led/issi/is31fl3741.c
index 47c15a11ca..5e4ed711ca 100644
--- a/drivers/led/issi/is31fl3741.c
+++ b/drivers/led/issi/is31fl3741.c
@@ -269,3 +269,16 @@ void is31fl3741_set_scaling_registers(const is31fl3741_led_t *pled, uint8_t red,
g_scaling_registers_update_required[pled->driver] = true;
}
+
+void is31fl3741_flush(void) {
+ is31fl3741_update_pwm_buffers(IS31FL3741_I2C_ADDRESS_1, 0);
+#if defined(IS31FL3741_I2C_ADDRESS_2)
+ is31fl3741_update_pwm_buffers(IS31FL3741_I2C_ADDRESS_2, 1);
+# if defined(IS31FL3741_I2C_ADDRESS_3)
+ is31fl3741_update_pwm_buffers(IS31FL3741_I2C_ADDRESS_3, 2);
+# if defined(IS31FL3741_I2C_ADDRESS_4)
+ is31fl3741_update_pwm_buffers(IS31FL3741_I2C_ADDRESS_4, 3);
+# endif
+# endif
+#endif
+}
diff --git a/drivers/led/issi/is31fl3741.h b/drivers/led/issi/is31fl3741.h
index 30fab248bc..aedbe89b93 100644
--- a/drivers/led/issi/is31fl3741.h
+++ b/drivers/led/issi/is31fl3741.h
@@ -104,6 +104,8 @@ void is31fl3741_set_scaling_registers(const is31fl3741_led_t *pled, uint8_t red,
void is31fl3741_set_pwm_buffer(const is31fl3741_led_t *pled, uint8_t red, uint8_t green, uint8_t blue);
+void is31fl3741_flush(void);
+
#define IS31FL3741_PUR_0R 0x00 // No PUR resistor
#define IS31FL3741_PUR_05KR 0x01 // 0.5k Ohm resistor
#define IS31FL3741_PUR_1KR 0x02 // 1.0k Ohm resistor
diff --git a/drivers/led/issi/is31flcommon.c b/drivers/led/issi/is31flcommon.c
index 4b78947ada..850f23c831 100644
--- a/drivers/led/issi/is31flcommon.c
+++ b/drivers/led/issi/is31flcommon.c
@@ -174,6 +174,19 @@ void IS31FL_common_update_scaling_register(uint8_t addr, uint8_t index) {
}
}
+void IS31FL_common_flush(void) {
+ IS31FL_common_update_pwm_register(DRIVER_ADDR_1, 0);
+#if defined(DRIVER_ADDR_2)
+ IS31FL_common_update_pwm_register(DRIVER_ADDR_2, 1);
+# if defined(DRIVER_ADDR_3)
+ IS31FL_common_update_pwm_register(DRIVER_ADDR_3, 2);
+# if defined(DRIVER_ADDR_4)
+ IS31FL_common_update_pwm_register(DRIVER_ADDR_4, 3);
+# endif
+# endif
+#endif
+}
+
#ifdef RGB_MATRIX_ENABLE
// Colour is set by adjusting PWM register
void IS31FL_RGB_set_color(int index, uint8_t red, uint8_t green, uint8_t blue) {
diff --git a/drivers/led/issi/is31flcommon.h b/drivers/led/issi/is31flcommon.h
index 93533e14de..c380f2a8d6 100644
--- a/drivers/led/issi/is31flcommon.h
+++ b/drivers/led/issi/is31flcommon.h
@@ -67,6 +67,8 @@ void IS31FL_common_init(uint8_t addr, uint8_t ssr);
void IS31FL_common_update_pwm_register(uint8_t addr, uint8_t index);
void IS31FL_common_update_scaling_register(uint8_t addr, uint8_t index);
+void IS31FL_common_flush(void);
+
#ifdef RGB_MATRIX_ENABLE
// RGB Matrix Specific scripts
void IS31FL_RGB_set_color(int index, uint8_t red, uint8_t green, uint8_t blue);
diff --git a/drivers/led/snled27351-simple.c b/drivers/led/snled27351-simple.c
index 499769555c..882fe4e8b4 100644
--- a/drivers/led/snled27351-simple.c
+++ b/drivers/led/snled27351-simple.c
@@ -203,6 +203,19 @@ void snled27351_update_led_control_registers(uint8_t addr, uint8_t index) {
g_led_control_registers_update_required[index] = false;
}
+void snled27351_flush(void) {
+ snled27351_update_pwm_buffers(SNLED27351_I2C_ADDRESS_1, 0);
+#if defined(SNLED27351_I2C_ADDRESS_2)
+ snled27351_update_pwm_buffers(SNLED27351_I2C_ADDRESS_2, 1);
+# if defined(SNLED27351_I2C_ADDRESS_3)
+ snled27351_update_pwm_buffers(SNLED27351_I2C_ADDRESS_3, 2);
+# if defined(SNLED27351_I2C_ADDRESS_4)
+ snled27351_update_pwm_buffers(SNLED27351_I2C_ADDRESS_4, 3);
+# endif
+# endif
+#endif
+}
+
void snled27351_sw_return_normal(uint8_t addr) {
// Select to function page
snled27351_write_register(addr, SNLED27351_REG_CONFIGURE_CMD_PAGE, SNLED27351_FUNCTION_PAGE);
diff --git a/drivers/led/snled27351-simple.h b/drivers/led/snled27351-simple.h
index ff71b44b91..999b70f891 100644
--- a/drivers/led/snled27351-simple.h
+++ b/drivers/led/snled27351-simple.h
@@ -82,6 +82,8 @@ void snled27351_set_led_control_register(uint8_t index, bool value);
void snled27351_update_pwm_buffers(uint8_t addr, uint8_t index);
void snled27351_update_led_control_registers(uint8_t addr, uint8_t index);
+void snled27351_flush(void);
+
void snled27351_sw_return_normal(uint8_t addr);
void snled27351_sw_shutdown(uint8_t addr);
diff --git a/drivers/led/snled27351.c b/drivers/led/snled27351.c
index 1ca691b30f..198b190dac 100644
--- a/drivers/led/snled27351.c
+++ b/drivers/led/snled27351.c
@@ -218,6 +218,19 @@ void snled27351_update_led_control_registers(uint8_t addr, uint8_t index) {
g_led_control_registers_update_required[index] = false;
}
+void snled27351_flush(void) {
+ snled27351_update_pwm_buffers(SNLED27351_I2C_ADDRESS_1, 0);
+#if defined(SNLED27351_I2C_ADDRESS_2)
+ snled27351_update_pwm_buffers(SNLED27351_I2C_ADDRESS_2, 1);
+# if defined(SNLED27351_I2C_ADDRESS_3)
+ snled27351_update_pwm_buffers(SNLED27351_I2C_ADDRESS_3, 2);
+# if defined(SNLED27351_I2C_ADDRESS_4)
+ snled27351_update_pwm_buffers(SNLED27351_I2C_ADDRESS_4, 3);
+# endif
+# endif
+#endif
+}
+
void snled27351_sw_return_normal(uint8_t addr) {
// Select to function page
snled27351_write_register(addr, SNLED27351_REG_CONFIGURE_CMD_PAGE, SNLED27351_FUNCTION_PAGE);
diff --git a/drivers/led/snled27351.h b/drivers/led/snled27351.h
index 67047c8921..59d56855f3 100644
--- a/drivers/led/snled27351.h
+++ b/drivers/led/snled27351.h
@@ -96,6 +96,8 @@ void snled27351_set_led_control_register(uint8_t index, bool red, bool green, bo
void snled27351_update_pwm_buffers(uint8_t addr, uint8_t index);
void snled27351_update_led_control_registers(uint8_t addr, uint8_t index);
+void snled27351_flush(void);
+
void snled27351_sw_return_normal(uint8_t addr);
void snled27351_sw_shutdown(uint8_t addr);
diff --git a/keyboards/aeboards/satellite/rev1/rev1.c b/keyboards/aeboards/satellite/rev1/rev1.c
index 8e4b5f4166..4c6e7d6d7c 100644
--- a/keyboards/aeboards/satellite/rev1/rev1.c
+++ b/keyboards/aeboards/satellite/rev1/rev1.c
@@ -145,8 +145,10 @@ led_config_t g_led_config = { {
// Custom Driver
static void init(void) {
i2c_init();
+
is31fl3731_init(IS31FL3731_I2C_ADDRESS_1);
is31fl3731_init(IS31FL3731_I2C_ADDRESS_2);
+
for (int index = 0; index < ISSI_DRIVER_TOTAL; index++) {
bool enabled = !( ( index == 18+5) || //B5
( index == 36+17) || //C17
@@ -154,29 +156,16 @@ static void init(void) {
);
is31fl3731_set_led_control_register(index, enabled, enabled, enabled);
}
+
is31fl3731_update_led_control_registers(IS31FL3731_I2C_ADDRESS_1, 0);
is31fl3731_update_led_control_registers(IS31FL3731_I2C_ADDRESS_2, 1);
}
-static void flush(void) {
- is31fl3731_update_pwm_buffers(IS31FL3731_I2C_ADDRESS_1, 0);
- is31fl3731_update_pwm_buffers(IS31FL3731_I2C_ADDRESS_2, 1);
-}
-
-static void set_color(int index, uint8_t red, uint8_t green, uint8_t blue) {
- is31fl3731_set_color(index, red, green, blue);
-}
-
-static void set_color_all(uint8_t red, uint8_t green, uint8_t blue) {
- is31fl3731_set_color_all( red, green, blue );
-}
-
-
const rgb_matrix_driver_t rgb_matrix_driver = {
.init = init,
- .flush = flush,
- .set_color = set_color,
- .set_color_all = set_color_all
+ .flush = is31fl3731_flush,
+ .set_color = is31fl3731_set_color,
+ .set_color_all = is31fl3731_set_color_all
};
#endif
diff --git a/keyboards/fallacy/indicators.c b/keyboards/fallacy/indicators.c
index ae4f796ecc..a8630d2e11 100755
--- a/keyboards/fallacy/indicators.c
+++ b/keyboards/fallacy/indicators.c
@@ -36,7 +36,7 @@ void init_fallacy_leds(void) {
/* update the buffer
*/
void update_fallacy_leds(void) {
- is31fl3731_update_pwm_buffers(IS31FL3731_I2C_ADDRESS_1, 0);
+ is31fl3731_flush();
}
diff --git a/keyboards/hs60/v2/ansi/config.h b/keyboards/hs60/v2/ansi/config.h
index 8b31f0e066..3600b30feb 100644
--- a/keyboards/hs60/v2/ansi/config.h
+++ b/keyboards/hs60/v2/ansi/config.h
@@ -53,7 +53,8 @@ along with this program. If not, see .
#define RGB_BACKLIGHT_COLOR_1 { .h = 0, .s = 255 }
#define RGB_BACKLIGHT_COLOR_2 { .h = 127, .s = 255 }
-#define IS31FL3733_DRIVER_COUNT 2
+#define IS31FL3733_I2C_ADDRESS_1 IS31FL3733_I2C_ADDRESS_GND_GND
+#define IS31FL3733_DRIVER_COUNT 1
#define RGB_MATRIX_LED_COUNT 64
// These define which keys in the matrix are alphas/mods
diff --git a/keyboards/hs60/v2/hhkb/config.h b/keyboards/hs60/v2/hhkb/config.h
index 7494b2e66c..bdc27435cf 100644
--- a/keyboards/hs60/v2/hhkb/config.h
+++ b/keyboards/hs60/v2/hhkb/config.h
@@ -53,7 +53,8 @@ along with this program. If not, see .
#define RGB_BACKLIGHT_COLOR_1 { .h = 0, .s = 255 }
#define RGB_BACKLIGHT_COLOR_2 { .h = 127, .s = 255 }
-#define IS31FL3733_DRIVER_COUNT 2
+#define IS31FL3733_I2C_ADDRESS_1 IS31FL3733_I2C_ADDRESS_GND_GND
+#define IS31FL3733_DRIVER_COUNT 1
#define RGB_MATRIX_LED_COUNT 64
// These define which keys in the matrix are alphas/mods
diff --git a/keyboards/hs60/v2/iso/config.h b/keyboards/hs60/v2/iso/config.h
index 22608404b5..9a9a4ed623 100644
--- a/keyboards/hs60/v2/iso/config.h
+++ b/keyboards/hs60/v2/iso/config.h
@@ -50,7 +50,8 @@ along with this program. If not, see .
#define RGB_BACKLIGHT_COLOR_1 { .h = 0, .s = 255 }
#define RGB_BACKLIGHT_COLOR_2 { .h = 127, .s = 255 }
-#define IS31FL3733_DRIVER_COUNT 2
+#define IS31FL3733_I2C_ADDRESS_1 IS31FL3733_I2C_ADDRESS_GND_GND
+#define IS31FL3733_DRIVER_COUNT 1
#define RGB_MATRIX_LED_COUNT 64
// These define which keys in the matrix are alphas/mods
diff --git a/keyboards/inland/v83p/config.h b/keyboards/inland/v83p/config.h
index c433b568dd..1cd93e2033 100644
--- a/keyboards/inland/v83p/config.h
+++ b/keyboards/inland/v83p/config.h
@@ -9,9 +9,9 @@
{ C11 }
/* I2C Config for LED Driver */
-#define DRIVER_COUNT 2
-#define DRIVER_ADDR_1 0b1110100
-#define DRIVER_ADDR_2 0b1110111
+#define SNLED27351_DRIVER_COUNT 2
+#define SNLED27351_I2C_ADDRESS_1 SNLED27351_I2C_ADDRESS_GND
+#define SNLED27351_I2C_ADDRESS_2 SNLED27351_I2C_ADDRESS_VDDIO
#define I2C1_SDA_PIN B7
#define I2C1_SCL_PIN B6
#define I2C1_SCL_PAL_MODE 4
diff --git a/keyboards/inland/v83p/info.json b/keyboards/inland/v83p/info.json
index d7a418bccf..f738af3ef7 100644
--- a/keyboards/inland/v83p/info.json
+++ b/keyboards/inland/v83p/info.json
@@ -33,7 +33,7 @@
]
},
"rgb_matrix": {
- "driver": "ckled2001",
+ "driver": "snled27351",
"max_brightness": 180,
"animations": {
"solid_color": true,
diff --git a/keyboards/inland/v83p/v83p.c b/keyboards/inland/v83p/v83p.c
index 26ab62784a..3cb9c06cb0 100644
--- a/keyboards/inland/v83p/v83p.c
+++ b/keyboards/inland/v83p/v83p.c
@@ -5,7 +5,7 @@
// clang-format off
#ifdef RGB_MATRIX_ENABLE
-const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = {
+const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = {
/* Refer to IS31 manual for these locations
* driver
* | R location
diff --git a/keyboards/input_club/k_type/is31fl3733-dual.c b/keyboards/input_club/k_type/is31fl3733-dual.c
index ea523eea1f..54e9d76960 100644
--- a/keyboards/input_club/k_type/is31fl3733-dual.c
+++ b/keyboards/input_club/k_type/is31fl3733-dual.c
@@ -248,3 +248,10 @@ void is31fl3733_update_led_control_registers(uint8_t addr, uint8_t index) {
}
g_led_control_registers_update_required[index] = false;
}
+
+void is31fl3733_flush(void) {
+ is31fl3733_update_pwm_buffers(IS31FL3733_I2C_ADDRESS_1, 0);
+# ifdef USE_I2C2
+ is31fl3733_update_pwm_buffers(IS31FL3733_I2C_ADDRESS_2, 1);
+# endif
+}
diff --git a/keyboards/input_club/k_type/is31fl3733-dual.h b/keyboards/input_club/k_type/is31fl3733-dual.h
index 7a43bc49f4..33943af320 100644
--- a/keyboards/input_club/k_type/is31fl3733-dual.h
+++ b/keyboards/input_club/k_type/is31fl3733-dual.h
@@ -64,6 +64,8 @@ void is31fl3733_set_led_control_register(uint8_t index, bool red, bool green, bo
void is31fl3733_update_pwm_buffers(uint8_t addr, uint8_t index); // index is the driver index
void is31fl3733_update_led_control_registers(uint8_t addr, uint8_t index);
+void is31fl3733_flush(void);
+
#define IS31FL3733_PUR_0R 0x00 // No PUR resistor
#define IS31FL3733_PUR_05KR 0x02 // 0.5k Ohm resistor in t_NOL
#define IS31FL3733_PUR_3KR 0x03 // 3.0k Ohm resistor on all the time
diff --git a/keyboards/input_club/k_type/k_type-rgbdriver.c b/keyboards/input_club/k_type/k_type-rgbdriver.c
index be16179ce2..1e8132e6dc 100644
--- a/keyboards/input_club/k_type/k_type-rgbdriver.c
+++ b/keyboards/input_club/k_type/k_type-rgbdriver.c
@@ -38,16 +38,9 @@ static void init(void) {
# endif
}
-static void flush(void) {
- is31fl3733_update_pwm_buffers(IS31FL3733_I2C_ADDRESS_1, 0);
-# ifdef USE_I2C2
- is31fl3733_update_pwm_buffers(IS31FL3733_I2C_ADDRESS_2, 1);
-# endif
-}
-
const rgb_matrix_driver_t rgb_matrix_driver = {
.init = init,
- .flush = flush,
+ .flush = is31fl3733_flush,
.set_color = is31fl3733_set_color,
.set_color_all = is31fl3733_set_color_all,
};
diff --git a/keyboards/keebwerk/mega/ansi/config.h b/keyboards/keebwerk/mega/ansi/config.h
index a9734683f4..ee98c95636 100755
--- a/keyboards/keebwerk/mega/ansi/config.h
+++ b/keyboards/keebwerk/mega/ansi/config.h
@@ -50,6 +50,8 @@ along with this program. If not, see .
#define RGB_BACKLIGHT_COLOR_1 { .h = 0, .s = 255 }
#define RGB_BACKLIGHT_COLOR_2 { .h = 127, .s = 255 }
+#define IS31FL3733_I2C_ADDRESS_1 IS31FL3733_I2C_ADDRESS_GND_GND
+#define IS31FL3733_I2C_ADDRESS_2 IS31FL3733_I2C_ADDRESS_GND_SDA
#define IS31FL3733_DRIVER_COUNT 2
#define RGB_MATRIX_LED_COUNT 128
diff --git a/keyboards/keebwerk/mega/ansi/keymaps/jesusvallejo/keymap.c b/keyboards/keebwerk/mega/ansi/keymaps/jesusvallejo/keymap.c
index 2b5d658f02..307eac90e1 100644
--- a/keyboards/keebwerk/mega/ansi/keymaps/jesusvallejo/keymap.c
+++ b/keyboards/keebwerk/mega/ansi/keymaps/jesusvallejo/keymap.c
@@ -14,7 +14,7 @@
* along with this program. If not, see .
*/
#include QMK_KEYBOARD_H
-#include "drivers/issi/is31fl3733.h"
+#include "drivers/led/issi/is31fl3733.h"
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
@@ -50,9 +50,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
static uint16_t ledTimer;
-uint8_t R = 0; /* First led*/
-uint8_t G = 0; /* Second led*/
-uint8_t B = 0; /* Third led*/
+uint8_t r = 0; /* First led*/
+uint8_t g = 0; /* Second led*/
+uint8_t b = 0; /* Third led*/
/* Boot animation parameters */
@@ -74,44 +74,44 @@ bool bootAnimation(void){
if (bootFirst>0 || bootSec>0){
if(bootFirst!=0){
if (timer_elapsed(ledTimer) > 150){
- G = 255;
- R = 0;
- B = 0;
- is31fl3733_set_color( 6+64-1, R, G, B );
+ g = 255;
+ r = 0;
+ b = 0;
+ is31fl3733_set_color( 6+64-1, r, g, b );
}
if (timer_elapsed(ledTimer) > 300){
- G = 255;
- R = 255;
- B = 0;
- is31fl3733_set_color( 6+64-1, R, G, B );
+ g = 255;
+ r = 255;
+ b = 0;
+ is31fl3733_set_color( 6+64-1, r, g, b );
}
if (timer_elapsed(ledTimer) > 400){
- G = 255;
- R = 255;
- B = 255;
- is31fl3733_set_color( 6+64-1, R, G, B );
+ g = 255;
+ r = 255;
+ b = 255;
+ is31fl3733_set_color( 6+64-1, r, g, b );
}
if (timer_elapsed(ledTimer) > 500){
- G = 0;
- R = 0;
- B = 0;
- is31fl3733_set_color( 6+64-1, R, G, B );
+ g = 0;
+ r = 0;
+ b = 0;
+ is31fl3733_set_color( 6+64-1, r, g, b );
ledTimer = timer_read();
bootFirst--;
}
}
if (bootFirst==0 && bootSec!=0){
if (timer_elapsed(ledTimer) > 200) {
- G = 255;
- R = 255;
- B = 255;
- is31fl3733_set_color( 6+64-1, R, G, B );
+ g = 255;
+ r = 255;
+ b = 255;
+ is31fl3733_set_color( 6+64-1, r, g, b );
}
if (timer_elapsed(ledTimer) > 400){
- G = 0;
- R = 0;
- B = 0;
- is31fl3733_set_color( 6+64-1, R, G, B );
+ g = 0;
+ r = 0;
+ b = 0;
+ is31fl3733_set_color( 6+64-1, r, g, b );
ledTimer = timer_read();
bootSec--;
}
@@ -125,29 +125,29 @@ bool bootAnimation(void){
void breathing(void) {
if(timer_elapsed(ledTimer) fadeTime && R fadeTime && r fadeTime && R>minBrightness){
- G-=fadeStep;
- R-=fadeStep;
- B-=fadeStep;
- is31fl3733_set_color( 6+64-1, R, G, B );
+ if((time - previousTime) > fadeTime && r>minBrightness){
+ g-=fadeStep;
+ r-=fadeStep;
+ b-=fadeStep;
+ is31fl3733_set_color( 6+64-1, r, g, b );
previousTime = time;
}
}
else {
- R=0;
- G=0;
- B=0;
- is31fl3733_set_color( 6+64-1, R, G, B );
+ r=0;
+ g=0;
+ b=0;
+ is31fl3733_set_color( 6+64-1, r, g, b );
previousTime = 0;
time = 0;
ledTimer=timer_read();
@@ -166,10 +166,10 @@ void matrix_scan_user(void){
prevCapsState = capsState;
}
else if(!capsState && capsState != prevCapsState){
- G = 0;
- R = 0;
- B = 0;
- is31fl3733_set_color( 6+64-1, R, G, B );
+ g = 0;
+ r = 0;
+ b = 0;
+ is31fl3733_set_color( 6+64-1, r, g, b );
prevCapsState = capsState;
}
}
diff --git a/keyboards/matrix/m20add/rgb_ring.c b/keyboards/matrix/m20add/rgb_ring.c
index c56ee931ee..553a3d5360 100644
--- a/keyboards/matrix/m20add/rgb_ring.c
+++ b/keyboards/matrix/m20add/rgb_ring.c
@@ -396,7 +396,7 @@ void rgb_ring_task(void)
break;
};
- is31fl3731_update_pwm_buffers(IS31FL3731_I2C_ADDRESS_1, 0);
+ is31fl3731_flush();
}
bool process_record_kb(uint16_t keycode, keyrecord_t *record)
diff --git a/keyboards/monsgeek/m3/config.h b/keyboards/monsgeek/m3/config.h
index 85eb5b8e99..93ffa1f07c 100644
--- a/keyboards/monsgeek/m3/config.h
+++ b/keyboards/monsgeek/m3/config.h
@@ -36,9 +36,9 @@
#define WEAR_LEVELING_BACKING_SIZE (8 * 1024)
/* I2C Config for LED Driver */
-#define DRIVER_COUNT 2
-#define DRIVER_ADDR_1 0b1110100
-#define DRIVER_ADDR_2 0b1110111
+#define SNLED27351_DRIVER_COUNT 2
+#define SNLED27351_I2C_ADDRESS_1 SNLED27351_I2C_ADDRESS_GND
+#define SNLED27351_I2C_ADDRESS_2 SNLED27351_I2C_ADDRESS_VDDIO
#define I2C1_OPMODE OPMODE_I2C
#define I2C1_CLOCK_SPEED 400000 /* 400000 */
diff --git a/keyboards/monsgeek/m3/info.json b/keyboards/monsgeek/m3/info.json
index db646103f1..a93b0d47dc 100644
--- a/keyboards/monsgeek/m3/info.json
+++ b/keyboards/monsgeek/m3/info.json
@@ -31,7 +31,7 @@
"caps_lock": "A15"
},
"rgb_matrix": {
- "driver": "ckled2001",
+ "driver": "snled27351",
"max_brightness": 160,
"animations": {
"breathing": true,
diff --git a/keyboards/monsgeek/m3/m3.c b/keyboards/monsgeek/m3/m3.c
index 95bfb34789..b7e197e6ac 100644
--- a/keyboards/monsgeek/m3/m3.c
+++ b/keyboards/monsgeek/m3/m3.c
@@ -17,7 +17,7 @@
#include "quantum.h"
// clang-format off
#ifdef RGB_MATRIX_ENABLE
-const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = {
+const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = {
/* Refer to IS31 manual for these locations
* driver
* | R location
diff --git a/keyboards/neson_design/700e/700e.c b/keyboards/neson_design/700e/700e.c
index 395ae4759a..d4aa336edb 100644
--- a/keyboards/neson_design/700e/700e.c
+++ b/keyboards/neson_design/700e/700e.c
@@ -341,10 +341,7 @@ void housekeeping_task_kb(void)
}
}
- is31fl3731_update_pwm_buffers(IS31FL3731_I2C_ADDRESS_1, 0);
-#ifdef IS31FL3731_I2C_ADDRESS_2
- is31fl3731_update_pwm_buffers(IS31FL3731_I2C_ADDRESS_2, 1);
-#endif
+ is31fl3731_flush();
housekeeping_task_user();
}
diff --git a/keyboards/neson_design/n6/n6.c b/keyboards/neson_design/n6/n6.c
index e6531bc2c4..5f3ae3a169 100644
--- a/keyboards/neson_design/n6/n6.c
+++ b/keyboards/neson_design/n6/n6.c
@@ -343,10 +343,7 @@ void housekeeping_task_kb(void)
}
}
- is31fl3731_update_pwm_buffers(IS31FL3731_I2C_ADDRESS_1, 0);
-#ifdef IS31FL3731_I2C_ADDRESS_2
- is31fl3731_update_pwm_buffers(IS31FL3731_I2C_ADDRESS_2, 1);
-#endif
+ is31fl3731_flush();
housekeeping_task_user();
}
diff --git a/keyboards/novelkeys/nk65/config.h b/keyboards/novelkeys/nk65/config.h
index 80327af491..4dc1ab9165 100755
--- a/keyboards/novelkeys/nk65/config.h
+++ b/keyboards/novelkeys/nk65/config.h
@@ -50,6 +50,8 @@ along with this program. If not, see .
#define RGB_BACKLIGHT_COLOR_1 { .h = 0, .s = 255 }
#define RGB_BACKLIGHT_COLOR_2 { .h = 127, .s = 255 }
+#define IS31FL3733_I2C_ADDRESS_1 IS31FL3733_I2C_ADDRESS_GND_GND
+#define IS31FL3733_I2C_ADDRESS_2 IS31FL3733_I2C_ADDRESS_GND_SDA
#define IS31FL3733_DRIVER_COUNT 2
#define RGB_MATRIX_LED_COUNT 128
diff --git a/keyboards/novelkeys/nk87/config.h b/keyboards/novelkeys/nk87/config.h
index d2949ef6d3..3b3e9309c1 100755
--- a/keyboards/novelkeys/nk87/config.h
+++ b/keyboards/novelkeys/nk87/config.h
@@ -50,6 +50,8 @@ along with this program. If not, see .
#define RGB_BACKLIGHT_COLOR_1 { .h = 0, .s = 255 }
#define RGB_BACKLIGHT_COLOR_2 { .h = 127, .s = 255 }
+#define IS31FL3733_I2C_ADDRESS_1 IS31FL3733_I2C_ADDRESS_GND_GND
+#define IS31FL3733_I2C_ADDRESS_2 IS31FL3733_I2C_ADDRESS_GND_SDA
#define IS31FL3733_DRIVER_COUNT 2
#define RGB_MATRIX_LED_COUNT 128
diff --git a/keyboards/spaceholdings/nebula12/config.h b/keyboards/spaceholdings/nebula12/config.h
index d6e8f0e196..5e4b48927f 100755
--- a/keyboards/spaceholdings/nebula12/config.h
+++ b/keyboards/spaceholdings/nebula12/config.h
@@ -73,6 +73,7 @@ along with this program. If not, see .
#define RGB_BACKLIGHT_COLOR_1 { .h = 0, .s = 255 }
#define RGB_BACKLIGHT_COLOR_2 { .h = 127, .s = 255 }
+#define IS31FL3731_I2C_ADDRESS_1 IS31FL3731_I2C_ADDRESS_GND
#define IS31FL3731_DRIVER_COUNT 1
#define RGB_MATRIX_LED_COUNT 16
diff --git a/keyboards/spaceholdings/nebula68/config.h b/keyboards/spaceholdings/nebula68/config.h
index f6df627592..0283a4a036 100755
--- a/keyboards/spaceholdings/nebula68/config.h
+++ b/keyboards/spaceholdings/nebula68/config.h
@@ -56,6 +56,8 @@ along with this program. If not, see .
#define RGB_BACKLIGHT_COLOR_1 { .h = 0, .s = 255 }
#define RGB_BACKLIGHT_COLOR_2 { .h = 127, .s = 255 }
+#define IS31FL3733_I2C_ADDRESS_1 IS31FL3733_I2C_ADDRESS_GND_GND
+#define IS31FL3733_I2C_ADDRESS_2 IS31FL3733_I2C_ADDRESS_GND_SDA
#define IS31FL3733_DRIVER_COUNT 2
#define RGB_MATRIX_LED_COUNT 128
diff --git a/keyboards/tkc/portico/config.h b/keyboards/tkc/portico/config.h
index 9a8e19171f..5599f2a36b 100644
--- a/keyboards/tkc/portico/config.h
+++ b/keyboards/tkc/portico/config.h
@@ -48,6 +48,8 @@ along with this program. If not, see .
#else
// IS31FL3731 driver
+#define IS31FL3731_I2C_ADDRESS_1 IS31FL3731_I2C_ADDRESS_GND
+#define IS31FL3731_I2C_ADDRESS_2 IS31FL3731_I2C_ADDRESS_VCC
#define IS31FL3731_DRIVER_COUNT 2
#define RGB_MATRIX_LED_COUNT 67
diff --git a/keyboards/tkc/portico75/config.h b/keyboards/tkc/portico75/config.h
index d5b401704b..756dfbb54a 100644
--- a/keyboards/tkc/portico75/config.h
+++ b/keyboards/tkc/portico75/config.h
@@ -79,6 +79,7 @@ along with this program. If not, see .
# define DRIVER_INDICATOR_LED_TOTAL 0
#else
// WT_RGB IS31FL3741 driver code
+# define IS31FL3741_I2C_ADDRESS_1 IS31FL3741_I2C_ADDRESS_GND
# define IS31FL3741_DRIVER_COUNT 1
# define RGB_MATRIX_LED_COUNT 98
diff --git a/keyboards/wilba_tech/rama_works_kara/config.h b/keyboards/wilba_tech/rama_works_kara/config.h
index b3fa3808ec..5d8c9df820 100644
--- a/keyboards/wilba_tech/rama_works_kara/config.h
+++ b/keyboards/wilba_tech/rama_works_kara/config.h
@@ -16,6 +16,8 @@
#pragma once
// IS31FL3731 driver
+#define IS31FL3731_I2C_ADDRESS_1 IS31FL3731_I2C_ADDRESS_GND
+#define IS31FL3731_I2C_ADDRESS_2 IS31FL3731_I2C_ADDRESS_SDA
#define IS31FL3731_DRIVER_COUNT 2
#define RGB_MATRIX_LED_COUNT 72
diff --git a/keyboards/wilba_tech/rama_works_koyu/config.h b/keyboards/wilba_tech/rama_works_koyu/config.h
index 85bbf28051..aad4cd12ac 100644
--- a/keyboards/wilba_tech/rama_works_koyu/config.h
+++ b/keyboards/wilba_tech/rama_works_koyu/config.h
@@ -16,6 +16,8 @@
#pragma once
// IS31FL3731 driver
+#define IS31FL3731_I2C_ADDRESS_1 IS31FL3731_I2C_ADDRESS_GND
+#define IS31FL3731_I2C_ADDRESS_2 IS31FL3731_I2C_ADDRESS_SDA
#define IS31FL3731_DRIVER_COUNT 2
#define RGB_MATRIX_LED_COUNT 72
diff --git a/keyboards/wilba_tech/rama_works_m10_c/config.h b/keyboards/wilba_tech/rama_works_m10_c/config.h
index b3cb0ef7a8..529896f6ed 100644
--- a/keyboards/wilba_tech/rama_works_m10_c/config.h
+++ b/keyboards/wilba_tech/rama_works_m10_c/config.h
@@ -21,6 +21,7 @@
#define LOCKING_RESYNC_ENABLE
// IS31FL3731 driver
+#define IS31FL3731_I2C_ADDRESS_1 IS31FL3731_I2C_ADDRESS_GND
#define IS31FL3731_DRIVER_COUNT 1
#define RGB_MATRIX_LED_COUNT 12
diff --git a/keyboards/wilba_tech/rama_works_m50_a/config.h b/keyboards/wilba_tech/rama_works_m50_a/config.h
index 16439309be..599550b91f 100644
--- a/keyboards/wilba_tech/rama_works_m50_a/config.h
+++ b/keyboards/wilba_tech/rama_works_m50_a/config.h
@@ -21,6 +21,8 @@
#define LOCKING_RESYNC_ENABLE
// IS31FL3731 driver
+#define IS31FL3731_I2C_ADDRESS_1 IS31FL3731_I2C_ADDRESS_GND
+#define IS31FL3731_I2C_ADDRESS_2 IS31FL3731_I2C_ADDRESS_SDA
#define IS31FL3731_DRIVER_COUNT 2
#define RGB_MATRIX_LED_COUNT 72
diff --git a/keyboards/wilba_tech/rama_works_m60_a/config.h b/keyboards/wilba_tech/rama_works_m60_a/config.h
index 7cec5dcc21..bc7d7e6128 100644
--- a/keyboards/wilba_tech/rama_works_m60_a/config.h
+++ b/keyboards/wilba_tech/rama_works_m60_a/config.h
@@ -16,6 +16,8 @@
#pragma once
// IS31FL3731 driver
+#define IS31FL3731_I2C_ADDRESS_1 IS31FL3731_I2C_ADDRESS_GND
+#define IS31FL3731_I2C_ADDRESS_2 IS31FL3731_I2C_ADDRESS_SDA
#define IS31FL3731_DRIVER_COUNT 2
#define RGB_MATRIX_LED_COUNT 72
diff --git a/keyboards/wilba_tech/rama_works_m65_b/config.h b/keyboards/wilba_tech/rama_works_m65_b/config.h
index 88f8341aa6..b3e381d77d 100644
--- a/keyboards/wilba_tech/rama_works_m65_b/config.h
+++ b/keyboards/wilba_tech/rama_works_m65_b/config.h
@@ -21,6 +21,8 @@
#define LOCKING_RESYNC_ENABLE
// IS31FL3731 driver
+#define IS31FL3731_I2C_ADDRESS_1 IS31FL3731_I2C_ADDRESS_GND
+#define IS31FL3731_I2C_ADDRESS_2 IS31FL3731_I2C_ADDRESS_SDA
#define IS31FL3731_DRIVER_COUNT 2
#define RGB_MATRIX_LED_COUNT 72
diff --git a/keyboards/wilba_tech/rama_works_m65_bx/config.h b/keyboards/wilba_tech/rama_works_m65_bx/config.h
index be3af2f668..8070e917d7 100644
--- a/keyboards/wilba_tech/rama_works_m65_bx/config.h
+++ b/keyboards/wilba_tech/rama_works_m65_bx/config.h
@@ -21,6 +21,8 @@
#define LOCKING_RESYNC_ENABLE
// IS31FL3731 driver
+#define IS31FL3731_I2C_ADDRESS_1 IS31FL3731_I2C_ADDRESS_GND
+#define IS31FL3731_I2C_ADDRESS_2 IS31FL3731_I2C_ADDRESS_SDA
#define IS31FL3731_DRIVER_COUNT 2
#define RGB_MATRIX_LED_COUNT 72
diff --git a/keyboards/wilba_tech/rama_works_u80_a/config.h b/keyboards/wilba_tech/rama_works_u80_a/config.h
index 0d8e1e12b5..4ab2d53c3c 100644
--- a/keyboards/wilba_tech/rama_works_u80_a/config.h
+++ b/keyboards/wilba_tech/rama_works_u80_a/config.h
@@ -38,6 +38,9 @@
//#define NO_ACTION_ONESHOT
// IS31FL3731 driver
+#define IS31FL3731_I2C_ADDRESS_1 IS31FL3731_I2C_ADDRESS_GND
+#define IS31FL3731_I2C_ADDRESS_2 IS31FL3731_I2C_ADDRESS_SDA
+#define IS31FL3731_I2C_ADDRESS_3 IS31FL3731_I2C_ADDRESS_SCL
#define IS31FL3731_DRIVER_COUNT 3
#define RGB_MATRIX_LED_COUNT 108
diff --git a/keyboards/wilba_tech/wt60_b/config.h b/keyboards/wilba_tech/wt60_b/config.h
index c5818173ca..c5fb1b32c7 100644
--- a/keyboards/wilba_tech/wt60_b/config.h
+++ b/keyboards/wilba_tech/wt60_b/config.h
@@ -23,6 +23,8 @@
// IS31FL3731 driver
+#define IS31FL3731_I2C_ADDRESS_1 IS31FL3731_I2C_ADDRESS_GND
+#define IS31FL3731_I2C_ADDRESS_2 IS31FL3731_I2C_ADDRESS_SDA
#define IS31FL3731_DRIVER_COUNT 2
#define RGB_MATRIX_LED_COUNT 72
diff --git a/keyboards/wilba_tech/wt60_bx/config.h b/keyboards/wilba_tech/wt60_bx/config.h
index 37ffe646bc..f87d9ff48e 100644
--- a/keyboards/wilba_tech/wt60_bx/config.h
+++ b/keyboards/wilba_tech/wt60_bx/config.h
@@ -23,6 +23,8 @@
// IS31FL3731 driver
+#define IS31FL3731_I2C_ADDRESS_1 IS31FL3731_I2C_ADDRESS_GND
+#define IS31FL3731_I2C_ADDRESS_2 IS31FL3731_I2C_ADDRESS_SDA
#define IS31FL3731_DRIVER_COUNT 2
#define RGB_MATRIX_LED_COUNT 72
diff --git a/keyboards/wilba_tech/wt60_c/config.h b/keyboards/wilba_tech/wt60_c/config.h
index 80f894e451..4a1b8b6ad2 100644
--- a/keyboards/wilba_tech/wt60_c/config.h
+++ b/keyboards/wilba_tech/wt60_c/config.h
@@ -23,6 +23,8 @@
// IS31FL3731 driver
+#define IS31FL3731_I2C_ADDRESS_1 IS31FL3731_I2C_ADDRESS_GND
+#define IS31FL3731_I2C_ADDRESS_2 IS31FL3731_I2C_ADDRESS_SDA
#define IS31FL3731_DRIVER_COUNT 2
#define RGB_MATRIX_LED_COUNT 72
diff --git a/keyboards/wilba_tech/wt_mono_backlight.c b/keyboards/wilba_tech/wt_mono_backlight.c
index acb2c3aec7..4add18b14e 100644
--- a/keyboards/wilba_tech/wt_mono_backlight.c
+++ b/keyboards/wilba_tech/wt_mono_backlight.c
@@ -469,7 +469,7 @@ void backlight_config_save(void)
void backlight_update_pwm_buffers(void)
{
- is31fl3736_update_pwm_buffers(IS31FL3736_I2C_ADDRESS_1, 0);
+ is31fl3736_flush();
}
bool process_record_backlight(uint16_t keycode, keyrecord_t *record)
diff --git a/keyboards/wilba_tech/zeal60/config.h b/keyboards/wilba_tech/zeal60/config.h
index 31ee2942ce..3233c6187d 100644
--- a/keyboards/wilba_tech/zeal60/config.h
+++ b/keyboards/wilba_tech/zeal60/config.h
@@ -16,6 +16,8 @@
#pragma once
// IS31FL3731 driver
+#define IS31FL3731_I2C_ADDRESS_1 IS31FL3731_I2C_ADDRESS_GND
+#define IS31FL3731_I2C_ADDRESS_2 IS31FL3731_I2C_ADDRESS_SDA
#define IS31FL3731_DRIVER_COUNT 2
#define RGB_MATRIX_LED_COUNT 72
diff --git a/keyboards/wilba_tech/zeal65/config.h b/keyboards/wilba_tech/zeal65/config.h
index 7370931df1..1046ee8108 100644
--- a/keyboards/wilba_tech/zeal65/config.h
+++ b/keyboards/wilba_tech/zeal65/config.h
@@ -16,6 +16,8 @@
#pragma once
// IS31FL3731 driver
+#define IS31FL3731_I2C_ADDRESS_1 IS31FL3731_I2C_ADDRESS_GND
+#define IS31FL3731_I2C_ADDRESS_2 IS31FL3731_I2C_ADDRESS_SDA
#define IS31FL3731_DRIVER_COUNT 2
#define RGB_MATRIX_LED_COUNT 72
diff --git a/keyboards/xelus/dawn60/rev1/config.h b/keyboards/xelus/dawn60/rev1/config.h
index b895890388..c7945df3d6 100644
--- a/keyboards/xelus/dawn60/rev1/config.h
+++ b/keyboards/xelus/dawn60/rev1/config.h
@@ -16,6 +16,8 @@
#pragma once
// IS31FL3731 driver
+#define IS31FL3731_I2C_ADDRESS_1 IS31FL3731_I2C_ADDRESS_GND
+#define IS31FL3731_I2C_ADDRESS_2 IS31FL3731_I2C_ADDRESS_SDA
#define IS31FL3731_DRIVER_COUNT 2
#define RGB_MATRIX_LED_COUNT 64
diff --git a/keyboards/xelus/pachi/rgb/rev1/rev1.c b/keyboards/xelus/pachi/rgb/rev1/rev1.c
index b54b2a0a1d..1a3d9b2f4d 100644
--- a/keyboards/xelus/pachi/rgb/rev1/rev1.c
+++ b/keyboards/xelus/pachi/rgb/rev1/rev1.c
@@ -226,13 +226,9 @@ static void init(void) {
is31fl3741_update_led_control_registers(IS31FL3741_I2C_ADDRESS_1, 0);
}
-static void flush(void) {
- is31fl3741_update_pwm_buffers(IS31FL3741_I2C_ADDRESS_1, 0);
-}
-
const rgb_matrix_driver_t rgb_matrix_driver = {
.init = init,
- .flush = flush,
+ .flush = is31fl3741_flush,
.set_color = is31fl3741_set_color,
.set_color_all = is31fl3741_set_color_all
};
diff --git a/keyboards/xelus/pachi/rgb/rev2/rev2.c b/keyboards/xelus/pachi/rgb/rev2/rev2.c
index 744e7838b1..729b6b0545 100644
--- a/keyboards/xelus/pachi/rgb/rev2/rev2.c
+++ b/keyboards/xelus/pachi/rgb/rev2/rev2.c
@@ -232,13 +232,9 @@ static void init(void) {
is31fl3741_update_led_control_registers(IS31FL3741_I2C_ADDRESS_1, 0);
}
-static void flush(void) {
- is31fl3741_update_pwm_buffers(IS31FL3741_I2C_ADDRESS_1, 0);
-}
-
const rgb_matrix_driver_t rgb_matrix_driver = {
.init = init,
- .flush = flush,
+ .flush = is31fl3741_flush,
.set_color = is31fl3741_set_color,
.set_color_all = is31fl3741_set_color_all
};
diff --git a/quantum/led_matrix/led_matrix_drivers.c b/quantum/led_matrix/led_matrix_drivers.c
index 42594d2e16..ab8da3353a 100644
--- a/quantum/led_matrix/led_matrix_drivers.c
+++ b/quantum/led_matrix/led_matrix_drivers.c
@@ -249,159 +249,64 @@ static void init(void) {
}
# if defined(LED_MATRIX_IS31FL3218)
-static void flush(void) {
- is31fl3218_update_pwm_buffers();
-}
-
const led_matrix_driver_t led_matrix_driver = {
.init = init,
- .flush = flush,
+ .flush = is31fl3218_update_pwm_buffers,
.set_value = is31fl3218_set_value,
.set_value_all = is31fl3218_set_value_all,
};
# elif defined(LED_MATRIX_IS31FL3731)
-static void flush(void) {
- is31fl3731_update_pwm_buffers(IS31FL3731_I2C_ADDRESS_1, 0);
-# if defined(IS31FL3731_I2C_ADDRESS_2)
- is31fl3731_update_pwm_buffers(IS31FL3731_I2C_ADDRESS_2, 1);
-# if defined(IS31FL3731_I2C_ADDRESS_3)
- is31fl3731_update_pwm_buffers(IS31FL3731_I2C_ADDRESS_3, 2);
-# if defined(IS31FL3731_I2C_ADDRESS_4)
- is31fl3731_update_pwm_buffers(IS31FL3731_I2C_ADDRESS_4, 3);
-# endif
-# endif
-# endif
-}
-
const led_matrix_driver_t led_matrix_driver = {
.init = init,
- .flush = flush,
+ .flush = is31fl3731_flush,
.set_value = is31fl3731_set_value,
.set_value_all = is31fl3731_set_value_all,
};
# elif defined(LED_MATRIX_IS31FL3733)
-static void flush(void) {
- is31fl3733_update_pwm_buffers(IS31FL3733_I2C_ADDRESS_1, 0);
-# if defined(IS31FL3733_I2C_ADDRESS_2)
- is31fl3733_update_pwm_buffers(IS31FL3733_I2C_ADDRESS_2, 1);
-# if defined(IS31FL3733_I2C_ADDRESS_3)
- is31fl3733_update_pwm_buffers(IS31FL3733_I2C_ADDRESS_3, 2);
-# if defined(IS31FL3733_I2C_ADDRESS_4)
- is31fl3733_update_pwm_buffers(IS31FL3733_I2C_ADDRESS_4, 3);
-# endif
-# endif
-# endif
-}
-
const led_matrix_driver_t led_matrix_driver = {
.init = init,
- .flush = flush,
+ .flush = is31fl3733_flush,
.set_value = is31fl3733_set_value,
.set_value_all = is31fl3733_set_value_all,
};
# elif defined(LED_MATRIX_IS31FL3736)
-static void flush(void) {
- is31fl3736_update_pwm_buffers(IS31FL3736_I2C_ADDRESS_1, 0);
-# if defined(IS31FL3736_I2C_ADDRESS_2)
- is31fl3736_update_pwm_buffers(IS31FL3736_I2C_ADDRESS_2, 1);
-# if defined(IS31FL3736_I2C_ADDRESS_3)
- is31fl3736_update_pwm_buffers(IS31FL3736_I2C_ADDRESS_3, 2);
-# if defined(IS31FL3736_I2C_ADDRESS_4)
- is31fl3736_update_pwm_buffers(IS31FL3736_I2C_ADDRESS_4, 3);
-# endif
-# endif
-# endif
-}
-
const led_matrix_driver_t led_matrix_driver = {
.init = init,
- .flush = flush,
+ .flush = is31fl3736_flush,
.set_value = is31fl3736_set_value,
.set_value_all = is31fl3736_set_value_all,
};
# elif defined(LED_MATRIX_IS31FL3737)
-static void flush(void) {
- is31fl3737_update_pwm_buffers(IS31FL3737_I2C_ADDRESS_1, 0);
-# if defined(IS31FL3737_I2C_ADDRESS_2)
- is31fl3737_update_pwm_buffers(IS31FL3737_I2C_ADDRESS_2, 1);
-# if defined(IS31FL3737_I2C_ADDRESS_3)
- is31fl3737_update_pwm_buffers(IS31FL3737_I2C_ADDRESS_3, 2);
-# if defined(IS31FL3737_I2C_ADDRESS_4)
- is31fl3737_update_pwm_buffers(IS31FL3737_I2C_ADDRESS_4, 3);
-# endif
-# endif
-# endif
-}
-
const led_matrix_driver_t led_matrix_driver = {
.init = init,
- .flush = flush,
+ .flush = is31fl3737_flush,
.set_value = is31fl3737_set_value,
.set_value_all = is31fl3737_set_value_all,
};
# elif defined(LED_MATRIX_IS31FL3741)
-static void flush(void) {
- is31fl3741_update_pwm_buffers(IS31FL3741_I2C_ADDRESS_1, 0);
-# if defined(IS31FL3741_I2C_ADDRESS_2)
- is31fl3741_update_pwm_buffers(IS31FL3741_I2C_ADDRESS_2, 1);
-# if defined(IS31FL3741_I2C_ADDRESS_3)
- is31fl3741_update_pwm_buffers(IS31FL3741_I2C_ADDRESS_3, 2);
-# if defined(IS31FL3741_I2C_ADDRESS_4)
- is31fl3741_update_pwm_buffers(IS31FL3741_I2C_ADDRESS_4, 3);
-# endif
-# endif
-# endif
-}
-
const led_matrix_driver_t led_matrix_driver = {
.init = init,
- .flush = flush,
+ .flush = is31fl3741_flush,
.set_value = is31fl3741_set_value,
.set_value_all = is31fl3741_set_value_all,
};
# elif defined(IS31FLCOMMON)
-static void flush(void) {
- IS31FL_common_update_pwm_register(DRIVER_ADDR_1, 0);
-# if defined(LED_DRIVER_ADDR_2)
- IS31FL_common_update_pwm_register(DRIVER_ADDR_2, 1);
-# if defined(LED_DRIVER_ADDR_3)
- IS31FL_common_update_pwm_register(DRIVER_ADDR_3, 2);
-# if defined(LED_DRIVER_ADDR_4)
- IS31FL_common_update_pwm_register(DRIVER_ADDR_4, 3);
-# endif
-# endif
-# endif
-}
-
const led_matrix_driver_t led_matrix_driver = {
.init = init,
- .flush = flush,
+ .flush = IS31FL_common_flush,
.set_value = IS31FL_simple_set_brightness,
.set_value_all = IS31FL_simple_set_brigntness_all,
};
# elif defined(LED_MATRIX_SNLED27351)
-static void flush(void) {
- snled27351_update_pwm_buffers(SNLED27351_I2C_ADDRESS_1, 0);
-# if defined(SNLED27351_I2C_ADDRESS_2)
- snled27351_update_pwm_buffers(SNLED27351_I2C_ADDRESS_2, 1);
-# if defined(SNLED27351_I2C_ADDRESS_3)
- snled27351_update_pwm_buffers(SNLED27351_I2C_ADDRESS_3, 2);
-# if defined(SNLED27351_I2C_ADDRESS_4)
- snled27351_update_pwm_buffers(SNLED27351_I2C_ADDRESS_4, 3);
-# endif
-# endif
-# endif
-}
-
const led_matrix_driver_t led_matrix_driver = {
.init = init,
- .flush = flush,
+ .flush = snled27351_flush,
.set_value = snled27351_set_value,
.set_value_all = snled27351_set_value_all,
};
diff --git a/quantum/rgb_matrix/rgb_matrix_drivers.c b/quantum/rgb_matrix/rgb_matrix_drivers.c
index 555e750e50..0fe93ee077 100644
--- a/quantum/rgb_matrix/rgb_matrix_drivers.c
+++ b/quantum/rgb_matrix/rgb_matrix_drivers.c
@@ -247,160 +247,65 @@ static void init(void) {
}
# if defined(RGB_MATRIX_IS31FL3218)
-static void flush(void) {
- is31fl3218_update_pwm_buffers();
-}
-
const rgb_matrix_driver_t rgb_matrix_driver = {
.init = init,
- .flush = flush,
+ .flush = is31fl3218_update_pwm_buffers,
.set_color = is31fl3218_set_color,
.set_color_all = is31fl3218_set_color_all,
};
# elif defined(RGB_MATRIX_IS31FL3731)
-static void flush(void) {
- is31fl3731_update_pwm_buffers(IS31FL3731_I2C_ADDRESS_1, 0);
-# if defined(IS31FL3731_I2C_ADDRESS_2)
- is31fl3731_update_pwm_buffers(IS31FL3731_I2C_ADDRESS_2, 1);
-# if defined(IS31FL3731_I2C_ADDRESS_3)
- is31fl3731_update_pwm_buffers(IS31FL3731_I2C_ADDRESS_3, 2);
-# if defined(IS31FL3731_I2C_ADDRESS_4)
- is31fl3731_update_pwm_buffers(IS31FL3731_I2C_ADDRESS_4, 3);
-# endif
-# endif
-# endif
-}
-
const rgb_matrix_driver_t rgb_matrix_driver = {
.init = init,
- .flush = flush,
+ .flush = is31fl3731_flush,
.set_color = is31fl3731_set_color,
.set_color_all = is31fl3731_set_color_all,
};
# elif defined(RGB_MATRIX_IS31FL3733)
-static void flush(void) {
- is31fl3733_update_pwm_buffers(IS31FL3733_I2C_ADDRESS_1, 0);
-# if defined(IS31FL3733_I2C_ADDRESS_2)
- is31fl3733_update_pwm_buffers(IS31FL3733_I2C_ADDRESS_2, 1);
-# if defined(IS31FL3733_I2C_ADDRESS_3)
- is31fl3733_update_pwm_buffers(IS31FL3733_I2C_ADDRESS_3, 2);
-# if defined(IS31FL3733_I2C_ADDRESS_4)
- is31fl3733_update_pwm_buffers(IS31FL3733_I2C_ADDRESS_4, 3);
-# endif
-# endif
-# endif
-}
-
const rgb_matrix_driver_t rgb_matrix_driver = {
.init = init,
- .flush = flush,
+ .flush = is31fl3733_flush,
.set_color = is31fl3733_set_color,
.set_color_all = is31fl3733_set_color_all,
};
# elif defined(RGB_MATRIX_IS31FL3736)
-static void flush(void) {
- is31fl3736_update_pwm_buffers(IS31FL3736_I2C_ADDRESS_1, 0);
-# if defined(IS31FL3736_I2C_ADDRESS_2)
- is31fl3736_update_pwm_buffers(IS31FL3736_I2C_ADDRESS_2, 1);
-# if defined(IS31FL3736_I2C_ADDRESS_3)
- is31fl3736_update_pwm_buffers(IS31FL3736_I2C_ADDRESS_3, 2);
-# if defined(IS31FL3736_I2C_ADDRESS_4)
- is31fl3736_update_pwm_buffers(IS31FL3736_I2C_ADDRESS_4, 3);
-# endif
-# endif
-# endif
-}
-
const rgb_matrix_driver_t rgb_matrix_driver = {
.init = init,
- .flush = flush,
+ .flush = is31fl3736_flush,
.set_color = is31fl3736_set_color,
.set_color_all = is31fl3736_set_color_all,
};
# elif defined(RGB_MATRIX_IS31FL3737)
-static void flush(void) {
- is31fl3737_update_pwm_buffers(IS31FL3737_I2C_ADDRESS_1, 0);
-# if defined(IS31FL3737_I2C_ADDRESS_2)
- is31fl3737_update_pwm_buffers(IS31FL3737_I2C_ADDRESS_2, 1);
-# if defined(IS31FL3737_I2C_ADDRESS_3)
- is31fl3737_update_pwm_buffers(IS31FL3737_I2C_ADDRESS_3, 2);
-# if defined(IS31FL3737_I2C_ADDRESS_4)
- is31fl3737_update_pwm_buffers(IS31FL3737_I2C_ADDRESS_4, 3);
-# endif
-# endif
-# endif
-}
-
const rgb_matrix_driver_t rgb_matrix_driver = {
.init = init,
- .flush = flush,
+ .flush = is31fl3737_flush,
.set_color = is31fl3737_set_color,
.set_color_all = is31fl3737_set_color_all,
};
# elif defined(RGB_MATRIX_IS31FL3741)
-static void flush(void) {
- is31fl3741_update_pwm_buffers(IS31FL3741_I2C_ADDRESS_1, 0);
-# if defined(IS31FL3741_I2C_ADDRESS_2)
- is31fl3741_update_pwm_buffers(IS31FL3741_I2C_ADDRESS_2, 1);
-# if defined(IS31FL3741_I2C_ADDRESS_3)
- is31fl3741_update_pwm_buffers(IS31FL3741_I2C_ADDRESS_3, 2);
-# if defined(IS31FL3741_I2C_ADDRESS_4)
- is31fl3741_update_pwm_buffers(IS31FL3741_I2C_ADDRESS_4, 3);
-# endif
-# endif
-# endif
-}
-
const rgb_matrix_driver_t rgb_matrix_driver = {
.init = init,
- .flush = flush,
+ .flush = is31fl3741_flush,
.set_color = is31fl3741_set_color,
.set_color_all = is31fl3741_set_color_all,
};
# elif defined(IS31FLCOMMON)
-static void flush(void) {
- IS31FL_common_update_pwm_register(DRIVER_ADDR_1, 0);
-# if defined(DRIVER_ADDR_2)
- IS31FL_common_update_pwm_register(DRIVER_ADDR_2, 1);
-# if defined(DRIVER_ADDR_3)
- IS31FL_common_update_pwm_register(DRIVER_ADDR_3, 2);
-# if defined(DRIVER_ADDR_4)
- IS31FL_common_update_pwm_register(DRIVER_ADDR_4, 3);
-# endif
-# endif
-# endif
-}
-
const rgb_matrix_driver_t rgb_matrix_driver = {
.init = init,
- .flush = flush,
+ .flush = IS31FL_common_flush,
.set_color = IS31FL_RGB_set_color,
.set_color_all = IS31FL_RGB_set_color_all,
};
# elif defined(RGB_MATRIX_SNLED27351)
-static void flush(void) {
- snled27351_update_pwm_buffers(SNLED27351_I2C_ADDRESS_1, 0);
-# if defined(SNLED27351_I2C_ADDRESS_2)
- snled27351_update_pwm_buffers(SNLED27351_I2C_ADDRESS_2, 1);
-# if defined(SNLED27351_I2C_ADDRESS_3)
- snled27351_update_pwm_buffers(SNLED27351_I2C_ADDRESS_3, 2);
-# if defined(SNLED27351_I2C_ADDRESS_4)
- snled27351_update_pwm_buffers(SNLED27351_I2C_ADDRESS_4, 3);
-# endif
-# endif
-# endif
-}
-
const rgb_matrix_driver_t rgb_matrix_driver = {
.init = init,
- .flush = flush,
+ .flush = snled27351_flush,
.set_color = snled27351_set_color,
.set_color_all = snled27351_set_color_all,
};
@@ -418,16 +323,9 @@ static void init(void) {
# endif
}
-static void flush(void) {
- aw20216s_update_pwm_buffers(AW20216S_CS_PIN_1, 0);
-# if defined(AW20216S_CS_PIN_2)
- aw20216s_update_pwm_buffers(AW20216S_CS_PIN_2, 1);
-# endif
-}
-
const rgb_matrix_driver_t rgb_matrix_driver = {
.init = init,
- .flush = flush,
+ .flush = aw20216s_flush,
.set_color = aw20216s_set_color,
.set_color_all = aw20216s_set_color_all,
};