summaryrefslogtreecommitdiff
path: root/keyboards/matrix
diff options
context:
space:
mode:
authorRyan <fauxpark@gmail.com>2023-11-01 11:53:45 +1100
committerGitHub <noreply@github.com>2023-11-01 00:53:45 +0000
commitb52aca0af83fade24c56b4bb7369f18183123bd3 (patch)
tree9b553c4b771717cc334f3c8683052bc701472c4d /keyboards/matrix
parenteac8e6788871a087eafdc5492eee425a7205d727 (diff)
Relocate LED driver init code (#22365)
Diffstat (limited to 'keyboards/matrix')
-rw-r--r--keyboards/matrix/m20add/config.h2
-rw-r--r--keyboards/matrix/m20add/rgb_ring.c10
2 files changed, 3 insertions, 9 deletions
diff --git a/keyboards/matrix/m20add/config.h b/keyboards/matrix/m20add/config.h
index aba2357357..51b050ca7c 100644
--- a/keyboards/matrix/m20add/config.h
+++ b/keyboards/matrix/m20add/config.h
@@ -80,4 +80,4 @@
#define IS31FL3731_I2C_ADDRESS_1 IS31FL3731_I2C_ADDRESS_GND
#define IS31FL3731_DRIVER_COUNT 1
-#define RGB_MATRIX_LED_COUNT 20
+#define IS31FL3731_LED_COUNT 20
diff --git a/keyboards/matrix/m20add/rgb_ring.c b/keyboards/matrix/m20add/rgb_ring.c
index 553a3d5360..f3fbe83d72 100644
--- a/keyboards/matrix/m20add/rgb_ring.c
+++ b/keyboards/matrix/m20add/rgb_ring.c
@@ -30,7 +30,7 @@
#endif
// rgb ring leds setting
-const is31fl3731_led_t PROGMEM g_is31fl3731_leds[RGB_MATRIX_LED_COUNT] = {
+const is31fl3731_led_t PROGMEM g_is31fl3731_leds[IS31FL3731_LED_COUNT] = {
/* Refer to IS31 manual for these locations
* driver
* | R location
@@ -371,13 +371,7 @@ void rgblight_call_driver(rgb_led_t *start_led, uint8_t num_leds)
void rgb_ring_init(void)
{
- i2c_init();
- is31fl3731_init(IS31FL3731_I2C_ADDRESS_1);
- for (int index = 0; index < RGB_MATRIX_LED_COUNT; index++) {
- bool enabled = true;
- is31fl3731_set_led_control_register(index, enabled, enabled, enabled);
- }
- is31fl3731_update_led_control_registers(IS31FL3731_I2C_ADDRESS_1, 0);
+ is31fl3731_init_drivers();
}
void rgb_ring_task(void)