summaryrefslogtreecommitdiff
path: root/keyboards/input_club
diff options
context:
space:
mode:
authorRyan <fauxpark@gmail.com>2023-10-23 03:32:27 +1000
committerGitHub <noreply@github.com>2023-10-22 18:32:27 +0100
commitcf7d3435d7e2cfb8927a1c436320f67bc9914eeb (patch)
tree272161a65714e8ba457d14af17a691becb7211ef /keyboards/input_club
parent1e9b299fb0511e82ae60a4b39a1b277f4ea21afd (diff)
Add `_flush()` functions to LED drivers (#22308)
Diffstat (limited to 'keyboards/input_club')
-rw-r--r--keyboards/input_club/k_type/is31fl3733-dual.c7
-rw-r--r--keyboards/input_club/k_type/is31fl3733-dual.h2
-rw-r--r--keyboards/input_club/k_type/k_type-rgbdriver.c9
3 files changed, 10 insertions, 8 deletions
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,
};