diff options
author | Ryan <[email protected]> | 2023-11-01 11:53:45 +1100 |
---|---|---|
committer | GitHub <[email protected]> | 2023-11-01 00:53:45 +0000 |
commit | b52aca0af83fade24c56b4bb7369f18183123bd3 (patch) | |
tree | 9b553c4b771717cc334f3c8683052bc701472c4d /keyboards/wilba_tech | |
parent | eac8e6788871a087eafdc5492eee425a7205d727 (diff) | |
download | qmk_firmware-b52aca0af83fade24c56b4bb7369f18183123bd3.tar.gz qmk_firmware-b52aca0af83fade24c56b4bb7369f18183123bd3.zip |
Relocate LED driver init code (#22365)
Diffstat (limited to 'keyboards/wilba_tech')
23 files changed, 56 insertions, 63 deletions
diff --git a/keyboards/wilba_tech/rama_works_kara/config.h b/keyboards/wilba_tech/rama_works_kara/config.h index 5d8c9df820..09aac7a552 100644 --- a/keyboards/wilba_tech/rama_works_kara/config.h +++ b/keyboards/wilba_tech/rama_works_kara/config.h @@ -19,7 +19,7 @@ #define IS31FL3731_I2C_ADDRESS_1 IS31FL3731_I2C_ADDRESS_GND #define IS31FL3731_I2C_ADDRESS_2 IS31FL3731_I2C_ADDRESS_SDA #define IS31FL3731_DRIVER_COUNT 2 -#define RGB_MATRIX_LED_COUNT 72 +#define IS31FL3731_LED_COUNT 72 // Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/wilba_tech/rama_works_koyu/config.h b/keyboards/wilba_tech/rama_works_koyu/config.h index aad4cd12ac..512cff857b 100644 --- a/keyboards/wilba_tech/rama_works_koyu/config.h +++ b/keyboards/wilba_tech/rama_works_koyu/config.h @@ -19,7 +19,7 @@ #define IS31FL3731_I2C_ADDRESS_1 IS31FL3731_I2C_ADDRESS_GND #define IS31FL3731_I2C_ADDRESS_2 IS31FL3731_I2C_ADDRESS_SDA #define IS31FL3731_DRIVER_COUNT 2 -#define RGB_MATRIX_LED_COUNT 72 +#define IS31FL3731_LED_COUNT 72 // Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/wilba_tech/rama_works_m10_c/config.h b/keyboards/wilba_tech/rama_works_m10_c/config.h index 529896f6ed..1e0d943b96 100644 --- a/keyboards/wilba_tech/rama_works_m10_c/config.h +++ b/keyboards/wilba_tech/rama_works_m10_c/config.h @@ -23,7 +23,7 @@ // IS31FL3731 driver #define IS31FL3731_I2C_ADDRESS_1 IS31FL3731_I2C_ADDRESS_GND #define IS31FL3731_DRIVER_COUNT 1 -#define RGB_MATRIX_LED_COUNT 12 +#define IS31FL3731_LED_COUNT 12 // Enable WT RGB backlight #define RGB_BACKLIGHT_ENABLED 1 diff --git a/keyboards/wilba_tech/rama_works_m50_a/config.h b/keyboards/wilba_tech/rama_works_m50_a/config.h index 599550b91f..98149ffa14 100644 --- a/keyboards/wilba_tech/rama_works_m50_a/config.h +++ b/keyboards/wilba_tech/rama_works_m50_a/config.h @@ -24,7 +24,7 @@ #define IS31FL3731_I2C_ADDRESS_1 IS31FL3731_I2C_ADDRESS_GND #define IS31FL3731_I2C_ADDRESS_2 IS31FL3731_I2C_ADDRESS_SDA #define IS31FL3731_DRIVER_COUNT 2 -#define RGB_MATRIX_LED_COUNT 72 +#define IS31FL3731_LED_COUNT 72 // Enable WT RGB backlight #define RGB_BACKLIGHT_ENABLED 1 diff --git a/keyboards/wilba_tech/rama_works_m60_a/config.h b/keyboards/wilba_tech/rama_works_m60_a/config.h index bc7d7e6128..c291ba2db3 100644 --- a/keyboards/wilba_tech/rama_works_m60_a/config.h +++ b/keyboards/wilba_tech/rama_works_m60_a/config.h @@ -19,7 +19,7 @@ #define IS31FL3731_I2C_ADDRESS_1 IS31FL3731_I2C_ADDRESS_GND #define IS31FL3731_I2C_ADDRESS_2 IS31FL3731_I2C_ADDRESS_SDA #define IS31FL3731_DRIVER_COUNT 2 -#define RGB_MATRIX_LED_COUNT 72 +#define IS31FL3731_LED_COUNT 72 // Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/wilba_tech/rama_works_m65_b/config.h b/keyboards/wilba_tech/rama_works_m65_b/config.h index b3e381d77d..9807fbc874 100644 --- a/keyboards/wilba_tech/rama_works_m65_b/config.h +++ b/keyboards/wilba_tech/rama_works_m65_b/config.h @@ -24,7 +24,7 @@ #define IS31FL3731_I2C_ADDRESS_1 IS31FL3731_I2C_ADDRESS_GND #define IS31FL3731_I2C_ADDRESS_2 IS31FL3731_I2C_ADDRESS_SDA #define IS31FL3731_DRIVER_COUNT 2 -#define RGB_MATRIX_LED_COUNT 72 +#define IS31FL3731_LED_COUNT 72 // Enable WT RGB backlight #define RGB_BACKLIGHT_ENABLED 1 diff --git a/keyboards/wilba_tech/rama_works_m65_bx/config.h b/keyboards/wilba_tech/rama_works_m65_bx/config.h index 8070e917d7..64da89ff9e 100644 --- a/keyboards/wilba_tech/rama_works_m65_bx/config.h +++ b/keyboards/wilba_tech/rama_works_m65_bx/config.h @@ -24,7 +24,7 @@ #define IS31FL3731_I2C_ADDRESS_1 IS31FL3731_I2C_ADDRESS_GND #define IS31FL3731_I2C_ADDRESS_2 IS31FL3731_I2C_ADDRESS_SDA #define IS31FL3731_DRIVER_COUNT 2 -#define RGB_MATRIX_LED_COUNT 72 +#define IS31FL3731_LED_COUNT 72 // Enable WT RGB backlight #define RGB_BACKLIGHT_ENABLED 1 diff --git a/keyboards/wilba_tech/rama_works_m6_b/config.h b/keyboards/wilba_tech/rama_works_m6_b/config.h index 27a5e72c04..112cd500be 100644 --- a/keyboards/wilba_tech/rama_works_m6_b/config.h +++ b/keyboards/wilba_tech/rama_works_m6_b/config.h @@ -20,7 +20,7 @@ /* Locking resynchronize hack */ #define LOCKING_RESYNC_ENABLE -#define RGB_MATRIX_LED_COUNT 6 +#define IS31FL3218_LED_COUNT 6 #define RGB_BACKLIGHT_ENABLED 1 diff --git a/keyboards/wilba_tech/rama_works_u80_a/config.h b/keyboards/wilba_tech/rama_works_u80_a/config.h index 4ab2d53c3c..2a0da80fed 100644 --- a/keyboards/wilba_tech/rama_works_u80_a/config.h +++ b/keyboards/wilba_tech/rama_works_u80_a/config.h @@ -42,7 +42,7 @@ #define IS31FL3731_I2C_ADDRESS_2 IS31FL3731_I2C_ADDRESS_SDA #define IS31FL3731_I2C_ADDRESS_3 IS31FL3731_I2C_ADDRESS_SCL #define IS31FL3731_DRIVER_COUNT 3 -#define RGB_MATRIX_LED_COUNT 108 +#define IS31FL3731_LED_COUNT 108 #define RGB_BACKLIGHT_ENABLED 1 diff --git a/keyboards/wilba_tech/wt60_a/config.h b/keyboards/wilba_tech/wt60_a/config.h index c9d448fbb8..25a6f25a1c 100644 --- a/keyboards/wilba_tech/wt60_a/config.h +++ b/keyboards/wilba_tech/wt60_a/config.h @@ -64,4 +64,4 @@ #define IS31FL3736_I2C_ADDRESS_1 IS31FL3736_I2C_ADDRESS_GND_GND #define IS31FL3736_DRIVER_COUNT 1 -#define LED_MATRIX_LED_COUNT 96 +#define IS31FL3736_LED_COUNT 96 diff --git a/keyboards/wilba_tech/wt60_b/config.h b/keyboards/wilba_tech/wt60_b/config.h index c5fb1b32c7..926136f332 100644 --- a/keyboards/wilba_tech/wt60_b/config.h +++ b/keyboards/wilba_tech/wt60_b/config.h @@ -26,7 +26,7 @@ #define IS31FL3731_I2C_ADDRESS_1 IS31FL3731_I2C_ADDRESS_GND #define IS31FL3731_I2C_ADDRESS_2 IS31FL3731_I2C_ADDRESS_SDA #define IS31FL3731_DRIVER_COUNT 2 -#define RGB_MATRIX_LED_COUNT 72 +#define IS31FL3731_LED_COUNT 72 #define RGB_BACKLIGHT_ENABLED 1 diff --git a/keyboards/wilba_tech/wt60_bx/config.h b/keyboards/wilba_tech/wt60_bx/config.h index f87d9ff48e..85ab052437 100644 --- a/keyboards/wilba_tech/wt60_bx/config.h +++ b/keyboards/wilba_tech/wt60_bx/config.h @@ -26,7 +26,7 @@ #define IS31FL3731_I2C_ADDRESS_1 IS31FL3731_I2C_ADDRESS_GND #define IS31FL3731_I2C_ADDRESS_2 IS31FL3731_I2C_ADDRESS_SDA #define IS31FL3731_DRIVER_COUNT 2 -#define RGB_MATRIX_LED_COUNT 72 +#define IS31FL3731_LED_COUNT 72 #define RGB_BACKLIGHT_ENABLED 1 diff --git a/keyboards/wilba_tech/wt60_c/config.h b/keyboards/wilba_tech/wt60_c/config.h index 4a1b8b6ad2..ca7366bc32 100644 --- a/keyboards/wilba_tech/wt60_c/config.h +++ b/keyboards/wilba_tech/wt60_c/config.h @@ -26,7 +26,7 @@ #define IS31FL3731_I2C_ADDRESS_1 IS31FL3731_I2C_ADDRESS_GND #define IS31FL3731_I2C_ADDRESS_2 IS31FL3731_I2C_ADDRESS_SDA #define IS31FL3731_DRIVER_COUNT 2 -#define RGB_MATRIX_LED_COUNT 72 +#define IS31FL3731_LED_COUNT 72 #define RGB_BACKLIGHT_ENABLED 1 diff --git a/keyboards/wilba_tech/wt65_a/config.h b/keyboards/wilba_tech/wt65_a/config.h index 04d607e77a..88f28ac844 100644 --- a/keyboards/wilba_tech/wt65_a/config.h +++ b/keyboards/wilba_tech/wt65_a/config.h @@ -64,4 +64,4 @@ #define IS31FL3736_I2C_ADDRESS_1 IS31FL3736_I2C_ADDRESS_GND_GND #define IS31FL3736_DRIVER_COUNT 1 -#define LED_MATRIX_LED_COUNT 96 +#define IS31FL3736_LED_COUNT 96 diff --git a/keyboards/wilba_tech/wt65_b/config.h b/keyboards/wilba_tech/wt65_b/config.h index 780b3c80c4..164caecd00 100644 --- a/keyboards/wilba_tech/wt65_b/config.h +++ b/keyboards/wilba_tech/wt65_b/config.h @@ -64,4 +64,4 @@ #define IS31FL3736_I2C_ADDRESS_1 IS31FL3736_I2C_ADDRESS_GND_GND #define IS31FL3736_DRIVER_COUNT 1 -#define LED_MATRIX_LED_COUNT 96 +#define IS31FL3736_LED_COUNT 96 diff --git a/keyboards/wilba_tech/wt75_a/config.h b/keyboards/wilba_tech/wt75_a/config.h index 29399e148a..a8185a6807 100644 --- a/keyboards/wilba_tech/wt75_a/config.h +++ b/keyboards/wilba_tech/wt75_a/config.h @@ -64,4 +64,4 @@ #define IS31FL3736_I2C_ADDRESS_1 IS31FL3736_I2C_ADDRESS_GND_GND #define IS31FL3736_DRIVER_COUNT 1 -#define LED_MATRIX_LED_COUNT 96 +#define IS31FL3736_LED_COUNT 96 diff --git a/keyboards/wilba_tech/wt75_b/config.h b/keyboards/wilba_tech/wt75_b/config.h index 71ca6891ca..4834251691 100644 --- a/keyboards/wilba_tech/wt75_b/config.h +++ b/keyboards/wilba_tech/wt75_b/config.h @@ -64,4 +64,4 @@ #define IS31FL3736_I2C_ADDRESS_1 IS31FL3736_I2C_ADDRESS_GND_GND #define IS31FL3736_DRIVER_COUNT 1 -#define LED_MATRIX_LED_COUNT 96 +#define IS31FL3736_LED_COUNT 96 diff --git a/keyboards/wilba_tech/wt75_c/config.h b/keyboards/wilba_tech/wt75_c/config.h index b404dccfbb..d1e81992f5 100644 --- a/keyboards/wilba_tech/wt75_c/config.h +++ b/keyboards/wilba_tech/wt75_c/config.h @@ -64,4 +64,4 @@ #define IS31FL3736_I2C_ADDRESS_1 IS31FL3736_I2C_ADDRESS_GND_GND #define IS31FL3736_DRIVER_COUNT 1 -#define LED_MATRIX_LED_COUNT 96 +#define IS31FL3736_LED_COUNT 96 diff --git a/keyboards/wilba_tech/wt80_a/config.h b/keyboards/wilba_tech/wt80_a/config.h index a1f8fbdef6..c6594c1689 100644 --- a/keyboards/wilba_tech/wt80_a/config.h +++ b/keyboards/wilba_tech/wt80_a/config.h @@ -64,4 +64,4 @@ #define IS31FL3736_I2C_ADDRESS_1 IS31FL3736_I2C_ADDRESS_GND_GND #define IS31FL3736_DRIVER_COUNT 1 -#define LED_MATRIX_LED_COUNT 96 +#define IS31FL3736_LED_COUNT 96 diff --git a/keyboards/wilba_tech/wt_mono_backlight.c b/keyboards/wilba_tech/wt_mono_backlight.c index 4add18b14e..e218f0af4b 100644 --- a/keyboards/wilba_tech/wt_mono_backlight.c +++ b/keyboards/wilba_tech/wt_mono_backlight.c @@ -50,7 +50,7 @@ backlight_config g_config = { .color_1 = MONO_BACKLIGHT_COLOR_1, }; -const is31fl3736_led_t PROGMEM g_is31fl3736_leds[LED_MATRIX_LED_COUNT] = { +const is31fl3736_led_t PROGMEM g_is31fl3736_leds[IS31FL3736_LED_COUNT] = { {0, A_1}, {0, A_2}, {0, A_3}, @@ -170,14 +170,7 @@ uint32_t g_any_key_hit = 0; void backlight_init_drivers(void) { - // Initialize I2C - i2c_init(); - is31fl3736_init( IS31FL3736_I2C_ADDRESS_1 ); - - for ( uint8_t index = 0; index < 96; index++ ) { - is31fl3736_set_led_control_register( index, true ); - } - is31fl3736_update_led_control_registers( IS31FL3736_I2C_ADDRESS_1, 0 ); + is31fl3736_init_drivers(); } void backlight_set_key_hit(uint8_t row, uint8_t column) diff --git a/keyboards/wilba_tech/wt_rgb_backlight.c b/keyboards/wilba_tech/wt_rgb_backlight.c index 1c865deecf..8bd04c840f 100644 --- a/keyboards/wilba_tech/wt_rgb_backlight.c +++ b/keyboards/wilba_tech/wt_rgb_backlight.c @@ -157,7 +157,7 @@ uint32_t g_any_key_hit = 0; #if defined(RGB_BACKLIGHT_HS60) #define ISSI_ADDR_1 IS31FL3733_I2C_ADDRESS_GND_GND -const is31fl3733_led_t PROGMEM g_is31fl3733_leds[RGB_MATRIX_LED_COUNT] = { +const is31fl3733_led_t PROGMEM g_is31fl3733_leds[IS31FL3733_LED_COUNT] = { /* Refer to IS31 manual for these locations * driver * | R location @@ -234,7 +234,7 @@ const is31fl3733_led_t PROGMEM g_is31fl3733_leds[RGB_MATRIX_LED_COUNT] = { #define ISSI_ADDR_1 IS31FL3733_I2C_ADDRESS_GND_GND #define ISSI_ADDR_2 IS31FL3733_I2C_ADDRESS_GND_SDA -const is31fl3733_led_t PROGMEM g_is31fl3733_leds[RGB_MATRIX_LED_COUNT] = { +const is31fl3733_led_t PROGMEM g_is31fl3733_leds[IS31FL3733_LED_COUNT] = { /* Refer to IS31 manual for these locations * driver * | R location @@ -375,7 +375,7 @@ const is31fl3733_led_t PROGMEM g_is31fl3733_leds[RGB_MATRIX_LED_COUNT] = { #elif defined(RGB_BACKLIGHT_NEBULA12) #define ISSI_ADDR_1 IS31FL3731_I2C_ADDRESS_GND -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 @@ -406,7 +406,7 @@ const is31fl3731_led_t PROGMEM g_is31fl3731_leds[RGB_MATRIX_LED_COUNT] = { #define ISSI_ADDR_2 IS31FL3731_I2C_ADDRESS_SDA #define ISSI_ADDR_3 IS31FL3731_I2C_ADDRESS_SCL -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 @@ -531,7 +531,7 @@ const is31fl3731_led_t PROGMEM g_is31fl3731_leds[RGB_MATRIX_LED_COUNT] = { #define ISSI_ADDR_1 IS31FL3731_I2C_ADDRESS_GND #define ISSI_ADDR_2 IS31FL3731_I2C_ADDRESS_SDA -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 @@ -610,7 +610,7 @@ const is31fl3731_led_t PROGMEM g_is31fl3731_leds[RGB_MATRIX_LED_COUNT] = { #define ISSI_ADDR_1 IS31FL3731_I2C_ADDRESS_GND #define ISSI_ADDR_2 IS31FL3731_I2C_ADDRESS_VCC -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 @@ -694,7 +694,7 @@ const is31fl3731_led_t PROGMEM g_is31fl3731_leds[RGB_MATRIX_LED_COUNT] = { #define ISSI_ADDR_1 IS31FL3741_I2C_ADDRESS_GND #define ISSI_ADDR_2 -const is31fl3741_led_t PROGMEM g_is31fl3741_leds[RGB_MATRIX_LED_COUNT] = { +const is31fl3741_led_t PROGMEM g_is31fl3741_leds[IS31FL3741_LED_COUNT] = { /* Refer to IS31 manual for these locations * driver * | R location @@ -817,7 +817,7 @@ const is31fl3741_led_t PROGMEM g_is31fl3741_leds[RGB_MATRIX_LED_COUNT] = { }; #elif defined(RGB_BACKLIGHT_M6_B) -const is31fl3218_led_t PROGMEM g_is31fl3218_leds[RGB_MATRIX_LED_COUNT] = { +const is31fl3218_led_t PROGMEM g_is31fl3218_leds[IS31FL3218_LED_COUNT] = { {OUT1, OUT2, OUT3}, {OUT4, OUT5, OUT6}, {OUT7, OUT8, OUT9}, @@ -829,7 +829,7 @@ const is31fl3218_led_t PROGMEM g_is31fl3218_leds[RGB_MATRIX_LED_COUNT] = { #define ISSI_ADDR_1 IS31FL3731_I2C_ADDRESS_GND #define ISSI_ADDR_2 -const is31fl3731_led_t PROGMEM g_is31fl3731_leds[RGB_MATRIX_LED_COUNT] = { +const is31fl3731_led_t PROGMEM g_is31fl3731_leds[IS31FL3731_LED_COUNT] = { {0, C1_9, C3_10, C4_10}, // LB1 {0, C1_10, C2_10, C4_11}, // LB2 {0, C1_11, C2_11, C3_11}, // LB3 @@ -847,7 +847,7 @@ const is31fl3731_led_t PROGMEM g_is31fl3731_leds[RGB_MATRIX_LED_COUNT] = { #define ISSI_ADDR_1 IS31FL3731_I2C_ADDRESS_GND #define ISSI_ADDR_2 IS31FL3731_I2C_ADDRESS_SDA -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 @@ -1817,12 +1817,12 @@ void backlight_set_color( int index, uint8_t red, uint8_t green, uint8_t blue ) is31fl3733_set_color( index, red, green, blue ); } #elif defined(RGB_BACKLIGHT_DAWN60) - if( index < RGB_MATRIX_LED_COUNT ) { + if( index < IS31FL3731_LED_COUNT ) { is31fl3731_set_color( index, red, green, blue ); } else { - g_ws2812_leds[index - RGB_MATRIX_LED_COUNT].r = red; - g_ws2812_leds[index - RGB_MATRIX_LED_COUNT].g = green; - g_ws2812_leds[index - RGB_MATRIX_LED_COUNT].b = blue; + g_ws2812_leds[index - IS31FL3731_LED_COUNT].r = red; + g_ws2812_leds[index - IS31FL3731_LED_COUNT].g = green; + g_ws2812_leds[index - IS31FL3731_LED_COUNT].b = blue; ws2812_setleds(g_ws2812_leds, WS2812_LED_TOTAL); } #else @@ -2111,9 +2111,9 @@ void backlight_effect_alphas_mods(void) for (int i = 0; i < WS2812_LED_TOTAL; i++) { if ((RGB_UNDERGLOW_ALPHA_TOP_START <= i && i <= RGB_UNDERGLOW_ALPHA_TOP_END) || (RGB_UNDERGLOW_ALPHA_BOT_START <= i && i <= RGB_UNDERGLOW_ALPHA_BOT_END)) { - backlight_set_color(i + RGB_MATRIX_LED_COUNT, rgb1.r, rgb1.g, rgb1.b); + backlight_set_color(i + IS31FL3731_LED_COUNT, rgb1.r, rgb1.g, rgb1.b); } else { - backlight_set_color(i + RGB_MATRIX_LED_COUNT, rgb2.r, rgb2.g, rgb2.b); + backlight_set_color(i + IS31FL3731_LED_COUNT, rgb2.r, rgb2.g, rgb2.b); } } #endif @@ -2902,7 +2902,7 @@ void backlight_init_drivers(void) #if defined(RGB_BACKLIGHT_M6_B) is31fl3218_init(); - for ( int index = 0; index < RGB_MATRIX_LED_COUNT; index++ ) + for ( int index = 0; index < IS31FL3218_LED_COUNT; index++ ) { bool enabled = true; @@ -2913,9 +2913,9 @@ void backlight_init_drivers(void) // This actually updates the LED drivers is31fl3218_update_led_control_registers(); #elif defined(RGB_BACKLIGHT_HS60) - is31fl3733_init( ISSI_ADDR_1, 0 ); + is31fl3733_init( ISSI_ADDR_1, IS31FL3733_SYNC_NONE ); - for ( int index = 0; index < RGB_MATRIX_LED_COUNT; index++ ) + for ( int index = 0; index < IS31FL3733_LED_COUNT; index++ ) { #if defined(HS60_ANSI) bool enabled = !( ( index == 48-1 ) || //LA48 @@ -2934,10 +2934,10 @@ void backlight_init_drivers(void) // This actually updates the LED drivers is31fl3733_update_led_control_registers( ISSI_ADDR_1, 0 ); #elif defined(RGB_BACKLIGHT_NK65) - is31fl3733_init( ISSI_ADDR_1, 0 ); - is31fl3733_init( ISSI_ADDR_2, 0 ); + is31fl3733_init( ISSI_ADDR_1, IS31FL3733_SYNC_NONE ); + is31fl3733_init( ISSI_ADDR_2, IS31FL3733_SYNC_NONE ); - for ( int index = 0; index < RGB_MATRIX_LED_COUNT; index++ ) + for ( int index = 0; index < IS31FL3733_LED_COUNT; index++ ) { bool enabled = !( ( index == 61-1 ) || //LA61 ( index > 6+64-1 ) ); //LB7-LB64 @@ -2949,10 +2949,10 @@ void backlight_init_drivers(void) is31fl3733_update_led_control_registers( ISSI_ADDR_1, 0 ); is31fl3733_update_led_control_registers( ISSI_ADDR_2, 1 ); #elif defined(RGB_BACKLIGHT_NK87) - is31fl3733_init( ISSI_ADDR_1, 0 ); - is31fl3733_init( ISSI_ADDR_2, 0 ); + is31fl3733_init( ISSI_ADDR_1, IS31FL3733_SYNC_NONE ); + is31fl3733_init( ISSI_ADDR_2, IS31FL3733_SYNC_NONE ); - for ( int index = 0; index < RGB_MATRIX_LED_COUNT; index++ ) + for ( int index = 0; index < IS31FL3733_LED_COUNT; index++ ) { bool enabled = !( ( index == 61-1 ) || //LA61 ( (index >= 2+64-1) && (index <= 4+64-1) ) || @@ -2979,10 +2979,10 @@ void backlight_init_drivers(void) is31fl3733_update_led_control_registers( ISSI_ADDR_1, 0 ); is31fl3733_update_led_control_registers( ISSI_ADDR_2, 1 ); #elif defined(RGB_BACKLIGHT_NEBULA68) - is31fl3733_init( ISSI_ADDR_1, 0 ); - is31fl3733_init( ISSI_ADDR_2, 0 ); + is31fl3733_init( ISSI_ADDR_1, IS31FL3733_SYNC_NONE ); + is31fl3733_init( ISSI_ADDR_2, IS31FL3733_SYNC_NONE ); - for ( int index = 0; index < RGB_MATRIX_LED_COUNT; index++ ) + for ( int index = 0; index < IS31FL3733_LED_COUNT; index++ ) { bool enabled = !( ( index == 61-1 ) || //LA61 ( index > 5+64-1 ) ); //LB6-LB64 @@ -2995,17 +2995,17 @@ void backlight_init_drivers(void) #elif defined(RGB_BACKLIGHT_PORTICO75) is31fl3741_init( ISSI_ADDR_1 ); bool enabled = true; - for ( int index = 0; index < RGB_MATRIX_LED_COUNT; index++ ) + for ( int index = 0; index < IS31FL3741_LED_COUNT; index++ ) { is31fl3741_set_led_control_register( index, enabled, enabled, enabled ); } // This actually updates the LED drivers is31fl3741_update_led_control_registers( ISSI_ADDR_1, 0 ); #elif defined(RGB_BACKLIGHT_KW_MEGA) - is31fl3733_init( ISSI_ADDR_1, 0 ); - is31fl3733_init( ISSI_ADDR_2, 0 ); + is31fl3733_init( ISSI_ADDR_1, IS31FL3733_SYNC_NONE ); + is31fl3733_init( ISSI_ADDR_2, IS31FL3733_SYNC_NONE ); - for ( int index = 0; index < RGB_MATRIX_LED_COUNT; index++ ) + for ( int index = 0; index < IS31FL3733_LED_COUNT; index++ ) { bool enabled = !( ( index == 61-1 ) || //LA61 ( index > 6+64-1 ) ); //LB7-LB64 @@ -3032,7 +3032,7 @@ void backlight_init_drivers(void) bool disable_spacebar_stab_leds = false; #endif - for ( int index = 0; index < RGB_MATRIX_LED_COUNT; index++ ) + for ( int index = 0; index < BACKLIGHT_LED_COUNT; index++ ) { // OR the possible "disabled" cases together, then NOT the result to get the enabled state // LC6 LD13 not present on Zeal65 diff --git a/keyboards/wilba_tech/zeal60/config.h b/keyboards/wilba_tech/zeal60/config.h index 3233c6187d..830dd6d78a 100644 --- a/keyboards/wilba_tech/zeal60/config.h +++ b/keyboards/wilba_tech/zeal60/config.h @@ -19,7 +19,7 @@ #define IS31FL3731_I2C_ADDRESS_1 IS31FL3731_I2C_ADDRESS_GND #define IS31FL3731_I2C_ADDRESS_2 IS31FL3731_I2C_ADDRESS_SDA #define IS31FL3731_DRIVER_COUNT 2 -#define RGB_MATRIX_LED_COUNT 72 +#define IS31FL3731_LED_COUNT 72 // Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/wilba_tech/zeal65/config.h b/keyboards/wilba_tech/zeal65/config.h index 1046ee8108..a7d1b81f84 100644 --- a/keyboards/wilba_tech/zeal65/config.h +++ b/keyboards/wilba_tech/zeal65/config.h @@ -19,7 +19,7 @@ #define IS31FL3731_I2C_ADDRESS_1 IS31FL3731_I2C_ADDRESS_GND #define IS31FL3731_I2C_ADDRESS_2 IS31FL3731_I2C_ADDRESS_SDA #define IS31FL3731_DRIVER_COUNT 2 -#define RGB_MATRIX_LED_COUNT 72 +#define IS31FL3731_LED_COUNT 72 // Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap #define LOCKING_SUPPORT_ENABLE |