diff options
| author | Ryan <fauxpark@gmail.com> | 2023-10-23 03:32:27 +1000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-10-22 18:32:27 +0100 |
| commit | cf7d3435d7e2cfb8927a1c436320f67bc9914eeb (patch) | |
| tree | 272161a65714e8ba457d14af17a691becb7211ef | |
| parent | 1e9b299fb0511e82ae60a4b39a1b277f4ea21afd (diff) | |
Add `_flush()` functions to LED drivers (#22308)
72 files changed, 346 insertions, 319 deletions
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) { | |||
| 166 | } | 166 | } |
| 167 | g_pwm_buffer_update_required[index] = false; | 167 | g_pwm_buffer_update_required[index] = false; |
| 168 | } | 168 | } |
| 169 | |||
| 170 | void aw20216s_flush(void) { | ||
| 171 | aw20216s_update_pwm_buffers(AW20216S_CS_PIN_1, 0); | ||
| 172 | #if defined(AW20216S_CS_PIN_2) | ||
| 173 | aw20216s_update_pwm_buffers(AW20216S_CS_PIN_2, 1); | ||
| 174 | #endif | ||
| 175 | } | ||
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); | |||
| 68 | void aw20216s_set_color_all(uint8_t red, uint8_t green, uint8_t blue); | 68 | void aw20216s_set_color_all(uint8_t red, uint8_t green, uint8_t blue); |
| 69 | void aw20216s_update_pwm_buffers(pin_t cs_pin, uint8_t index); | 69 | void aw20216s_update_pwm_buffers(pin_t cs_pin, uint8_t index); |
| 70 | 70 | ||
| 71 | void aw20216s_flush(void); | ||
| 72 | |||
| 71 | #define CS1_SW1 0x00 | 73 | #define CS1_SW1 0x00 |
| 72 | #define CS2_SW1 0x01 | 74 | #define CS2_SW1 0x01 |
| 73 | #define CS3_SW1 0x02 | 75 | #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) { | |||
| 211 | g_led_control_registers_update_required[index] = false; | 211 | g_led_control_registers_update_required[index] = false; |
| 212 | } | 212 | } |
| 213 | } | 213 | } |
| 214 | |||
| 215 | void is31fl3731_flush(void) { | ||
| 216 | is31fl3731_update_pwm_buffers(IS31FL3731_I2C_ADDRESS_1, 0); | ||
| 217 | #if defined(IS31FL3731_I2C_ADDRESS_2) | ||
| 218 | is31fl3731_update_pwm_buffers(IS31FL3731_I2C_ADDRESS_2, 1); | ||
| 219 | # if defined(IS31FL3731_I2C_ADDRESS_3) | ||
| 220 | is31fl3731_update_pwm_buffers(IS31FL3731_I2C_ADDRESS_3, 2); | ||
| 221 | # if defined(IS31FL3731_I2C_ADDRESS_4) | ||
| 222 | is31fl3731_update_pwm_buffers(IS31FL3731_I2C_ADDRESS_4, 3); | ||
| 223 | # endif | ||
| 224 | # endif | ||
| 225 | #endif | ||
| 226 | } | ||
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); | |||
| 80 | void is31fl3731_update_pwm_buffers(uint8_t addr, uint8_t index); | 80 | void is31fl3731_update_pwm_buffers(uint8_t addr, uint8_t index); |
| 81 | void is31fl3731_update_led_control_registers(uint8_t addr, uint8_t index); | 81 | void is31fl3731_update_led_control_registers(uint8_t addr, uint8_t index); |
| 82 | 82 | ||
| 83 | void is31fl3731_flush(void); | ||
| 84 | |||
| 83 | #define C1_1 0x24 | 85 | #define C1_1 0x24 |
| 84 | #define C1_2 0x25 | 86 | #define C1_2 0x25 |
| 85 | #define C1_3 0x26 | 87 | #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) { | |||
| 223 | } | 223 | } |
| 224 | g_led_control_registers_update_required[index] = false; | 224 | g_led_control_registers_update_required[index] = false; |
| 225 | } | 225 | } |
| 226 | |||
| 227 | void is31fl3731_flush(void) { | ||
| 228 | is31fl3731_update_pwm_buffers(IS31FL3731_I2C_ADDRESS_1, 0); | ||
| 229 | #if defined(IS31FL3731_I2C_ADDRESS_2) | ||
| 230 | is31fl3731_update_pwm_buffers(IS31FL3731_I2C_ADDRESS_2, 1); | ||
| 231 | # if defined(IS31FL3731_I2C_ADDRESS_3) | ||
| 232 | is31fl3731_update_pwm_buffers(IS31FL3731_I2C_ADDRESS_3, 2); | ||
| 233 | # if defined(IS31FL3731_I2C_ADDRESS_4) | ||
| 234 | is31fl3731_update_pwm_buffers(IS31FL3731_I2C_ADDRESS_4, 3); | ||
| 235 | # endif | ||
| 236 | # endif | ||
| 237 | #endif | ||
| 238 | } | ||
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 | |||
| 81 | void is31fl3731_update_pwm_buffers(uint8_t addr, uint8_t index); | 81 | void is31fl3731_update_pwm_buffers(uint8_t addr, uint8_t index); |
| 82 | void is31fl3731_update_led_control_registers(uint8_t addr, uint8_t index); | 82 | void is31fl3731_update_led_control_registers(uint8_t addr, uint8_t index); |
| 83 | 83 | ||
| 84 | void is31fl3731_flush(void); | ||
| 85 | |||
| 84 | #define C1_1 0x24 | 86 | #define C1_1 0x24 |
| 85 | #define C1_2 0x25 | 87 | #define C1_2 0x25 |
| 86 | #define C1_3 0x26 | 88 | #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) { | |||
| 233 | g_led_control_registers_update_required[index] = false; | 233 | g_led_control_registers_update_required[index] = false; |
| 234 | } | 234 | } |
| 235 | } | 235 | } |
| 236 | |||
| 237 | void is31fl3733_flush(void) { | ||
| 238 | is31fl3733_update_pwm_buffers(IS31FL3733_I2C_ADDRESS_1, 0); | ||
| 239 | #if defined(IS31FL3733_I2C_ADDRESS_2) | ||
| 240 | is31fl3733_update_pwm_buffers(IS31FL3733_I2C_ADDRESS_2, 1); | ||
| 241 | # if defined(IS31FL3733_I2C_ADDRESS_3) | ||
| 242 | is31fl3733_update_pwm_buffers(IS31FL3733_I2C_ADDRESS_3, 2); | ||
| 243 | # if defined(IS31FL3733_I2C_ADDRESS_4) | ||
| 244 | is31fl3733_update_pwm_buffers(IS31FL3733_I2C_ADDRESS_4, 3); | ||
| 245 | # endif | ||
| 246 | # endif | ||
| 247 | #endif | ||
| 248 | } | ||
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); | |||
| 99 | void is31fl3733_update_pwm_buffers(uint8_t addr, uint8_t index); | 99 | void is31fl3733_update_pwm_buffers(uint8_t addr, uint8_t index); |
| 100 | void is31fl3733_update_led_control_registers(uint8_t addr, uint8_t index); | 100 | void is31fl3733_update_led_control_registers(uint8_t addr, uint8_t index); |
| 101 | 101 | ||
| 102 | void is31fl3733_flush(void); | ||
| 103 | |||
| 102 | #define IS31FL3733_PUR_0R 0x00 // No PUR resistor | 104 | #define IS31FL3733_PUR_0R 0x00 // No PUR resistor |
| 103 | #define IS31FL3733_PUR_05KR 0x02 // 0.5k Ohm resistor in t_NOL | 105 | #define IS31FL3733_PUR_05KR 0x02 // 0.5k Ohm resistor in t_NOL |
| 104 | #define IS31FL3733_PUR_3KR 0x03 // 3.0k Ohm resistor on all the time | 106 | #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) { | |||
| 248 | g_led_control_registers_update_required[index] = false; | 248 | g_led_control_registers_update_required[index] = false; |
| 249 | } | 249 | } |
| 250 | } | 250 | } |
| 251 | |||
| 252 | void is31fl3733_flush(void) { | ||
| 253 | is31fl3733_update_pwm_buffers(IS31FL3733_I2C_ADDRESS_1, 0); | ||
| 254 | #if defined(IS31FL3733_I2C_ADDRESS_2) | ||
| 255 | is31fl3733_update_pwm_buffers(IS31FL3733_I2C_ADDRESS_2, 1); | ||
| 256 | # if defined(IS31FL3733_I2C_ADDRESS_3) | ||
| 257 | is31fl3733_update_pwm_buffers(IS31FL3733_I2C_ADDRESS_3, 2); | ||
| 258 | # if defined(IS31FL3733_I2C_ADDRESS_4) | ||
| 259 | is31fl3733_update_pwm_buffers(IS31FL3733_I2C_ADDRESS_4, 3); | ||
| 260 | # endif | ||
| 261 | # endif | ||
| 262 | #endif | ||
| 263 | } | ||
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 | |||
| 124 | void is31fl3733_update_pwm_buffers(uint8_t addr, uint8_t index); | 124 | void is31fl3733_update_pwm_buffers(uint8_t addr, uint8_t index); |
| 125 | void is31fl3733_update_led_control_registers(uint8_t addr, uint8_t index); | 125 | void is31fl3733_update_led_control_registers(uint8_t addr, uint8_t index); |
| 126 | 126 | ||
| 127 | void is31fl3733_flush(void); | ||
| 128 | |||
| 127 | #define IS31FL3733_PUR_0R 0x00 // No PUR resistor | 129 | #define IS31FL3733_PUR_0R 0x00 // No PUR resistor |
| 128 | #define IS31FL3733_PUR_05KR 0x02 // 0.5k Ohm resistor in t_NOL | 130 | #define IS31FL3733_PUR_05KR 0x02 // 0.5k Ohm resistor in t_NOL |
| 129 | #define IS31FL3733_PUR_3KR 0x03 // 3.0k Ohm resistor on all the time | 131 | #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) { | |||
| 220 | g_led_control_registers_update_required[index] = false; | 220 | g_led_control_registers_update_required[index] = false; |
| 221 | } | 221 | } |
| 222 | } | 222 | } |
| 223 | |||
| 224 | void is31fl3736_flush(void) { | ||
| 225 | is31fl3736_update_pwm_buffers(IS31FL3736_I2C_ADDRESS_1, 0); | ||
| 226 | #if defined(IS31FL3736_I2C_ADDRESS_2) | ||
| 227 | is31fl3736_update_pwm_buffers(IS31FL3736_I2C_ADDRESS_2, 1); | ||
| 228 | # if defined(IS31FL3736_I2C_ADDRESS_3) | ||
| 229 | is31fl3736_update_pwm_buffers(IS31FL3736_I2C_ADDRESS_3, 2); | ||
| 230 | # if defined(IS31FL3736_I2C_ADDRESS_4) | ||
| 231 | is31fl3736_update_pwm_buffers(IS31FL3736_I2C_ADDRESS_4, 3); | ||
| 232 | # endif | ||
| 233 | # endif | ||
| 234 | #endif | ||
| 235 | } | ||
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); | |||
| 94 | void is31fl3736_update_pwm_buffers(uint8_t addr, uint8_t index); | 94 | void is31fl3736_update_pwm_buffers(uint8_t addr, uint8_t index); |
| 95 | void is31fl3736_update_led_control_registers(uint8_t addr, uint8_t index); | 95 | void is31fl3736_update_led_control_registers(uint8_t addr, uint8_t index); |
| 96 | 96 | ||
| 97 | void is31fl3736_flush(void); | ||
| 98 | |||
| 97 | #define IS31FL3736_PUR_0R 0x00 // No PUR resistor | 99 | #define IS31FL3736_PUR_0R 0x00 // No PUR resistor |
| 98 | #define IS31FL3736_PUR_05KR 0x01 // 0.5k Ohm resistor | 100 | #define IS31FL3736_PUR_05KR 0x01 // 0.5k Ohm resistor |
| 99 | #define IS31FL3736_PUR_1KR 0x02 // 1.0k Ohm resistor | 101 | #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) { | |||
| 237 | g_led_control_registers_update_required[index] = false; | 237 | g_led_control_registers_update_required[index] = false; |
| 238 | } | 238 | } |
| 239 | } | 239 | } |
| 240 | |||
| 241 | void is31fl3736_flush(void) { | ||
| 242 | is31fl3736_update_pwm_buffers(IS31FL3736_I2C_ADDRESS_1, 0); | ||
| 243 | #if defined(IS31FL3736_I2C_ADDRESS_2) | ||
| 244 | is31fl3736_update_pwm_buffers(IS31FL3736_I2C_ADDRESS_2, 1); | ||
| 245 | # if defined(IS31FL3736_I2C_ADDRESS_3) | ||
| 246 | is31fl3736_update_pwm_buffers(IS31FL3736_I2C_ADDRESS_3, 2); | ||
| 247 | # if defined(IS31FL3736_I2C_ADDRESS_4) | ||
| 248 | is31fl3736_update_pwm_buffers(IS31FL3736_I2C_ADDRESS_4, 3); | ||
| 249 | # endif | ||
| 250 | # endif | ||
| 251 | #endif | ||
| 252 | } | ||
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 | |||
| 108 | void is31fl3736_update_pwm_buffers(uint8_t addr, uint8_t index); | 108 | void is31fl3736_update_pwm_buffers(uint8_t addr, uint8_t index); |
| 109 | void is31fl3736_update_led_control_registers(uint8_t addr, uint8_t index); | 109 | void is31fl3736_update_led_control_registers(uint8_t addr, uint8_t index); |
| 110 | 110 | ||
| 111 | void is31fl3736_flush(void); | ||
| 112 | |||
| 111 | #define IS31FL3736_PUR_0R 0x00 // No PUR resistor | 113 | #define IS31FL3736_PUR_0R 0x00 // No PUR resistor |
| 112 | #define IS31FL3736_PUR_05KR 0x01 // 0.5k Ohm resistor | 114 | #define IS31FL3736_PUR_05KR 0x01 // 0.5k Ohm resistor |
| 113 | #define IS31FL3736_PUR_1KR 0x02 // 1.0k Ohm resistor | 115 | #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) { | |||
| 217 | g_led_control_registers_update_required[index] = false; | 217 | g_led_control_registers_update_required[index] = false; |
| 218 | } | 218 | } |
| 219 | } | 219 | } |
| 220 | |||
| 221 | void is31fl3737_flush(void) { | ||
| 222 | is31fl3737_update_pwm_buffers(IS31FL3737_I2C_ADDRESS_1, 0); | ||
| 223 | #if defined(IS31FL3737_I2C_ADDRESS_2) | ||
| 224 | is31fl3737_update_pwm_buffers(IS31FL3737_I2C_ADDRESS_2, 1); | ||
| 225 | # if defined(IS31FL3737_I2C_ADDRESS_3) | ||
| 226 | is31fl3737_update_pwm_buffers(IS31FL3737_I2C_ADDRESS_3, 2); | ||
| 227 | # if defined(IS31FL3737_I2C_ADDRESS_4) | ||
| 228 | is31fl3737_update_pwm_buffers(IS31FL3737_I2C_ADDRESS_4, 3); | ||
| 229 | # endif | ||
| 230 | # endif | ||
| 231 | #endif | ||
| 232 | } | ||
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); | |||
| 84 | void is31fl3737_update_pwm_buffers(uint8_t addr, uint8_t index); | 84 | void is31fl3737_update_pwm_buffers(uint8_t addr, uint8_t index); |
| 85 | void is31fl3737_update_led_control_registers(uint8_t addr, uint8_t index); | 85 | void is31fl3737_update_led_control_registers(uint8_t addr, uint8_t index); |
| 86 | 86 | ||
| 87 | void is31fl3737_flush(void); | ||
| 88 | |||
| 87 | #define IS31FL3737_PUR_0R 0x00 // No PUR resistor | 89 | #define IS31FL3737_PUR_0R 0x00 // No PUR resistor |
| 88 | #define IS31FL3737_PUR_05KR 0x01 // 0.5k Ohm resistor in t_NOL | 90 | #define IS31FL3737_PUR_05KR 0x01 // 0.5k Ohm resistor in t_NOL |
| 89 | #define IS31FL3737_PUR_1KR 0x02 // 1.0k Ohm resistor in t_NOL | 91 | #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) { | |||
| 233 | g_led_control_registers_update_required[index] = false; | 233 | g_led_control_registers_update_required[index] = false; |
| 234 | } | 234 | } |
| 235 | } | 235 | } |
| 236 | |||
| 237 | void is31fl3737_flush(void) { | ||
| 238 | is31fl3737_update_pwm_buffers(IS31FL3737_I2C_ADDRESS_1, 0); | ||
| 239 | #if defined(IS31FL3737_I2C_ADDRESS_2) | ||
| 240 | is31fl3737_update_pwm_buffers(IS31FL3737_I2C_ADDRESS_2, 1); | ||
| 241 | # if defined(IS31FL3737_I2C_ADDRESS_3) | ||
| 242 | is31fl3737_update_pwm_buffers(IS31FL3737_I2C_ADDRESS_3, 2); | ||
| 243 | # if defined(IS31FL3737_I2C_ADDRESS_4) | ||
| 244 | is31fl3737_update_pwm_buffers(IS31FL3737_I2C_ADDRESS_4, 3); | ||
| 245 | # endif | ||
| 246 | # endif | ||
| 247 | #endif | ||
| 248 | } | ||
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 | |||
| 101 | void is31fl3737_update_pwm_buffers(uint8_t addr, uint8_t index); | 101 | void is31fl3737_update_pwm_buffers(uint8_t addr, uint8_t index); |
| 102 | void is31fl3737_update_led_control_registers(uint8_t addr, uint8_t index); | 102 | void is31fl3737_update_led_control_registers(uint8_t addr, uint8_t index); |
| 103 | 103 | ||
| 104 | void is31fl3737_flush(void); | ||
| 105 | |||
| 104 | #define IS31FL3737_PUR_0R 0x00 // No PUR resistor | 106 | #define IS31FL3737_PUR_0R 0x00 // No PUR resistor |
| 105 | #define IS31FL3737_PUR_05KR 0x01 // 0.5k Ohm resistor in t_NOL | 107 | #define IS31FL3737_PUR_05KR 0x01 // 0.5k Ohm resistor in t_NOL |
| 106 | #define IS31FL3737_PUR_1KR 0x02 // 1.0k Ohm resistor in t_NOL | 108 | #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 | |||
| 251 | 251 | ||
| 252 | g_scaling_registers_update_required[pled->driver] = true; | 252 | g_scaling_registers_update_required[pled->driver] = true; |
| 253 | } | 253 | } |
| 254 | |||
| 255 | void is31fl3741_flush(void) { | ||
| 256 | is31fl3741_update_pwm_buffers(IS31FL3741_I2C_ADDRESS_1, 0); | ||
| 257 | #if defined(IS31FL3741_I2C_ADDRESS_2) | ||
| 258 | is31fl3741_update_pwm_buffers(IS31FL3741_I2C_ADDRESS_2, 1); | ||
| 259 | # if defined(IS31FL3741_I2C_ADDRESS_3) | ||
| 260 | is31fl3741_update_pwm_buffers(IS31FL3741_I2C_ADDRESS_3, 2); | ||
| 261 | # if defined(IS31FL3741_I2C_ADDRESS_4) | ||
| 262 | is31fl3741_update_pwm_buffers(IS31FL3741_I2C_ADDRESS_4, 3); | ||
| 263 | # endif | ||
| 264 | # endif | ||
| 265 | #endif | ||
| 266 | } | ||
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 | |||
| 87 | 87 | ||
| 88 | void is31fl3741_set_pwm_buffer(const is31fl3741_led *pled, uint8_t value); | 88 | void is31fl3741_set_pwm_buffer(const is31fl3741_led *pled, uint8_t value); |
| 89 | 89 | ||
| 90 | void is31fl3741_flush(void); | ||
| 91 | |||
| 90 | #define IS31FL3741_PUR_0R 0x00 // No PUR resistor | 92 | #define IS31FL3741_PUR_0R 0x00 // No PUR resistor |
| 91 | #define IS31FL3741_PUR_05KR 0x01 // 0.5k Ohm resistor | 93 | #define IS31FL3741_PUR_05KR 0x01 // 0.5k Ohm resistor |
| 92 | #define IS31FL3741_PUR_1KR 0x02 // 1.0k Ohm resistor | 94 | #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, | |||
| 269 | 269 | ||
| 270 | g_scaling_registers_update_required[pled->driver] = true; | 270 | g_scaling_registers_update_required[pled->driver] = true; |
| 271 | } | 271 | } |
| 272 | |||
| 273 | void is31fl3741_flush(void) { | ||
| 274 | is31fl3741_update_pwm_buffers(IS31FL3741_I2C_ADDRESS_1, 0); | ||
| 275 | #if defined(IS31FL3741_I2C_ADDRESS_2) | ||
| 276 | is31fl3741_update_pwm_buffers(IS31FL3741_I2C_ADDRESS_2, 1); | ||
| 277 | # if defined(IS31FL3741_I2C_ADDRESS_3) | ||
| 278 | is31fl3741_update_pwm_buffers(IS31FL3741_I2C_ADDRESS_3, 2); | ||
| 279 | # if defined(IS31FL3741_I2C_ADDRESS_4) | ||
| 280 | is31fl3741_update_pwm_buffers(IS31FL3741_I2C_ADDRESS_4, 3); | ||
| 281 | # endif | ||
| 282 | # endif | ||
| 283 | #endif | ||
| 284 | } | ||
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, | |||
| 104 | 104 | ||
| 105 | void is31fl3741_set_pwm_buffer(const is31fl3741_led_t *pled, uint8_t red, uint8_t green, uint8_t blue); | 105 | void is31fl3741_set_pwm_buffer(const is31fl3741_led_t *pled, uint8_t red, uint8_t green, uint8_t blue); |
| 106 | 106 | ||
| 107 | void is31fl3741_flush(void); | ||
| 108 | |||
| 107 | #define IS31FL3741_PUR_0R 0x00 // No PUR resistor | 109 | #define IS31FL3741_PUR_0R 0x00 // No PUR resistor |
| 108 | #define IS31FL3741_PUR_05KR 0x01 // 0.5k Ohm resistor | 110 | #define IS31FL3741_PUR_05KR 0x01 // 0.5k Ohm resistor |
| 109 | #define IS31FL3741_PUR_1KR 0x02 // 1.0k Ohm resistor | 111 | #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) { | |||
| 174 | } | 174 | } |
| 175 | } | 175 | } |
| 176 | 176 | ||
| 177 | void IS31FL_common_flush(void) { | ||
| 178 | IS31FL_common_update_pwm_register(DRIVER_ADDR_1, 0); | ||
| 179 | #if defined(DRIVER_ADDR_2) | ||
| 180 | IS31FL_common_update_pwm_register(DRIVER_ADDR_2, 1); | ||
| 181 | # if defined(DRIVER_ADDR_3) | ||
| 182 | IS31FL_common_update_pwm_register(DRIVER_ADDR_3, 2); | ||
| 183 | # if defined(DRIVER_ADDR_4) | ||
| 184 | IS31FL_common_update_pwm_register(DRIVER_ADDR_4, 3); | ||
| 185 | # endif | ||
| 186 | # endif | ||
| 187 | #endif | ||
| 188 | } | ||
| 189 | |||
| 177 | #ifdef RGB_MATRIX_ENABLE | 190 | #ifdef RGB_MATRIX_ENABLE |
| 178 | // Colour is set by adjusting PWM register | 191 | // Colour is set by adjusting PWM register |
| 179 | void IS31FL_RGB_set_color(int index, uint8_t red, uint8_t green, uint8_t blue) { | 192 | 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); | |||
| 67 | void IS31FL_common_update_pwm_register(uint8_t addr, uint8_t index); | 67 | void IS31FL_common_update_pwm_register(uint8_t addr, uint8_t index); |
| 68 | void IS31FL_common_update_scaling_register(uint8_t addr, uint8_t index); | 68 | void IS31FL_common_update_scaling_register(uint8_t addr, uint8_t index); |
| 69 | 69 | ||
| 70 | void IS31FL_common_flush(void); | ||
| 71 | |||
| 70 | #ifdef RGB_MATRIX_ENABLE | 72 | #ifdef RGB_MATRIX_ENABLE |
| 71 | // RGB Matrix Specific scripts | 73 | // RGB Matrix Specific scripts |
| 72 | void IS31FL_RGB_set_color(int index, uint8_t red, uint8_t green, uint8_t blue); | 74 | 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) { | |||
| 203 | g_led_control_registers_update_required[index] = false; | 203 | g_led_control_registers_update_required[index] = false; |
| 204 | } | 204 | } |
| 205 | 205 | ||
| 206 | void snled27351_flush(void) { | ||
| 207 | snled27351_update_pwm_buffers(SNLED27351_I2C_ADDRESS_1, 0); | ||
| 208 | #if defined(SNLED27351_I2C_ADDRESS_2) | ||
| 209 | snled27351_update_pwm_buffers(SNLED27351_I2C_ADDRESS_2, 1); | ||
| 210 | # if defined(SNLED27351_I2C_ADDRESS_3) | ||
| 211 | snled27351_update_pwm_buffers(SNLED27351_I2C_ADDRESS_3, 2); | ||
| 212 | # if defined(SNLED27351_I2C_ADDRESS_4) | ||
| 213 | snled27351_update_pwm_buffers(SNLED27351_I2C_ADDRESS_4, 3); | ||
| 214 | # endif | ||
| 215 | # endif | ||
| 216 | #endif | ||
| 217 | } | ||
| 218 | |||
| 206 | void snled27351_sw_return_normal(uint8_t addr) { | 219 | void snled27351_sw_return_normal(uint8_t addr) { |
| 207 | // Select to function page | 220 | // Select to function page |
| 208 | snled27351_write_register(addr, SNLED27351_REG_CONFIGURE_CMD_PAGE, SNLED27351_FUNCTION_PAGE); | 221 | 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); | |||
| 82 | void snled27351_update_pwm_buffers(uint8_t addr, uint8_t index); | 82 | void snled27351_update_pwm_buffers(uint8_t addr, uint8_t index); |
| 83 | void snled27351_update_led_control_registers(uint8_t addr, uint8_t index); | 83 | void snled27351_update_led_control_registers(uint8_t addr, uint8_t index); |
| 84 | 84 | ||
| 85 | void snled27351_flush(void); | ||
| 86 | |||
| 85 | void snled27351_sw_return_normal(uint8_t addr); | 87 | void snled27351_sw_return_normal(uint8_t addr); |
| 86 | void snled27351_sw_shutdown(uint8_t addr); | 88 | void snled27351_sw_shutdown(uint8_t addr); |
| 87 | 89 | ||
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) { | |||
| 218 | g_led_control_registers_update_required[index] = false; | 218 | g_led_control_registers_update_required[index] = false; |
| 219 | } | 219 | } |
| 220 | 220 | ||
| 221 | void snled27351_flush(void) { | ||
| 222 | snled27351_update_pwm_buffers(SNLED27351_I2C_ADDRESS_1, 0); | ||
| 223 | #if defined(SNLED27351_I2C_ADDRESS_2) | ||
| 224 | snled27351_update_pwm_buffers(SNLED27351_I2C_ADDRESS_2, 1); | ||
| 225 | # if defined(SNLED27351_I2C_ADDRESS_3) | ||
| 226 | snled27351_update_pwm_buffers(SNLED27351_I2C_ADDRESS_3, 2); | ||
| 227 | # if defined(SNLED27351_I2C_ADDRESS_4) | ||
| 228 | snled27351_update_pwm_buffers(SNLED27351_I2C_ADDRESS_4, 3); | ||
| 229 | # endif | ||
| 230 | # endif | ||
| 231 | #endif | ||
| 232 | } | ||
| 233 | |||
| 221 | void snled27351_sw_return_normal(uint8_t addr) { | 234 | void snled27351_sw_return_normal(uint8_t addr) { |
| 222 | // Select to function page | 235 | // Select to function page |
| 223 | snled27351_write_register(addr, SNLED27351_REG_CONFIGURE_CMD_PAGE, SNLED27351_FUNCTION_PAGE); | 236 | 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 | |||
| 96 | void snled27351_update_pwm_buffers(uint8_t addr, uint8_t index); | 96 | void snled27351_update_pwm_buffers(uint8_t addr, uint8_t index); |
| 97 | void snled27351_update_led_control_registers(uint8_t addr, uint8_t index); | 97 | void snled27351_update_led_control_registers(uint8_t addr, uint8_t index); |
| 98 | 98 | ||
| 99 | void snled27351_flush(void); | ||
| 100 | |||
| 99 | void snled27351_sw_return_normal(uint8_t addr); | 101 | void snled27351_sw_return_normal(uint8_t addr); |
| 100 | void snled27351_sw_shutdown(uint8_t addr); | 102 | void snled27351_sw_shutdown(uint8_t addr); |
| 101 | 103 | ||
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 = { { | |||
| 145 | // Custom Driver | 145 | // Custom Driver |
| 146 | static void init(void) { | 146 | static void init(void) { |
| 147 | i2c_init(); | 147 | i2c_init(); |
| 148 | |||
| 148 | is31fl3731_init(IS31FL3731_I2C_ADDRESS_1); | 149 | is31fl3731_init(IS31FL3731_I2C_ADDRESS_1); |
| 149 | is31fl3731_init(IS31FL3731_I2C_ADDRESS_2); | 150 | is31fl3731_init(IS31FL3731_I2C_ADDRESS_2); |
| 151 | |||
| 150 | for (int index = 0; index < ISSI_DRIVER_TOTAL; index++) { | 152 | for (int index = 0; index < ISSI_DRIVER_TOTAL; index++) { |
| 151 | bool enabled = !( ( index == 18+5) || //B5 | 153 | bool enabled = !( ( index == 18+5) || //B5 |
| 152 | ( index == 36+17) || //C17 | 154 | ( index == 36+17) || //C17 |
| @@ -154,29 +156,16 @@ static void init(void) { | |||
| 154 | ); | 156 | ); |
| 155 | is31fl3731_set_led_control_register(index, enabled, enabled, enabled); | 157 | is31fl3731_set_led_control_register(index, enabled, enabled, enabled); |
| 156 | } | 158 | } |
| 159 | |||
| 157 | is31fl3731_update_led_control_registers(IS31FL3731_I2C_ADDRESS_1, 0); | 160 | is31fl3731_update_led_control_registers(IS31FL3731_I2C_ADDRESS_1, 0); |
| 158 | is31fl3731_update_led_control_registers(IS31FL3731_I2C_ADDRESS_2, 1); | 161 | is31fl3731_update_led_control_registers(IS31FL3731_I2C_ADDRESS_2, 1); |
| 159 | } | 162 | } |
| 160 | 163 | ||
| 161 | static void flush(void) { | ||
| 162 | is31fl3731_update_pwm_buffers(IS31FL3731_I2C_ADDRESS_1, 0); | ||
| 163 | is31fl3731_update_pwm_buffers(IS31FL3731_I2C_ADDRESS_2, 1); | ||
| 164 | } | ||
| 165 | |||
| 166 | static void set_color(int index, uint8_t red, uint8_t green, uint8_t blue) { | ||
| 167 | is31fl3731_set_color(index, red, green, blue); | ||
| 168 | } | ||
| 169 | |||
| 170 | static void set_color_all(uint8_t red, uint8_t green, uint8_t blue) { | ||
| 171 | is31fl3731_set_color_all( red, green, blue ); | ||
| 172 | } | ||
| 173 | |||
| 174 | |||
| 175 | const rgb_matrix_driver_t rgb_matrix_driver = { | 164 | const rgb_matrix_driver_t rgb_matrix_driver = { |
| 176 | .init = init, | 165 | .init = init, |
| 177 | .flush = flush, | 166 | .flush = is31fl3731_flush, |
| 178 | .set_color = set_color, | 167 | .set_color = is31fl3731_set_color, |
| 179 | .set_color_all = set_color_all | 168 | .set_color_all = is31fl3731_set_color_all |
| 180 | }; | 169 | }; |
| 181 | 170 | ||
| 182 | #endif | 171 | #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) { | |||
| 36 | /* update the buffer | 36 | /* update the buffer |
| 37 | */ | 37 | */ |
| 38 | void update_fallacy_leds(void) { | 38 | void update_fallacy_leds(void) { |
| 39 | is31fl3731_update_pwm_buffers(IS31FL3731_I2C_ADDRESS_1, 0); | 39 | is31fl3731_flush(); |
| 40 | } | 40 | } |
| 41 | 41 | ||
| 42 | 42 | ||
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 <http://www.gnu.org/licenses/>. | |||
| 53 | #define RGB_BACKLIGHT_COLOR_1 { .h = 0, .s = 255 } | 53 | #define RGB_BACKLIGHT_COLOR_1 { .h = 0, .s = 255 } |
| 54 | #define RGB_BACKLIGHT_COLOR_2 { .h = 127, .s = 255 } | 54 | #define RGB_BACKLIGHT_COLOR_2 { .h = 127, .s = 255 } |
| 55 | 55 | ||
| 56 | #define IS31FL3733_DRIVER_COUNT 2 | 56 | #define IS31FL3733_I2C_ADDRESS_1 IS31FL3733_I2C_ADDRESS_GND_GND |
| 57 | #define IS31FL3733_DRIVER_COUNT 1 | ||
| 57 | #define RGB_MATRIX_LED_COUNT 64 | 58 | #define RGB_MATRIX_LED_COUNT 64 |
| 58 | 59 | ||
| 59 | // These define which keys in the matrix are alphas/mods | 60 | // 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 <http://www.gnu.org/licenses/>. | |||
| 53 | #define RGB_BACKLIGHT_COLOR_1 { .h = 0, .s = 255 } | 53 | #define RGB_BACKLIGHT_COLOR_1 { .h = 0, .s = 255 } |
| 54 | #define RGB_BACKLIGHT_COLOR_2 { .h = 127, .s = 255 } | 54 | #define RGB_BACKLIGHT_COLOR_2 { .h = 127, .s = 255 } |
| 55 | 55 | ||
| 56 | #define IS31FL3733_DRIVER_COUNT 2 | 56 | #define IS31FL3733_I2C_ADDRESS_1 IS31FL3733_I2C_ADDRESS_GND_GND |
| 57 | #define IS31FL3733_DRIVER_COUNT 1 | ||
| 57 | #define RGB_MATRIX_LED_COUNT 64 | 58 | #define RGB_MATRIX_LED_COUNT 64 |
| 58 | 59 | ||
| 59 | // These define which keys in the matrix are alphas/mods | 60 | // 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 <http://www.gnu.org/licenses/>. | |||
| 50 | #define RGB_BACKLIGHT_COLOR_1 { .h = 0, .s = 255 } | 50 | #define RGB_BACKLIGHT_COLOR_1 { .h = 0, .s = 255 } |
| 51 | #define RGB_BACKLIGHT_COLOR_2 { .h = 127, .s = 255 } | 51 | #define RGB_BACKLIGHT_COLOR_2 { .h = 127, .s = 255 } |
| 52 | 52 | ||
| 53 | #define IS31FL3733_DRIVER_COUNT 2 | 53 | #define IS31FL3733_I2C_ADDRESS_1 IS31FL3733_I2C_ADDRESS_GND_GND |
| 54 | #define IS31FL3733_DRIVER_COUNT 1 | ||
| 54 | #define RGB_MATRIX_LED_COUNT 64 | 55 | #define RGB_MATRIX_LED_COUNT 64 |
| 55 | 56 | ||
| 56 | // These define which keys in the matrix are alphas/mods | 57 | // 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 @@ | |||
| 9 | { C11 } | 9 | { C11 } |
| 10 | 10 | ||
| 11 | /* I2C Config for LED Driver */ | 11 | /* I2C Config for LED Driver */ |
| 12 | #define DRIVER_COUNT 2 | 12 | #define SNLED27351_DRIVER_COUNT 2 |
| 13 | #define DRIVER_ADDR_1 0b1110100 | 13 | #define SNLED27351_I2C_ADDRESS_1 SNLED27351_I2C_ADDRESS_GND |
| 14 | #define DRIVER_ADDR_2 0b1110111 | 14 | #define SNLED27351_I2C_ADDRESS_2 SNLED27351_I2C_ADDRESS_VDDIO |
| 15 | #define I2C1_SDA_PIN B7 | 15 | #define I2C1_SDA_PIN B7 |
| 16 | #define I2C1_SCL_PIN B6 | 16 | #define I2C1_SCL_PIN B6 |
| 17 | #define I2C1_SCL_PAL_MODE 4 | 17 | #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 @@ | |||
| 33 | ] | 33 | ] |
| 34 | }, | 34 | }, |
| 35 | "rgb_matrix": { | 35 | "rgb_matrix": { |
| 36 | "driver": "ckled2001", | 36 | "driver": "snled27351", |
| 37 | "max_brightness": 180, | 37 | "max_brightness": 180, |
| 38 | "animations": { | 38 | "animations": { |
| 39 | "solid_color": true, | 39 | "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 @@ | |||
| 5 | // clang-format off | 5 | // clang-format off |
| 6 | 6 | ||
| 7 | #ifdef RGB_MATRIX_ENABLE | 7 | #ifdef RGB_MATRIX_ENABLE |
| 8 | const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = { | 8 | const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = { |
| 9 | /* Refer to IS31 manual for these locations | 9 | /* Refer to IS31 manual for these locations |
| 10 | * driver | 10 | * driver |
| 11 | * | R location | 11 | * | 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) { | |||
| 248 | } | 248 | } |
| 249 | g_led_control_registers_update_required[index] = false; | 249 | g_led_control_registers_update_required[index] = false; |
| 250 | } | 250 | } |
| 251 | |||
| 252 | void is31fl3733_flush(void) { | ||
| 253 | is31fl3733_update_pwm_buffers(IS31FL3733_I2C_ADDRESS_1, 0); | ||
| 254 | # ifdef USE_I2C2 | ||
| 255 | is31fl3733_update_pwm_buffers(IS31FL3733_I2C_ADDRESS_2, 1); | ||
| 256 | # endif | ||
| 257 | } | ||
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 | |||
| 64 | void is31fl3733_update_pwm_buffers(uint8_t addr, uint8_t index); // index is the driver index | 64 | void is31fl3733_update_pwm_buffers(uint8_t addr, uint8_t index); // index is the driver index |
| 65 | void is31fl3733_update_led_control_registers(uint8_t addr, uint8_t index); | 65 | void is31fl3733_update_led_control_registers(uint8_t addr, uint8_t index); |
| 66 | 66 | ||
| 67 | void is31fl3733_flush(void); | ||
| 68 | |||
| 67 | #define IS31FL3733_PUR_0R 0x00 // No PUR resistor | 69 | #define IS31FL3733_PUR_0R 0x00 // No PUR resistor |
| 68 | #define IS31FL3733_PUR_05KR 0x02 // 0.5k Ohm resistor in t_NOL | 70 | #define IS31FL3733_PUR_05KR 0x02 // 0.5k Ohm resistor in t_NOL |
| 69 | #define IS31FL3733_PUR_3KR 0x03 // 3.0k Ohm resistor on all the time | 71 | #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) { | |||
| 38 | # endif | 38 | # endif |
| 39 | } | 39 | } |
| 40 | 40 | ||
| 41 | static void flush(void) { | ||
| 42 | is31fl3733_update_pwm_buffers(IS31FL3733_I2C_ADDRESS_1, 0); | ||
| 43 | # ifdef USE_I2C2 | ||
| 44 | is31fl3733_update_pwm_buffers(IS31FL3733_I2C_ADDRESS_2, 1); | ||
| 45 | # endif | ||
| 46 | } | ||
| 47 | |||
| 48 | const rgb_matrix_driver_t rgb_matrix_driver = { | 41 | const rgb_matrix_driver_t rgb_matrix_driver = { |
| 49 | .init = init, | 42 | .init = init, |
| 50 | .flush = flush, | 43 | .flush = is31fl3733_flush, |
| 51 | .set_color = is31fl3733_set_color, | 44 | .set_color = is31fl3733_set_color, |
| 52 | .set_color_all = is31fl3733_set_color_all, | 45 | .set_color_all = is31fl3733_set_color_all, |
| 53 | }; | 46 | }; |
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 <http://www.gnu.org/licenses/>. | |||
| 50 | #define RGB_BACKLIGHT_COLOR_1 { .h = 0, .s = 255 } | 50 | #define RGB_BACKLIGHT_COLOR_1 { .h = 0, .s = 255 } |
| 51 | #define RGB_BACKLIGHT_COLOR_2 { .h = 127, .s = 255 } | 51 | #define RGB_BACKLIGHT_COLOR_2 { .h = 127, .s = 255 } |
| 52 | 52 | ||
| 53 | #define IS31FL3733_I2C_ADDRESS_1 IS31FL3733_I2C_ADDRESS_GND_GND | ||
| 54 | #define IS31FL3733_I2C_ADDRESS_2 IS31FL3733_I2C_ADDRESS_GND_SDA | ||
| 53 | #define IS31FL3733_DRIVER_COUNT 2 | 55 | #define IS31FL3733_DRIVER_COUNT 2 |
| 54 | #define RGB_MATRIX_LED_COUNT 128 | 56 | #define RGB_MATRIX_LED_COUNT 128 |
| 55 | 57 | ||
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 @@ | |||
| 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 15 | */ | 15 | */ |
| 16 | #include QMK_KEYBOARD_H | 16 | #include QMK_KEYBOARD_H |
| 17 | #include "drivers/issi/is31fl3733.h" | 17 | #include "drivers/led/issi/is31fl3733.h" |
| 18 | 18 | ||
| 19 | 19 | ||
| 20 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | 20 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { |
| @@ -50,9 +50,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
| 50 | 50 | ||
| 51 | static uint16_t ledTimer; | 51 | static uint16_t ledTimer; |
| 52 | 52 | ||
| 53 | uint8_t R = 0; /* First led*/ | 53 | uint8_t r = 0; /* First led*/ |
| 54 | uint8_t G = 0; /* Second led*/ | 54 | uint8_t g = 0; /* Second led*/ |
| 55 | uint8_t B = 0; /* Third led*/ | 55 | uint8_t b = 0; /* Third led*/ |
| 56 | 56 | ||
| 57 | /* Boot animation parameters */ | 57 | /* Boot animation parameters */ |
| 58 | 58 | ||
| @@ -74,44 +74,44 @@ bool bootAnimation(void){ | |||
| 74 | if (bootFirst>0 || bootSec>0){ | 74 | if (bootFirst>0 || bootSec>0){ |
| 75 | if(bootFirst!=0){ | 75 | if(bootFirst!=0){ |
| 76 | if (timer_elapsed(ledTimer) > 150){ | 76 | if (timer_elapsed(ledTimer) > 150){ |
| 77 | G = 255; | 77 | g = 255; |
| 78 | R = 0; | 78 | r = 0; |
| 79 | B = 0; | 79 | b = 0; |
| 80 | is31fl3733_set_color( 6+64-1, R, G, B ); | 80 | is31fl3733_set_color( 6+64-1, r, g, b ); |
| 81 | } | 81 | } |
| 82 | if (timer_elapsed(ledTimer) > 300){ | 82 | if (timer_elapsed(ledTimer) > 300){ |
| 83 | G = 255; | 83 | g = 255; |
| 84 | R = 255; | 84 | r = 255; |
| 85 | B = 0; | 85 | b = 0; |
| 86 | is31fl3733_set_color( 6+64-1, R, G, B ); | 86 | is31fl3733_set_color( 6+64-1, r, g, b ); |
| 87 | } | 87 | } |
| 88 | if (timer_elapsed(ledTimer) > 400){ | 88 | if (timer_elapsed(ledTimer) > 400){ |
| 89 | G = 255; | 89 | g = 255; |
| 90 | R = 255; | 90 | r = 255; |
| 91 | B = 255; | 91 | b = 255; |
| 92 | is31fl3733_set_color( 6+64-1, R, G, B ); | 92 | is31fl3733_set_color( 6+64-1, r, g, b ); |
| 93 | } | 93 | } |
| 94 | if (timer_elapsed(ledTimer) > 500){ | 94 | if (timer_elapsed(ledTimer) > 500){ |
| 95 | G = 0; | 95 | g = 0; |
| 96 | R = 0; | 96 | r = 0; |
| 97 | B = 0; | 97 | b = 0; |
| 98 | is31fl3733_set_color( 6+64-1, R, G, B ); | 98 | is31fl3733_set_color( 6+64-1, r, g, b ); |
| 99 | ledTimer = timer_read(); | 99 | ledTimer = timer_read(); |
| 100 | bootFirst--; | 100 | bootFirst--; |
| 101 | } | 101 | } |
| 102 | } | 102 | } |
| 103 | if (bootFirst==0 && bootSec!=0){ | 103 | if (bootFirst==0 && bootSec!=0){ |
| 104 | if (timer_elapsed(ledTimer) > 200) { | 104 | if (timer_elapsed(ledTimer) > 200) { |
| 105 | G = 255; | 105 | g = 255; |
| 106 | R = 255; | 106 | r = 255; |
| 107 | B = 255; | 107 | b = 255; |
| 108 | is31fl3733_set_color( 6+64-1, R, G, B ); | 108 | is31fl3733_set_color( 6+64-1, r, g, b ); |
| 109 | } | 109 | } |
| 110 | if (timer_elapsed(ledTimer) > 400){ | 110 | if (timer_elapsed(ledTimer) > 400){ |
| 111 | G = 0; | 111 | g = 0; |
| 112 | R = 0; | 112 | r = 0; |
| 113 | B = 0; | 113 | b = 0; |
| 114 | is31fl3733_set_color( 6+64-1, R, G, B ); | 114 | is31fl3733_set_color( 6+64-1, r, g, b ); |
| 115 | ledTimer = timer_read(); | 115 | ledTimer = timer_read(); |
| 116 | bootSec--; | 116 | bootSec--; |
| 117 | } | 117 | } |
| @@ -125,29 +125,29 @@ bool bootAnimation(void){ | |||
| 125 | void breathing(void) { | 125 | void breathing(void) { |
| 126 | if(timer_elapsed(ledTimer)<travelTime){ | 126 | if(timer_elapsed(ledTimer)<travelTime){ |
| 127 | time = timer_elapsed(ledTimer); | 127 | time = timer_elapsed(ledTimer); |
| 128 | if((time - previousTime) > fadeTime && R<maxBrightness){ | 128 | if((time - previousTime) > fadeTime && r<maxBrightness){ |
| 129 | G+=fadeStep; | 129 | g+=fadeStep; |
| 130 | R+=fadeStep; | 130 | r+=fadeStep; |
| 131 | B+=fadeStep; | 131 | b+=fadeStep; |
| 132 | is31fl3733_set_color( 6+64-1, R, G, B ); | 132 | is31fl3733_set_color( 6+64-1, r, g, b ); |
| 133 | previousTime = time; | 133 | previousTime = time; |
| 134 | } | 134 | } |
| 135 | } | 135 | } |
| 136 | else if(timer_elapsed(ledTimer)<(travelTime * 2)){ | 136 | else if(timer_elapsed(ledTimer)<(travelTime * 2)){ |
| 137 | time = timer_elapsed(ledTimer); | 137 | time = timer_elapsed(ledTimer); |
| 138 | if((time - previousTime) > fadeTime && R>minBrightness){ | 138 | if((time - previousTime) > fadeTime && r>minBrightness){ |
| 139 | G-=fadeStep; | 139 | g-=fadeStep; |
| 140 | R-=fadeStep; | 140 | r-=fadeStep; |
| 141 | B-=fadeStep; | 141 | b-=fadeStep; |
| 142 | is31fl3733_set_color( 6+64-1, R, G, B ); | 142 | is31fl3733_set_color( 6+64-1, r, g, b ); |
| 143 | previousTime = time; | 143 | previousTime = time; |
| 144 | } | 144 | } |
| 145 | } | 145 | } |
| 146 | else { | 146 | else { |
| 147 | R=0; | 147 | r=0; |
| 148 | G=0; | 148 | g=0; |
| 149 | B=0; | 149 | b=0; |
| 150 | is31fl3733_set_color( 6+64-1, R, G, B ); | 150 | is31fl3733_set_color( 6+64-1, r, g, b ); |
| 151 | previousTime = 0; | 151 | previousTime = 0; |
| 152 | time = 0; | 152 | time = 0; |
| 153 | ledTimer=timer_read(); | 153 | ledTimer=timer_read(); |
| @@ -166,10 +166,10 @@ void matrix_scan_user(void){ | |||
| 166 | prevCapsState = capsState; | 166 | prevCapsState = capsState; |
| 167 | } | 167 | } |
| 168 | else if(!capsState && capsState != prevCapsState){ | 168 | else if(!capsState && capsState != prevCapsState){ |
| 169 | G = 0; | 169 | g = 0; |
| 170 | R = 0; | 170 | r = 0; |
| 171 | B = 0; | 171 | b = 0; |
| 172 | is31fl3733_set_color( 6+64-1, R, G, B ); | 172 | is31fl3733_set_color( 6+64-1, r, g, b ); |
| 173 | prevCapsState = capsState; | 173 | prevCapsState = capsState; |
| 174 | } | 174 | } |
| 175 | } | 175 | } |
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) | |||
| 396 | break; | 396 | break; |
| 397 | }; | 397 | }; |
| 398 | 398 | ||
| 399 | is31fl3731_update_pwm_buffers(IS31FL3731_I2C_ADDRESS_1, 0); | 399 | is31fl3731_flush(); |
| 400 | } | 400 | } |
| 401 | 401 | ||
| 402 | bool process_record_kb(uint16_t keycode, keyrecord_t *record) | 402 | 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 @@ | |||
| 36 | #define WEAR_LEVELING_BACKING_SIZE (8 * 1024) | 36 | #define WEAR_LEVELING_BACKING_SIZE (8 * 1024) |
| 37 | 37 | ||
| 38 | /* I2C Config for LED Driver */ | 38 | /* I2C Config for LED Driver */ |
| 39 | #define DRIVER_COUNT 2 | 39 | #define SNLED27351_DRIVER_COUNT 2 |
| 40 | #define DRIVER_ADDR_1 0b1110100 | 40 | #define SNLED27351_I2C_ADDRESS_1 SNLED27351_I2C_ADDRESS_GND |
| 41 | #define DRIVER_ADDR_2 0b1110111 | 41 | #define SNLED27351_I2C_ADDRESS_2 SNLED27351_I2C_ADDRESS_VDDIO |
| 42 | #define I2C1_OPMODE OPMODE_I2C | 42 | #define I2C1_OPMODE OPMODE_I2C |
| 43 | #define I2C1_CLOCK_SPEED 400000 /* 400000 */ | 43 | #define I2C1_CLOCK_SPEED 400000 /* 400000 */ |
| 44 | 44 | ||
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 @@ | |||
| 31 | "caps_lock": "A15" | 31 | "caps_lock": "A15" |
| 32 | }, | 32 | }, |
| 33 | "rgb_matrix": { | 33 | "rgb_matrix": { |
| 34 | "driver": "ckled2001", | 34 | "driver": "snled27351", |
| 35 | "max_brightness": 160, | 35 | "max_brightness": 160, |
| 36 | "animations": { | 36 | "animations": { |
| 37 | "breathing": true, | 37 | "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 @@ | |||
| 17 | #include "quantum.h" | 17 | #include "quantum.h" |
| 18 | // clang-format off | 18 | // clang-format off |
| 19 | #ifdef RGB_MATRIX_ENABLE | 19 | #ifdef RGB_MATRIX_ENABLE |
| 20 | const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = { | 20 | const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = { |
| 21 | /* Refer to IS31 manual for these locations | 21 | /* Refer to IS31 manual for these locations |
| 22 | * driver | 22 | * driver |
| 23 | * | R location | 23 | * | 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) | |||
| 341 | } | 341 | } |
| 342 | } | 342 | } |
| 343 | 343 | ||
| 344 | is31fl3731_update_pwm_buffers(IS31FL3731_I2C_ADDRESS_1, 0); | 344 | is31fl3731_flush(); |
| 345 | #ifdef IS31FL3731_I2C_ADDRESS_2 | ||
| 346 | is31fl3731_update_pwm_buffers(IS31FL3731_I2C_ADDRESS_2, 1); | ||
| 347 | #endif | ||
| 348 | 345 | ||
| 349 | housekeeping_task_user(); | 346 | housekeeping_task_user(); |
| 350 | } | 347 | } |
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) | |||
| 343 | } | 343 | } |
| 344 | } | 344 | } |
| 345 | 345 | ||
| 346 | is31fl3731_update_pwm_buffers(IS31FL3731_I2C_ADDRESS_1, 0); | 346 | is31fl3731_flush(); |
| 347 | #ifdef IS31FL3731_I2C_ADDRESS_2 | ||
| 348 | is31fl3731_update_pwm_buffers(IS31FL3731_I2C_ADDRESS_2, 1); | ||
| 349 | #endif | ||
| 350 | 347 | ||
| 351 | housekeeping_task_user(); | 348 | housekeeping_task_user(); |
| 352 | } | 349 | } |
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 <http://www.gnu.org/licenses/>. | |||
| 50 | #define RGB_BACKLIGHT_COLOR_1 { .h = 0, .s = 255 } | 50 | #define RGB_BACKLIGHT_COLOR_1 { .h = 0, .s = 255 } |
| 51 | #define RGB_BACKLIGHT_COLOR_2 { .h = 127, .s = 255 } | 51 | #define RGB_BACKLIGHT_COLOR_2 { .h = 127, .s = 255 } |
| 52 | 52 | ||
| 53 | #define IS31FL3733_I2C_ADDRESS_1 IS31FL3733_I2C_ADDRESS_GND_GND | ||
| 54 | #define IS31FL3733_I2C_ADDRESS_2 IS31FL3733_I2C_ADDRESS_GND_SDA | ||
| 53 | #define IS31FL3733_DRIVER_COUNT 2 | 55 | #define IS31FL3733_DRIVER_COUNT 2 |
| 54 | #define RGB_MATRIX_LED_COUNT 128 | 56 | #define RGB_MATRIX_LED_COUNT 128 |
| 55 | 57 | ||
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 <http://www.gnu.org/licenses/>. | |||
| 50 | #define RGB_BACKLIGHT_COLOR_1 { .h = 0, .s = 255 } | 50 | #define RGB_BACKLIGHT_COLOR_1 { .h = 0, .s = 255 } |
| 51 | #define RGB_BACKLIGHT_COLOR_2 { .h = 127, .s = 255 } | 51 | #define RGB_BACKLIGHT_COLOR_2 { .h = 127, .s = 255 } |
| 52 | 52 | ||
| 53 | #define IS31FL3733_I2C_ADDRESS_1 IS31FL3733_I2C_ADDRESS_GND_GND | ||
| 54 | #define IS31FL3733_I2C_ADDRESS_2 IS31FL3733_I2C_ADDRESS_GND_SDA | ||
| 53 | #define IS31FL3733_DRIVER_COUNT 2 | 55 | #define IS31FL3733_DRIVER_COUNT 2 |
| 54 | #define RGB_MATRIX_LED_COUNT 128 | 56 | #define RGB_MATRIX_LED_COUNT 128 |
| 55 | 57 | ||
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 <http://www.gnu.org/licenses/>. | |||
| 73 | #define RGB_BACKLIGHT_COLOR_1 { .h = 0, .s = 255 } | 73 | #define RGB_BACKLIGHT_COLOR_1 { .h = 0, .s = 255 } |
| 74 | #define RGB_BACKLIGHT_COLOR_2 { .h = 127, .s = 255 } | 74 | #define RGB_BACKLIGHT_COLOR_2 { .h = 127, .s = 255 } |
| 75 | 75 | ||
| 76 | #define IS31FL3731_I2C_ADDRESS_1 IS31FL3731_I2C_ADDRESS_GND | ||
| 76 | #define IS31FL3731_DRIVER_COUNT 1 | 77 | #define IS31FL3731_DRIVER_COUNT 1 |
| 77 | #define RGB_MATRIX_LED_COUNT 16 | 78 | #define RGB_MATRIX_LED_COUNT 16 |
| 78 | 79 | ||
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 <http://www.gnu.org/licenses/>. | |||
| 56 | #define RGB_BACKLIGHT_COLOR_1 { .h = 0, .s = 255 } | 56 | #define RGB_BACKLIGHT_COLOR_1 { .h = 0, .s = 255 } |
| 57 | #define RGB_BACKLIGHT_COLOR_2 { .h = 127, .s = 255 } | 57 | #define RGB_BACKLIGHT_COLOR_2 { .h = 127, .s = 255 } |
| 58 | 58 | ||
| 59 | #define IS31FL3733_I2C_ADDRESS_1 IS31FL3733_I2C_ADDRESS_GND_GND | ||
| 60 | #define IS31FL3733_I2C_ADDRESS_2 IS31FL3733_I2C_ADDRESS_GND_SDA | ||
| 59 | #define IS31FL3733_DRIVER_COUNT 2 | 61 | #define IS31FL3733_DRIVER_COUNT 2 |
| 60 | #define RGB_MATRIX_LED_COUNT 128 | 62 | #define RGB_MATRIX_LED_COUNT 128 |
| 61 | 63 | ||
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 <http://www.gnu.org/licenses/>. | |||
| 48 | 48 | ||
| 49 | #else | 49 | #else |
| 50 | // IS31FL3731 driver | 50 | // IS31FL3731 driver |
| 51 | #define IS31FL3731_I2C_ADDRESS_1 IS31FL3731_I2C_ADDRESS_GND | ||
| 52 | #define IS31FL3731_I2C_ADDRESS_2 IS31FL3731_I2C_ADDRESS_VCC | ||
| 51 | #define IS31FL3731_DRIVER_COUNT 2 | 53 | #define IS31FL3731_DRIVER_COUNT 2 |
| 52 | #define RGB_MATRIX_LED_COUNT 67 | 54 | #define RGB_MATRIX_LED_COUNT 67 |
| 53 | 55 | ||
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 <http://www.gnu.org/licenses/>. | |||
| 79 | # define DRIVER_INDICATOR_LED_TOTAL 0 | 79 | # define DRIVER_INDICATOR_LED_TOTAL 0 |
| 80 | #else | 80 | #else |
| 81 | // WT_RGB IS31FL3741 driver code | 81 | // WT_RGB IS31FL3741 driver code |
| 82 | # define IS31FL3741_I2C_ADDRESS_1 IS31FL3741_I2C_ADDRESS_GND | ||
| 82 | # define IS31FL3741_DRIVER_COUNT 1 | 83 | # define IS31FL3741_DRIVER_COUNT 1 |
| 83 | # define RGB_MATRIX_LED_COUNT 98 | 84 | # define RGB_MATRIX_LED_COUNT 98 |
| 84 | 85 | ||
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 @@ | |||
| 16 | #pragma once | 16 | #pragma once |
| 17 | 17 | ||
| 18 | // IS31FL3731 driver | 18 | // IS31FL3731 driver |
| 19 | #define IS31FL3731_I2C_ADDRESS_1 IS31FL3731_I2C_ADDRESS_GND | ||
| 20 | #define IS31FL3731_I2C_ADDRESS_2 IS31FL3731_I2C_ADDRESS_SDA | ||
| 19 | #define IS31FL3731_DRIVER_COUNT 2 | 21 | #define IS31FL3731_DRIVER_COUNT 2 |
| 20 | #define RGB_MATRIX_LED_COUNT 72 | 22 | #define RGB_MATRIX_LED_COUNT 72 |
| 21 | 23 | ||
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 @@ | |||
| 16 | #pragma once | 16 | #pragma once |
| 17 | 17 | ||
| 18 | // IS31FL3731 driver | 18 | // IS31FL3731 driver |
| 19 | #define IS31FL3731_I2C_ADDRESS_1 IS31FL3731_I2C_ADDRESS_GND | ||
| 20 | #define IS31FL3731_I2C_ADDRESS_2 IS31FL3731_I2C_ADDRESS_SDA | ||
| 19 | #define IS31FL3731_DRIVER_COUNT 2 | 21 | #define IS31FL3731_DRIVER_COUNT 2 |
| 20 | #define RGB_MATRIX_LED_COUNT 72 | 22 | #define RGB_MATRIX_LED_COUNT 72 |
| 21 | 23 | ||
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 @@ | |||
| 21 | #define LOCKING_RESYNC_ENABLE | 21 | #define LOCKING_RESYNC_ENABLE |
| 22 | 22 | ||
| 23 | // IS31FL3731 driver | 23 | // IS31FL3731 driver |
| 24 | #define IS31FL3731_I2C_ADDRESS_1 IS31FL3731_I2C_ADDRESS_GND | ||
| 24 | #define IS31FL3731_DRIVER_COUNT 1 | 25 | #define IS31FL3731_DRIVER_COUNT 1 |
| 25 | #define RGB_MATRIX_LED_COUNT 12 | 26 | #define RGB_MATRIX_LED_COUNT 12 |
| 26 | 27 | ||
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 @@ | |||
| 21 | #define LOCKING_RESYNC_ENABLE | 21 | #define LOCKING_RESYNC_ENABLE |
| 22 | 22 | ||
| 23 | // IS31FL3731 driver | 23 | // IS31FL3731 driver |
| 24 | #define IS31FL3731_I2C_ADDRESS_1 IS31FL3731_I2C_ADDRESS_GND | ||
| 25 | #define IS31FL3731_I2C_ADDRESS_2 IS31FL3731_I2C_ADDRESS_SDA | ||
| 24 | #define IS31FL3731_DRIVER_COUNT 2 | 26 | #define IS31FL3731_DRIVER_COUNT 2 |
| 25 | #define RGB_MATRIX_LED_COUNT 72 | 27 | #define RGB_MATRIX_LED_COUNT 72 |
| 26 | 28 | ||
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 @@ | |||
| 16 | #pragma once | 16 | #pragma once |
| 17 | 17 | ||
| 18 | // IS31FL3731 driver | 18 | // IS31FL3731 driver |
| 19 | #define IS31FL3731_I2C_ADDRESS_1 IS31FL3731_I2C_ADDRESS_GND | ||
| 20 | #define IS31FL3731_I2C_ADDRESS_2 IS31FL3731_I2C_ADDRESS_SDA | ||
| 19 | #define IS31FL3731_DRIVER_COUNT 2 | 21 | #define IS31FL3731_DRIVER_COUNT 2 |
| 20 | #define RGB_MATRIX_LED_COUNT 72 | 22 | #define RGB_MATRIX_LED_COUNT 72 |
| 21 | 23 | ||
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 @@ | |||
| 21 | #define LOCKING_RESYNC_ENABLE | 21 | #define LOCKING_RESYNC_ENABLE |
| 22 | 22 | ||
| 23 | // IS31FL3731 driver | 23 | // IS31FL3731 driver |
| 24 | #define IS31FL3731_I2C_ADDRESS_1 IS31FL3731_I2C_ADDRESS_GND | ||
| 25 | #define IS31FL3731_I2C_ADDRESS_2 IS31FL3731_I2C_ADDRESS_SDA | ||
| 24 | #define IS31FL3731_DRIVER_COUNT 2 | 26 | #define IS31FL3731_DRIVER_COUNT 2 |
| 25 | #define RGB_MATRIX_LED_COUNT 72 | 27 | #define RGB_MATRIX_LED_COUNT 72 |
| 26 | 28 | ||
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 @@ | |||
| 21 | #define LOCKING_RESYNC_ENABLE | 21 | #define LOCKING_RESYNC_ENABLE |
| 22 | 22 | ||
| 23 | // IS31FL3731 driver | 23 | // IS31FL3731 driver |
| 24 | #define IS31FL3731_I2C_ADDRESS_1 IS31FL3731_I2C_ADDRESS_GND | ||
| 25 | #define IS31FL3731_I2C_ADDRESS_2 IS31FL3731_I2C_ADDRESS_SDA | ||
| 24 | #define IS31FL3731_DRIVER_COUNT 2 | 26 | #define IS31FL3731_DRIVER_COUNT 2 |
| 25 | #define RGB_MATRIX_LED_COUNT 72 | 27 | #define RGB_MATRIX_LED_COUNT 72 |
| 26 | 28 | ||
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 @@ | |||
| 38 | //#define NO_ACTION_ONESHOT | 38 | //#define NO_ACTION_ONESHOT |
| 39 | 39 | ||
| 40 | // IS31FL3731 driver | 40 | // IS31FL3731 driver |
| 41 | #define IS31FL3731_I2C_ADDRESS_1 IS31FL3731_I2C_ADDRESS_GND | ||
| 42 | #define IS31FL3731_I2C_ADDRESS_2 IS31FL3731_I2C_ADDRESS_SDA | ||
| 43 | #define IS31FL3731_I2C_ADDRESS_3 IS31FL3731_I2C_ADDRESS_SCL | ||
| 41 | #define IS31FL3731_DRIVER_COUNT 3 | 44 | #define IS31FL3731_DRIVER_COUNT 3 |
| 42 | #define RGB_MATRIX_LED_COUNT 108 | 45 | #define RGB_MATRIX_LED_COUNT 108 |
| 43 | 46 | ||
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 @@ | |||
| 23 | 23 | ||
| 24 | 24 | ||
| 25 | // IS31FL3731 driver | 25 | // IS31FL3731 driver |
| 26 | #define IS31FL3731_I2C_ADDRESS_1 IS31FL3731_I2C_ADDRESS_GND | ||
| 27 | #define IS31FL3731_I2C_ADDRESS_2 IS31FL3731_I2C_ADDRESS_SDA | ||
| 26 | #define IS31FL3731_DRIVER_COUNT 2 | 28 | #define IS31FL3731_DRIVER_COUNT 2 |
| 27 | #define RGB_MATRIX_LED_COUNT 72 | 29 | #define RGB_MATRIX_LED_COUNT 72 |
| 28 | 30 | ||
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 @@ | |||
| 23 | 23 | ||
| 24 | 24 | ||
| 25 | // IS31FL3731 driver | 25 | // IS31FL3731 driver |
| 26 | #define IS31FL3731_I2C_ADDRESS_1 IS31FL3731_I2C_ADDRESS_GND | ||
| 27 | #define IS31FL3731_I2C_ADDRESS_2 IS31FL3731_I2C_ADDRESS_SDA | ||
| 26 | #define IS31FL3731_DRIVER_COUNT 2 | 28 | #define IS31FL3731_DRIVER_COUNT 2 |
| 27 | #define RGB_MATRIX_LED_COUNT 72 | 29 | #define RGB_MATRIX_LED_COUNT 72 |
| 28 | 30 | ||
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 @@ | |||
| 23 | 23 | ||
| 24 | 24 | ||
| 25 | // IS31FL3731 driver | 25 | // IS31FL3731 driver |
| 26 | #define IS31FL3731_I2C_ADDRESS_1 IS31FL3731_I2C_ADDRESS_GND | ||
| 27 | #define IS31FL3731_I2C_ADDRESS_2 IS31FL3731_I2C_ADDRESS_SDA | ||
| 26 | #define IS31FL3731_DRIVER_COUNT 2 | 28 | #define IS31FL3731_DRIVER_COUNT 2 |
| 27 | #define RGB_MATRIX_LED_COUNT 72 | 29 | #define RGB_MATRIX_LED_COUNT 72 |
| 28 | 30 | ||
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) | |||
| 469 | 469 | ||
| 470 | void backlight_update_pwm_buffers(void) | 470 | void backlight_update_pwm_buffers(void) |
| 471 | { | 471 | { |
| 472 | is31fl3736_update_pwm_buffers(IS31FL3736_I2C_ADDRESS_1, 0); | 472 | is31fl3736_flush(); |
| 473 | } | 473 | } |
| 474 | 474 | ||
| 475 | bool process_record_backlight(uint16_t keycode, keyrecord_t *record) | 475 | 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 @@ | |||
| 16 | #pragma once | 16 | #pragma once |
| 17 | 17 | ||
| 18 | // IS31FL3731 driver | 18 | // IS31FL3731 driver |
| 19 | #define IS31FL3731_I2C_ADDRESS_1 IS31FL3731_I2C_ADDRESS_GND | ||
| 20 | #define IS31FL3731_I2C_ADDRESS_2 IS31FL3731_I2C_ADDRESS_SDA | ||
| 19 | #define IS31FL3731_DRIVER_COUNT 2 | 21 | #define IS31FL3731_DRIVER_COUNT 2 |
| 20 | #define RGB_MATRIX_LED_COUNT 72 | 22 | #define RGB_MATRIX_LED_COUNT 72 |
| 21 | 23 | ||
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 @@ | |||
| 16 | #pragma once | 16 | #pragma once |
| 17 | 17 | ||
| 18 | // IS31FL3731 driver | 18 | // IS31FL3731 driver |
| 19 | #define IS31FL3731_I2C_ADDRESS_1 IS31FL3731_I2C_ADDRESS_GND | ||
| 20 | #define IS31FL3731_I2C_ADDRESS_2 IS31FL3731_I2C_ADDRESS_SDA | ||
| 19 | #define IS31FL3731_DRIVER_COUNT 2 | 21 | #define IS31FL3731_DRIVER_COUNT 2 |
| 20 | #define RGB_MATRIX_LED_COUNT 72 | 22 | #define RGB_MATRIX_LED_COUNT 72 |
| 21 | 23 | ||
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 @@ | |||
| 16 | #pragma once | 16 | #pragma once |
| 17 | 17 | ||
| 18 | // IS31FL3731 driver | 18 | // IS31FL3731 driver |
| 19 | #define IS31FL3731_I2C_ADDRESS_1 IS31FL3731_I2C_ADDRESS_GND | ||
| 20 | #define IS31FL3731_I2C_ADDRESS_2 IS31FL3731_I2C_ADDRESS_SDA | ||
| 19 | #define IS31FL3731_DRIVER_COUNT 2 | 21 | #define IS31FL3731_DRIVER_COUNT 2 |
| 20 | #define RGB_MATRIX_LED_COUNT 64 | 22 | #define RGB_MATRIX_LED_COUNT 64 |
| 21 | 23 | ||
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) { | |||
| 226 | is31fl3741_update_led_control_registers(IS31FL3741_I2C_ADDRESS_1, 0); | 226 | is31fl3741_update_led_control_registers(IS31FL3741_I2C_ADDRESS_1, 0); |
| 227 | } | 227 | } |
| 228 | 228 | ||
| 229 | static void flush(void) { | ||
| 230 | is31fl3741_update_pwm_buffers(IS31FL3741_I2C_ADDRESS_1, 0); | ||
| 231 | } | ||
| 232 | |||
| 233 | const rgb_matrix_driver_t rgb_matrix_driver = { | 229 | const rgb_matrix_driver_t rgb_matrix_driver = { |
| 234 | .init = init, | 230 | .init = init, |
| 235 | .flush = flush, | 231 | .flush = is31fl3741_flush, |
| 236 | .set_color = is31fl3741_set_color, | 232 | .set_color = is31fl3741_set_color, |
| 237 | .set_color_all = is31fl3741_set_color_all | 233 | .set_color_all = is31fl3741_set_color_all |
| 238 | }; | 234 | }; |
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) { | |||
| 232 | is31fl3741_update_led_control_registers(IS31FL3741_I2C_ADDRESS_1, 0); | 232 | is31fl3741_update_led_control_registers(IS31FL3741_I2C_ADDRESS_1, 0); |
| 233 | } | 233 | } |
| 234 | 234 | ||
| 235 | static void flush(void) { | ||
| 236 | is31fl3741_update_pwm_buffers(IS31FL3741_I2C_ADDRESS_1, 0); | ||
| 237 | } | ||
| 238 | |||
| 239 | const rgb_matrix_driver_t rgb_matrix_driver = { | 235 | const rgb_matrix_driver_t rgb_matrix_driver = { |
| 240 | .init = init, | 236 | .init = init, |
| 241 | .flush = flush, | 237 | .flush = is31fl3741_flush, |
| 242 | .set_color = is31fl3741_set_color, | 238 | .set_color = is31fl3741_set_color, |
| 243 | .set_color_all = is31fl3741_set_color_all | 239 | .set_color_all = is31fl3741_set_color_all |
| 244 | }; | 240 | }; |
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) { | |||
| 249 | } | 249 | } |
| 250 | 250 | ||
| 251 | # if defined(LED_MATRIX_IS31FL3218) | 251 | # if defined(LED_MATRIX_IS31FL3218) |
| 252 | static void flush(void) { | ||
| 253 | is31fl3218_update_pwm_buffers(); | ||
| 254 | } | ||
| 255 | |||
| 256 | const led_matrix_driver_t led_matrix_driver = { | 252 | const led_matrix_driver_t led_matrix_driver = { |
| 257 | .init = init, | 253 | .init = init, |
| 258 | .flush = flush, | 254 | .flush = is31fl3218_update_pwm_buffers, |
| 259 | .set_value = is31fl3218_set_value, | 255 | .set_value = is31fl3218_set_value, |
| 260 | .set_value_all = is31fl3218_set_value_all, | 256 | .set_value_all = is31fl3218_set_value_all, |
| 261 | }; | 257 | }; |
| 262 | 258 | ||
| 263 | # elif defined(LED_MATRIX_IS31FL3731) | 259 | # elif defined(LED_MATRIX_IS31FL3731) |
| 264 | static void flush(void) { | ||
| 265 | is31fl3731_update_pwm_buffers(IS31FL3731_I2C_ADDRESS_1, 0); | ||
| 266 | # if defined(IS31FL3731_I2C_ADDRESS_2) | ||
| 267 | is31fl3731_update_pwm_buffers(IS31FL3731_I2C_ADDRESS_2, 1); | ||
| 268 | # if defined(IS31FL3731_I2C_ADDRESS_3) | ||
| 269 | is31fl3731_update_pwm_buffers(IS31FL3731_I2C_ADDRESS_3, 2); | ||
| 270 | # if defined(IS31FL3731_I2C_ADDRESS_4) | ||
| 271 | is31fl3731_update_pwm_buffers(IS31FL3731_I2C_ADDRESS_4, 3); | ||
| 272 | # endif | ||
| 273 | # endif | ||
| 274 | # endif | ||
| 275 | } | ||
| 276 | |||
| 277 | const led_matrix_driver_t led_matrix_driver = { | 260 | const led_matrix_driver_t led_matrix_driver = { |
| 278 | .init = init, | 261 | .init = init, |
| 279 | .flush = flush, | 262 | .flush = is31fl3731_flush, |
| 280 | .set_value = is31fl3731_set_value, | 263 | .set_value = is31fl3731_set_value, |
| 281 | .set_value_all = is31fl3731_set_value_all, | 264 | .set_value_all = is31fl3731_set_value_all, |
| 282 | }; | 265 | }; |
| 283 | 266 | ||
| 284 | # elif defined(LED_MATRIX_IS31FL3733) | 267 | # elif defined(LED_MATRIX_IS31FL3733) |
| 285 | static void flush(void) { | ||
| 286 | is31fl3733_update_pwm_buffers(IS31FL3733_I2C_ADDRESS_1, 0); | ||
| 287 | # if defined(IS31FL3733_I2C_ADDRESS_2) | ||
| 288 | is31fl3733_update_pwm_buffers(IS31FL3733_I2C_ADDRESS_2, 1); | ||
| 289 | # if defined(IS31FL3733_I2C_ADDRESS_3) | ||
| 290 | is31fl3733_update_pwm_buffers(IS31FL3733_I2C_ADDRESS_3, 2); | ||
| 291 | # if defined(IS31FL3733_I2C_ADDRESS_4) | ||
| 292 | is31fl3733_update_pwm_buffers(IS31FL3733_I2C_ADDRESS_4, 3); | ||
| 293 | # endif | ||
| 294 | # endif | ||
| 295 | # endif | ||
| 296 | } | ||
| 297 | |||
| 298 | const led_matrix_driver_t led_matrix_driver = { | 268 | const led_matrix_driver_t led_matrix_driver = { |
| 299 | .init = init, | 269 | .init = init, |
| 300 | .flush = flush, | 270 | .flush = is31fl3733_flush, |
| 301 | .set_value = is31fl3733_set_value, | 271 | .set_value = is31fl3733_set_value, |
| 302 | .set_value_all = is31fl3733_set_value_all, | 272 | .set_value_all = is31fl3733_set_value_all, |
| 303 | }; | 273 | }; |
| 304 | 274 | ||
| 305 | # elif defined(LED_MATRIX_IS31FL3736) | 275 | # elif defined(LED_MATRIX_IS31FL3736) |
| 306 | static void flush(void) { | ||
| 307 | is31fl3736_update_pwm_buffers(IS31FL3736_I2C_ADDRESS_1, 0); | ||
| 308 | # if defined(IS31FL3736_I2C_ADDRESS_2) | ||
| 309 | is31fl3736_update_pwm_buffers(IS31FL3736_I2C_ADDRESS_2, 1); | ||
| 310 | # if defined(IS31FL3736_I2C_ADDRESS_3) | ||
| 311 | is31fl3736_update_pwm_buffers(IS31FL3736_I2C_ADDRESS_3, 2); | ||
| 312 | # if defined(IS31FL3736_I2C_ADDRESS_4) | ||
| 313 | is31fl3736_update_pwm_buffers(IS31FL3736_I2C_ADDRESS_4, 3); | ||
| 314 | # endif | ||
| 315 | # endif | ||
| 316 | # endif | ||
| 317 | } | ||
| 318 | |||
| 319 | const led_matrix_driver_t led_matrix_driver = { | 276 | const led_matrix_driver_t led_matrix_driver = { |
| 320 | .init = init, | 277 | .init = init, |
| 321 | .flush = flush, | 278 | .flush = is31fl3736_flush, |
| 322 | .set_value = is31fl3736_set_value, | 279 | .set_value = is31fl3736_set_value, |
| 323 | .set_value_all = is31fl3736_set_value_all, | 280 | .set_value_all = is31fl3736_set_value_all, |
| 324 | }; | 281 | }; |
| 325 | 282 | ||
| 326 | # elif defined(LED_MATRIX_IS31FL3737) | 283 | # elif defined(LED_MATRIX_IS31FL3737) |
| 327 | static void flush(void) { | ||
| 328 | is31fl3737_update_pwm_buffers(IS31FL3737_I2C_ADDRESS_1, 0); | ||
| 329 | # if defined(IS31FL3737_I2C_ADDRESS_2) | ||
| 330 | is31fl3737_update_pwm_buffers(IS31FL3737_I2C_ADDRESS_2, 1); | ||
| 331 | # if defined(IS31FL3737_I2C_ADDRESS_3) | ||
| 332 | is31fl3737_update_pwm_buffers(IS31FL3737_I2C_ADDRESS_3, 2); | ||
| 333 | # if defined(IS31FL3737_I2C_ADDRESS_4) | ||
| 334 | is31fl3737_update_pwm_buffers(IS31FL3737_I2C_ADDRESS_4, 3); | ||
| 335 | # endif | ||
| 336 | # endif | ||
| 337 | # endif | ||
| 338 | } | ||
| 339 | |||
| 340 | const led_matrix_driver_t led_matrix_driver = { | 284 | const led_matrix_driver_t led_matrix_driver = { |
| 341 | .init = init, | 285 | .init = init, |
| 342 | .flush = flush, | 286 | .flush = is31fl3737_flush, |
| 343 | .set_value = is31fl3737_set_value, | 287 | .set_value = is31fl3737_set_value, |
| 344 | .set_value_all = is31fl3737_set_value_all, | 288 | .set_value_all = is31fl3737_set_value_all, |
| 345 | }; | 289 | }; |
| 346 | 290 | ||
| 347 | # elif defined(LED_MATRIX_IS31FL3741) | 291 | # elif defined(LED_MATRIX_IS31FL3741) |
| 348 | static void flush(void) { | ||
| 349 | is31fl3741_update_pwm_buffers(IS31FL3741_I2C_ADDRESS_1, 0); | ||
| 350 | # if defined(IS31FL3741_I2C_ADDRESS_2) | ||
| 351 | is31fl3741_update_pwm_buffers(IS31FL3741_I2C_ADDRESS_2, 1); | ||
| 352 | # if defined(IS31FL3741_I2C_ADDRESS_3) | ||
| 353 | is31fl3741_update_pwm_buffers(IS31FL3741_I2C_ADDRESS_3, 2); | ||
| 354 | # if defined(IS31FL3741_I2C_ADDRESS_4) | ||
| 355 | is31fl3741_update_pwm_buffers(IS31FL3741_I2C_ADDRESS_4, 3); | ||
| 356 | # endif | ||
| 357 | # endif | ||
| 358 | # endif | ||
| 359 | } | ||
| 360 | |||
| 361 | const led_matrix_driver_t led_matrix_driver = { | 292 | const led_matrix_driver_t led_matrix_driver = { |
| 362 | .init = init, | 293 | .init = init, |
| 363 | .flush = flush, | 294 | .flush = is31fl3741_flush, |
| 364 | .set_value = is31fl3741_set_value, | 295 | .set_value = is31fl3741_set_value, |
| 365 | .set_value_all = is31fl3741_set_value_all, | 296 | .set_value_all = is31fl3741_set_value_all, |
| 366 | }; | 297 | }; |
| 367 | 298 | ||
| 368 | # elif defined(IS31FLCOMMON) | 299 | # elif defined(IS31FLCOMMON) |
| 369 | static void flush(void) { | ||
| 370 | IS31FL_common_update_pwm_register(DRIVER_ADDR_1, 0); | ||
| 371 | # if defined(LED_DRIVER_ADDR_2) | ||
| 372 | IS31FL_common_update_pwm_register(DRIVER_ADDR_2, 1); | ||
| 373 | # if defined(LED_DRIVER_ADDR_3) | ||
| 374 | IS31FL_common_update_pwm_register(DRIVER_ADDR_3, 2); | ||
| 375 | # if defined(LED_DRIVER_ADDR_4) | ||
| 376 | IS31FL_common_update_pwm_register(DRIVER_ADDR_4, 3); | ||
| 377 | # endif | ||
| 378 | # endif | ||
| 379 | # endif | ||
| 380 | } | ||
| 381 | |||
| 382 | const led_matrix_driver_t led_matrix_driver = { | 300 | const led_matrix_driver_t led_matrix_driver = { |
| 383 | .init = init, | 301 | .init = init, |
| 384 | .flush = flush, | 302 | .flush = IS31FL_common_flush, |
| 385 | .set_value = IS31FL_simple_set_brightness, | 303 | .set_value = IS31FL_simple_set_brightness, |
| 386 | .set_value_all = IS31FL_simple_set_brigntness_all, | 304 | .set_value_all = IS31FL_simple_set_brigntness_all, |
| 387 | }; | 305 | }; |
| 388 | # elif defined(LED_MATRIX_SNLED27351) | 306 | # elif defined(LED_MATRIX_SNLED27351) |
| 389 | static void flush(void) { | ||
| 390 | snled27351_update_pwm_buffers(SNLED27351_I2C_ADDRESS_1, 0); | ||
| 391 | # if defined(SNLED27351_I2C_ADDRESS_2) | ||
| 392 | snled27351_update_pwm_buffers(SNLED27351_I2C_ADDRESS_2, 1); | ||
| 393 | # if defined(SNLED27351_I2C_ADDRESS_3) | ||
| 394 | snled27351_update_pwm_buffers(SNLED27351_I2C_ADDRESS_3, 2); | ||
| 395 | # if defined(SNLED27351_I2C_ADDRESS_4) | ||
| 396 | snled27351_update_pwm_buffers(SNLED27351_I2C_ADDRESS_4, 3); | ||
| 397 | # endif | ||
| 398 | # endif | ||
| 399 | # endif | ||
| 400 | } | ||
| 401 | |||
| 402 | const led_matrix_driver_t led_matrix_driver = { | 307 | const led_matrix_driver_t led_matrix_driver = { |
| 403 | .init = init, | 308 | .init = init, |
| 404 | .flush = flush, | 309 | .flush = snled27351_flush, |
| 405 | .set_value = snled27351_set_value, | 310 | .set_value = snled27351_set_value, |
| 406 | .set_value_all = snled27351_set_value_all, | 311 | .set_value_all = snled27351_set_value_all, |
| 407 | }; | 312 | }; |
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) { | |||
| 247 | } | 247 | } |
| 248 | 248 | ||
| 249 | # if defined(RGB_MATRIX_IS31FL3218) | 249 | # if defined(RGB_MATRIX_IS31FL3218) |
| 250 | static void flush(void) { | ||
| 251 | is31fl3218_update_pwm_buffers(); | ||
| 252 | } | ||
| 253 | |||
| 254 | const rgb_matrix_driver_t rgb_matrix_driver = { | 250 | const rgb_matrix_driver_t rgb_matrix_driver = { |
| 255 | .init = init, | 251 | .init = init, |
| 256 | .flush = flush, | 252 | .flush = is31fl3218_update_pwm_buffers, |
| 257 | .set_color = is31fl3218_set_color, | 253 | .set_color = is31fl3218_set_color, |
| 258 | .set_color_all = is31fl3218_set_color_all, | 254 | .set_color_all = is31fl3218_set_color_all, |
| 259 | }; | 255 | }; |
| 260 | 256 | ||
| 261 | # elif defined(RGB_MATRIX_IS31FL3731) | 257 | # elif defined(RGB_MATRIX_IS31FL3731) |
| 262 | static void flush(void) { | ||
| 263 | is31fl3731_update_pwm_buffers(IS31FL3731_I2C_ADDRESS_1, 0); | ||
| 264 | # if defined(IS31FL3731_I2C_ADDRESS_2) | ||
| 265 | is31fl3731_update_pwm_buffers(IS31FL3731_I2C_ADDRESS_2, 1); | ||
| 266 | # if defined(IS31FL3731_I2C_ADDRESS_3) | ||
| 267 | is31fl3731_update_pwm_buffers(IS31FL3731_I2C_ADDRESS_3, 2); | ||
| 268 | # if defined(IS31FL3731_I2C_ADDRESS_4) | ||
| 269 | is31fl3731_update_pwm_buffers(IS31FL3731_I2C_ADDRESS_4, 3); | ||
| 270 | # endif | ||
| 271 | # endif | ||
| 272 | # endif | ||
| 273 | } | ||
| 274 | |||
| 275 | const rgb_matrix_driver_t rgb_matrix_driver = { | 258 | const rgb_matrix_driver_t rgb_matrix_driver = { |
| 276 | .init = init, | 259 | .init = init, |
| 277 | .flush = flush, | 260 | .flush = is31fl3731_flush, |
| 278 | .set_color = is31fl3731_set_color, | 261 | .set_color = is31fl3731_set_color, |
| 279 | .set_color_all = is31fl3731_set_color_all, | 262 | .set_color_all = is31fl3731_set_color_all, |
| 280 | }; | 263 | }; |
| 281 | 264 | ||
| 282 | # elif defined(RGB_MATRIX_IS31FL3733) | 265 | # elif defined(RGB_MATRIX_IS31FL3733) |
| 283 | static void flush(void) { | ||
| 284 | is31fl3733_update_pwm_buffers(IS31FL3733_I2C_ADDRESS_1, 0); | ||
| 285 | # if defined(IS31FL3733_I2C_ADDRESS_2) | ||
| 286 | is31fl3733_update_pwm_buffers(IS31FL3733_I2C_ADDRESS_2, 1); | ||
| 287 | # if defined(IS31FL3733_I2C_ADDRESS_3) | ||
| 288 | is31fl3733_update_pwm_buffers(IS31FL3733_I2C_ADDRESS_3, 2); | ||
| 289 | # if defined(IS31FL3733_I2C_ADDRESS_4) | ||
| 290 | is31fl3733_update_pwm_buffers(IS31FL3733_I2C_ADDRESS_4, 3); | ||
| 291 | # endif | ||
| 292 | # endif | ||
| 293 | # endif | ||
| 294 | } | ||
| 295 | |||
| 296 | const rgb_matrix_driver_t rgb_matrix_driver = { | 266 | const rgb_matrix_driver_t rgb_matrix_driver = { |
| 297 | .init = init, | 267 | .init = init, |
| 298 | .flush = flush, | 268 | .flush = is31fl3733_flush, |
| 299 | .set_color = is31fl3733_set_color, | 269 | .set_color = is31fl3733_set_color, |
| 300 | .set_color_all = is31fl3733_set_color_all, | 270 | .set_color_all = is31fl3733_set_color_all, |
| 301 | }; | 271 | }; |
| 302 | 272 | ||
| 303 | # elif defined(RGB_MATRIX_IS31FL3736) | 273 | # elif defined(RGB_MATRIX_IS31FL3736) |
| 304 | static void flush(void) { | ||
| 305 | is31fl3736_update_pwm_buffers(IS31FL3736_I2C_ADDRESS_1, 0); | ||
| 306 | # if defined(IS31FL3736_I2C_ADDRESS_2) | ||
| 307 | is31fl3736_update_pwm_buffers(IS31FL3736_I2C_ADDRESS_2, 1); | ||
| 308 | # if defined(IS31FL3736_I2C_ADDRESS_3) | ||
| 309 | is31fl3736_update_pwm_buffers(IS31FL3736_I2C_ADDRESS_3, 2); | ||
| 310 | # if defined(IS31FL3736_I2C_ADDRESS_4) | ||
| 311 | is31fl3736_update_pwm_buffers(IS31FL3736_I2C_ADDRESS_4, 3); | ||
| 312 | # endif | ||
| 313 | # endif | ||
| 314 | # endif | ||
| 315 | } | ||
| 316 | |||
| 317 | const rgb_matrix_driver_t rgb_matrix_driver = { | 274 | const rgb_matrix_driver_t rgb_matrix_driver = { |
| 318 | .init = init, | 275 | .init = init, |
| 319 | .flush = flush, | 276 | .flush = is31fl3736_flush, |
| 320 | .set_color = is31fl3736_set_color, | 277 | .set_color = is31fl3736_set_color, |
| 321 | .set_color_all = is31fl3736_set_color_all, | 278 | .set_color_all = is31fl3736_set_color_all, |
| 322 | }; | 279 | }; |
| 323 | 280 | ||
| 324 | # elif defined(RGB_MATRIX_IS31FL3737) | 281 | # elif defined(RGB_MATRIX_IS31FL3737) |
| 325 | static void flush(void) { | ||
| 326 | is31fl3737_update_pwm_buffers(IS31FL3737_I2C_ADDRESS_1, 0); | ||
| 327 | # if defined(IS31FL3737_I2C_ADDRESS_2) | ||
| 328 | is31fl3737_update_pwm_buffers(IS31FL3737_I2C_ADDRESS_2, 1); | ||
| 329 | # if defined(IS31FL3737_I2C_ADDRESS_3) | ||
| 330 | is31fl3737_update_pwm_buffers(IS31FL3737_I2C_ADDRESS_3, 2); | ||
| 331 | # if defined(IS31FL3737_I2C_ADDRESS_4) | ||
| 332 | is31fl3737_update_pwm_buffers(IS31FL3737_I2C_ADDRESS_4, 3); | ||
| 333 | # endif | ||
| 334 | # endif | ||
| 335 | # endif | ||
| 336 | } | ||
| 337 | |||
| 338 | const rgb_matrix_driver_t rgb_matrix_driver = { | 282 | const rgb_matrix_driver_t rgb_matrix_driver = { |
| 339 | .init = init, | 283 | .init = init, |
| 340 | .flush = flush, | 284 | .flush = is31fl3737_flush, |
| 341 | .set_color = is31fl3737_set_color, | 285 | .set_color = is31fl3737_set_color, |
| 342 | .set_color_all = is31fl3737_set_color_all, | 286 | .set_color_all = is31fl3737_set_color_all, |
| 343 | }; | 287 | }; |
| 344 | 288 | ||
| 345 | # elif defined(RGB_MATRIX_IS31FL3741) | 289 | # elif defined(RGB_MATRIX_IS31FL3741) |
| 346 | static void flush(void) { | ||
| 347 | is31fl3741_update_pwm_buffers(IS31FL3741_I2C_ADDRESS_1, 0); | ||
| 348 | # if defined(IS31FL3741_I2C_ADDRESS_2) | ||
| 349 | is31fl3741_update_pwm_buffers(IS31FL3741_I2C_ADDRESS_2, 1); | ||
| 350 | # if defined(IS31FL3741_I2C_ADDRESS_3) | ||
| 351 | is31fl3741_update_pwm_buffers(IS31FL3741_I2C_ADDRESS_3, 2); | ||
| 352 | # if defined(IS31FL3741_I2C_ADDRESS_4) | ||
| 353 | is31fl3741_update_pwm_buffers(IS31FL3741_I2C_ADDRESS_4, 3); | ||
| 354 | # endif | ||
| 355 | # endif | ||
| 356 | # endif | ||
| 357 | } | ||
| 358 | |||
| 359 | const rgb_matrix_driver_t rgb_matrix_driver = { | 290 | const rgb_matrix_driver_t rgb_matrix_driver = { |
| 360 | .init = init, | 291 | .init = init, |
| 361 | .flush = flush, | 292 | .flush = is31fl3741_flush, |
| 362 | .set_color = is31fl3741_set_color, | 293 | .set_color = is31fl3741_set_color, |
| 363 | .set_color_all = is31fl3741_set_color_all, | 294 | .set_color_all = is31fl3741_set_color_all, |
| 364 | }; | 295 | }; |
| 365 | 296 | ||
| 366 | # elif defined(IS31FLCOMMON) | 297 | # elif defined(IS31FLCOMMON) |
| 367 | static void flush(void) { | ||
| 368 | IS31FL_common_update_pwm_register(DRIVER_ADDR_1, 0); | ||
| 369 | # if defined(DRIVER_ADDR_2) | ||
| 370 | IS31FL_common_update_pwm_register(DRIVER_ADDR_2, 1); | ||
| 371 | # if defined(DRIVER_ADDR_3) | ||
| 372 | IS31FL_common_update_pwm_register(DRIVER_ADDR_3, 2); | ||
| 373 | # if defined(DRIVER_ADDR_4) | ||
| 374 | IS31FL_common_update_pwm_register(DRIVER_ADDR_4, 3); | ||
| 375 | # endif | ||
| 376 | # endif | ||
| 377 | # endif | ||
| 378 | } | ||
| 379 | |||
| 380 | const rgb_matrix_driver_t rgb_matrix_driver = { | 298 | const rgb_matrix_driver_t rgb_matrix_driver = { |
| 381 | .init = init, | 299 | .init = init, |
| 382 | .flush = flush, | 300 | .flush = IS31FL_common_flush, |
| 383 | .set_color = IS31FL_RGB_set_color, | 301 | .set_color = IS31FL_RGB_set_color, |
| 384 | .set_color_all = IS31FL_RGB_set_color_all, | 302 | .set_color_all = IS31FL_RGB_set_color_all, |
| 385 | }; | 303 | }; |
| 386 | 304 | ||
| 387 | # elif defined(RGB_MATRIX_SNLED27351) | 305 | # elif defined(RGB_MATRIX_SNLED27351) |
| 388 | static void flush(void) { | ||
| 389 | snled27351_update_pwm_buffers(SNLED27351_I2C_ADDRESS_1, 0); | ||
| 390 | # if defined(SNLED27351_I2C_ADDRESS_2) | ||
| 391 | snled27351_update_pwm_buffers(SNLED27351_I2C_ADDRESS_2, 1); | ||
| 392 | # if defined(SNLED27351_I2C_ADDRESS_3) | ||
| 393 | snled27351_update_pwm_buffers(SNLED27351_I2C_ADDRESS_3, 2); | ||
| 394 | # if defined(SNLED27351_I2C_ADDRESS_4) | ||
| 395 | snled27351_update_pwm_buffers(SNLED27351_I2C_ADDRESS_4, 3); | ||
| 396 | # endif | ||
| 397 | # endif | ||
| 398 | # endif | ||
| 399 | } | ||
| 400 | |||
| 401 | const rgb_matrix_driver_t rgb_matrix_driver = { | 306 | const rgb_matrix_driver_t rgb_matrix_driver = { |
| 402 | .init = init, | 307 | .init = init, |
| 403 | .flush = flush, | 308 | .flush = snled27351_flush, |
| 404 | .set_color = snled27351_set_color, | 309 | .set_color = snled27351_set_color, |
| 405 | .set_color_all = snled27351_set_color_all, | 310 | .set_color_all = snled27351_set_color_all, |
| 406 | }; | 311 | }; |
| @@ -418,16 +323,9 @@ static void init(void) { | |||
| 418 | # endif | 323 | # endif |
| 419 | } | 324 | } |
| 420 | 325 | ||
| 421 | static void flush(void) { | ||
| 422 | aw20216s_update_pwm_buffers(AW20216S_CS_PIN_1, 0); | ||
| 423 | # if defined(AW20216S_CS_PIN_2) | ||
| 424 | aw20216s_update_pwm_buffers(AW20216S_CS_PIN_2, 1); | ||
| 425 | # endif | ||
| 426 | } | ||
| 427 | |||
| 428 | const rgb_matrix_driver_t rgb_matrix_driver = { | 326 | const rgb_matrix_driver_t rgb_matrix_driver = { |
| 429 | .init = init, | 327 | .init = init, |
| 430 | .flush = flush, | 328 | .flush = aw20216s_flush, |
| 431 | .set_color = aw20216s_set_color, | 329 | .set_color = aw20216s_set_color, |
| 432 | .set_color_all = aw20216s_set_color_all, | 330 | .set_color_all = aw20216s_set_color_all, |
| 433 | }; | 331 | }; |
