summaryrefslogtreecommitdiff
path: root/keyboards/wilba_tech/wt_rgb_backlight.c
diff options
context:
space:
mode:
authorRyan <fauxpark@gmail.com>2022-09-23 22:46:23 +1000
committerGitHub <noreply@github.com>2022-09-23 22:46:23 +1000
commit36c410592dbd35da33ccc5fd6d2a5cbf4b25a708 (patch)
tree4e75c5fc5cd31d9fdc904876906c0b409ee45d90 /keyboards/wilba_tech/wt_rgb_backlight.c
parentd967de0df749f3be63403e07feda416ea09351d0 (diff)
Change `DRIVER_LED_COUNT` to `{LED,RGB}_MATRIX_LED_COUNT` (#18399)
Diffstat (limited to 'keyboards/wilba_tech/wt_rgb_backlight.c')
-rw-r--r--keyboards/wilba_tech/wt_rgb_backlight.c44
1 files changed, 22 insertions, 22 deletions
diff --git a/keyboards/wilba_tech/wt_rgb_backlight.c b/keyboards/wilba_tech/wt_rgb_backlight.c
index a696fe7ed4..e0a04ce32c 100644
--- a/keyboards/wilba_tech/wt_rgb_backlight.c
+++ b/keyboards/wilba_tech/wt_rgb_backlight.c
@@ -162,7 +162,7 @@ uint32_t g_any_key_hit = 0;
// ADDR_2 is not needed. it is here as a dummy
#define ISSI_ADDR_1 0x50
-const is31_led PROGMEM g_is31_leds[DRIVER_LED_TOTAL] = {
+const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = {
/* Refer to IS31 manual for these locations
* driver
* | R location
@@ -243,7 +243,7 @@ const is31_led PROGMEM g_is31_leds[DRIVER_LED_TOTAL] = {
#define ISSI_ADDR_1 0x50
#define ISSI_ADDR_2 0x52
-const is31_led PROGMEM g_is31_leds[DRIVER_LED_TOTAL] = {
+const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = {
/* Refer to IS31 manual for these locations
* driver
* | R location
@@ -386,7 +386,7 @@ const is31_led PROGMEM g_is31_leds[DRIVER_LED_TOTAL] = {
// set to 0 for write, 1 for read (as per I2C protocol)
#define ISSI_ADDR_1 0x74
-const is31_led PROGMEM g_is31_leds[DRIVER_LED_TOTAL] = {
+const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = {
/* Refer to IS31 manual for these locations
* driver
* | R location
@@ -418,7 +418,7 @@ const is31_led PROGMEM g_is31_leds[DRIVER_LED_TOTAL] = {
#define ISSI_ADDR_2 0x76 // 11101[10] <- SDA
#define ISSI_ADDR_3 0x75 // 11101[01] <- SCL
-const is31_led PROGMEM g_is31_leds[DRIVER_LED_TOTAL] = {
+const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = {
/* Refer to IS31 manual for these locations
* driver
* | R location
@@ -545,7 +545,7 @@ const is31_led PROGMEM g_is31_leds[DRIVER_LED_TOTAL] = {
#define ISSI_ADDR_1 0x74
#define ISSI_ADDR_2 0x76
-const is31_led PROGMEM g_is31_leds[DRIVER_LED_TOTAL] = {
+const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = {
/* Refer to IS31 manual for these locations
* driver
* | R location
@@ -626,7 +626,7 @@ const is31_led PROGMEM g_is31_leds[DRIVER_LED_TOTAL] = {
#define ISSI_ADDR_1 0x74
#define ISSI_ADDR_2 0x77
-const is31_led PROGMEM g_is31_leds[DRIVER_LED_TOTAL] = {
+const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = {
/* Refer to IS31 manual for these locations
* driver
* | R location
@@ -712,7 +712,7 @@ const is31_led PROGMEM g_is31_leds[DRIVER_LED_TOTAL] = {
#define ISSI_ADDR_1 0x30
#define ISSI_ADDR_2
-const is31_led PROGMEM g_is31_leds[DRIVER_LED_TOTAL] = {
+const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = {
/* Refer to IS31 manual for these locations
* driver
* | R location
@@ -842,7 +842,7 @@ const is31_led PROGMEM g_is31_leds[DRIVER_LED_TOTAL] = {
#define ISSI_ADDR_1 0x74
#define ISSI_ADDR_2
-const is31_led PROGMEM g_is31_leds[DRIVER_LED_TOTAL] = {
+const is31_led PROGMEM g_is31_leds[RGB_MATRIX_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
@@ -862,7 +862,7 @@ const is31_led PROGMEM g_is31_leds[DRIVER_LED_TOTAL] = {
#define ISSI_ADDR_1 0x74
#define ISSI_ADDR_2 0x76
-const is31_led PROGMEM g_is31_leds[DRIVER_LED_TOTAL] = {
+const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = {
/* Refer to IS31 manual for these locations
* driver
* | R location
@@ -1832,12 +1832,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 < DRIVER_LED_TOTAL ) {
+ if( index < RGB_MATRIX_LED_COUNT ) {
IS31FL3731_set_color( index, red, green, blue );
} else {
- g_ws2812_leds[index - DRIVER_LED_TOTAL].r = red;
- g_ws2812_leds[index - DRIVER_LED_TOTAL].g = green;
- g_ws2812_leds[index - DRIVER_LED_TOTAL].b = blue;
+ 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;
ws2812_setleds(g_ws2812_leds, WS2812_LED_TOTAL);
}
#else
@@ -2131,9 +2131,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 + DRIVER_LED_TOTAL, rgb1.r, rgb1.g, rgb1.b);
+ backlight_set_color(i + RGB_MATRIX_LED_COUNT, rgb1.r, rgb1.g, rgb1.b);
} else {
- backlight_set_color(i + DRIVER_LED_TOTAL, rgb2.r, rgb2.g, rgb2.b);
+ backlight_set_color(i + RGB_MATRIX_LED_COUNT, rgb2.r, rgb2.g, rgb2.b);
}
}
#endif
@@ -2927,7 +2927,7 @@ void backlight_init_drivers(void)
#elif defined(RGB_BACKLIGHT_HS60)
IS31FL3733_init( ISSI_ADDR_1, 0 );
- for ( int index = 0; index < DRIVER_LED_TOTAL; index++ )
+ for ( int index = 0; index < RGB_MATRIX_LED_COUNT; index++ )
{
#if defined(HS60_ANSI)
bool enabled = !( ( index == 48-1 ) || //LA48
@@ -2949,7 +2949,7 @@ void backlight_init_drivers(void)
IS31FL3733_init( ISSI_ADDR_1, 0 );
IS31FL3733_init( ISSI_ADDR_2, 0 );
- for ( int index = 0; index < DRIVER_LED_TOTAL; index++ )
+ for ( int index = 0; index < RGB_MATRIX_LED_COUNT; index++ )
{
bool enabled = !( ( index == 61-1 ) || //LA61
( index > 6+64-1 ) ); //LB7-LB64
@@ -2964,7 +2964,7 @@ void backlight_init_drivers(void)
IS31FL3733_init( ISSI_ADDR_1, 0 );
IS31FL3733_init( ISSI_ADDR_2, 0 );
- for ( int index = 0; index < DRIVER_LED_TOTAL; index++ )
+ for ( int index = 0; index < RGB_MATRIX_LED_COUNT; index++ )
{
bool enabled = !( ( index == 61-1 ) || //LA61
( (index >= 2+64-1) && (index <= 4+64-1) ) ||
@@ -2994,7 +2994,7 @@ void backlight_init_drivers(void)
IS31FL3733_init( ISSI_ADDR_1, 0 );
IS31FL3733_init( ISSI_ADDR_2, 0 );
- for ( int index = 0; index < DRIVER_LED_TOTAL; index++ )
+ for ( int index = 0; index < RGB_MATRIX_LED_COUNT; index++ )
{
bool enabled = !( ( index == 61-1 ) || //LA61
( index > 5+64-1 ) ); //LB6-LB64
@@ -3007,7 +3007,7 @@ void backlight_init_drivers(void)
#elif defined(RGB_BACKLIGHT_PORTICO75)
IS31FL3741_init( ISSI_ADDR_1 );
bool enabled = true;
- for ( int index = 0; index < DRIVER_LED_TOTAL; index++ )
+ for ( int index = 0; index < RGB_MATRIX_LED_COUNT; index++ )
{
IS31FL3741_set_led_control_register( index, enabled, enabled, enabled );
}
@@ -3017,7 +3017,7 @@ void backlight_init_drivers(void)
IS31FL3733_init( ISSI_ADDR_1, 0 );
IS31FL3733_init( ISSI_ADDR_2, 0 );
- for ( int index = 0; index < DRIVER_LED_TOTAL; index++ )
+ for ( int index = 0; index < RGB_MATRIX_LED_COUNT; index++ )
{
bool enabled = !( ( index == 61-1 ) || //LA61
( index > 6+64-1 ) ); //LB7-LB64
@@ -3044,7 +3044,7 @@ void backlight_init_drivers(void)
bool disable_spacebar_stab_leds = false;
#endif
- for ( int index = 0; index < DRIVER_LED_TOTAL; index++ )
+ for ( int index = 0; index < RGB_MATRIX_LED_COUNT; index++ )
{
// OR the possible "disabled" cases together, then NOT the result to get the enabled state
// LC6 LD13 not present on Zeal65