Change DRIVER_LED_COUNT to {LED,RGB}_MATRIX_LED_COUNT (#18399)
				
					
				
			This commit is contained in:
		
							parent
							
								
									d967de0df7
								
							
						
					
					
						commit
						36c410592d
					
				
					 577 changed files with 836 additions and 831 deletions
				
			
		| 
						 | 
				
			
			@ -18,7 +18,7 @@
 | 
			
		|||
 | 
			
		||||
#ifdef RGB_MATRIX_ENABLE
 | 
			
		||||
 | 
			
		||||
const aw_led g_aw_leds[DRIVER_LED_TOTAL] = {
 | 
			
		||||
const aw_led g_aw_leds[RGB_MATRIX_LED_COUNT] = {
 | 
			
		||||
/* Refer to IS31 manual for these locations
 | 
			
		||||
 *   driver
 | 
			
		||||
 *   |     R location
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -57,7 +57,7 @@
 | 
			
		|||
#define DRIVER_COUNT 2
 | 
			
		||||
#define DRIVER_1_LED_TOTAL 54
 | 
			
		||||
#define DRIVER_2_LED_TOTAL 34
 | 
			
		||||
#define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)
 | 
			
		||||
#define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)
 | 
			
		||||
 | 
			
		||||
// RGB Matrix Animation modes. Explicitly enabled
 | 
			
		||||
// For full list of effects, see:
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -18,7 +18,7 @@
 | 
			
		|||
 | 
			
		||||
#ifdef RGB_MATRIX_ENABLE
 | 
			
		||||
 | 
			
		||||
const aw_led g_aw_leds[DRIVER_LED_TOTAL] = {
 | 
			
		||||
const aw_led g_aw_leds[RGB_MATRIX_LED_COUNT] = {
 | 
			
		||||
/* Refer to IS31 manual for these locations
 | 
			
		||||
 *   driver
 | 
			
		||||
 *   |     R location
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -18,7 +18,7 @@
 | 
			
		|||
 | 
			
		||||
#ifdef RGB_MATRIX_ENABLE
 | 
			
		||||
 | 
			
		||||
const aw_led g_aw_leds[DRIVER_LED_TOTAL] = {
 | 
			
		||||
const aw_led g_aw_leds[RGB_MATRIX_LED_COUNT] = {
 | 
			
		||||
/* Refer to IS31 manual for these locations
 | 
			
		||||
 *   driver
 | 
			
		||||
 *   |     R location
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -61,7 +61,7 @@
 | 
			
		|||
#define DRIVER_COUNT 2
 | 
			
		||||
#define DRIVER_1_LED_TOTAL 66
 | 
			
		||||
#define DRIVER_2_LED_TOTAL 54
 | 
			
		||||
#define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)
 | 
			
		||||
#define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)
 | 
			
		||||
 | 
			
		||||
// RGB Matrix Animation modes. Explicitly enabled
 | 
			
		||||
// For full list of effects, see:
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -18,7 +18,7 @@
 | 
			
		|||
 | 
			
		||||
#ifdef RGB_MATRIX_ENABLE
 | 
			
		||||
 | 
			
		||||
const aw_led g_aw_leds[DRIVER_LED_TOTAL] = {
 | 
			
		||||
const aw_led g_aw_leds[RGB_MATRIX_LED_COUNT] = {
 | 
			
		||||
/* Refer to IS31 manual for these locations
 | 
			
		||||
 *   driver
 | 
			
		||||
 *   |     R location
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -136,7 +136,7 @@ led_config_t g_led_config = {{
 | 
			
		|||
    4, 2, 2, 4, 4, 2, 2, 4, 2, 2, 4, 4, 2, 2, 4, 4, 2, 2, 4, 4, 4, 4, 4
 | 
			
		||||
}};
 | 
			
		||||
 | 
			
		||||
const aw_led g_aw_leds[DRIVER_LED_TOTAL] = {
 | 
			
		||||
const aw_led g_aw_leds[RGB_MATRIX_LED_COUNT] = {
 | 
			
		||||
    {0, CS1_SW1, CS2_SW1, CS3_SW1},        //  0, ESC, k13
 | 
			
		||||
    {0, CS4_SW1, CS5_SW1, CS6_SW1},        //  1, ~, k16
 | 
			
		||||
    {0, CS7_SW1, CS8_SW1, CS9_SW1},        //  2, Tab, k11
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -20,4 +20,4 @@
 | 
			
		|||
 | 
			
		||||
#define DRIVER_1_LED_TOTAL 66
 | 
			
		||||
#define DRIVER_2_LED_TOTAL 32
 | 
			
		||||
#define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)
 | 
			
		||||
#define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -79,7 +79,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
 | 
			
		|||
//
 | 
			
		||||
//    
 | 
			
		||||
//
 | 
			
		||||
//    for (int i = 0; i < DRIVER_LED_TOTAL; i++) {
 | 
			
		||||
//    for (int i = 0; i < RGB_MATRIX_LED_COUNT; i++) {
 | 
			
		||||
//        HSV hsv = {
 | 
			
		||||
//            .h = (*l)[i][0],
 | 
			
		||||
//            .s = (*l)[i][1],
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -65,7 +65,7 @@ void rgb_matrix_indicators_user(void) {
 | 
			
		|||
    }
 | 
			
		||||
 | 
			
		||||
    if (host_keyboard_led_state().caps_lock) {
 | 
			
		||||
        for (uint8_t i = 0; i < DRIVER_LED_TOTAL; ++i) {
 | 
			
		||||
        for (uint8_t i = 0; i < RGB_MATRIX_LED_COUNT; ++i) {
 | 
			
		||||
            if (HAS_ANY_FLAGS(g_led_config.flags[i], LED_FLAG_UNDERGLOW)) {
 | 
			
		||||
                rgb_matrix_set_color(i, _CAPS_COLOR_RGB);
 | 
			
		||||
            }
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -136,7 +136,7 @@ led_config_t PROGMEM g_led_config = {{
 | 
			
		|||
    4, 2, 2, 4, 4, 2, 2, 4, 2, 2, 4, 4, 2, 2, 4, 4, 2, 2, 4, 4, 4, 4, 4
 | 
			
		||||
}};
 | 
			
		||||
 | 
			
		||||
const aw_led g_aw_leds[DRIVER_LED_TOTAL] = {
 | 
			
		||||
const aw_led g_aw_leds[RGB_MATRIX_LED_COUNT] = {
 | 
			
		||||
    {0, CS1_SW1, CS2_SW1, CS3_SW1},        //  0, ESC, k13
 | 
			
		||||
    {0, CS4_SW1, CS5_SW1, CS6_SW1},        //  1, ~, k16
 | 
			
		||||
    {0, CS7_SW1, CS8_SW1, CS9_SW1},        //  2, Tab, k11
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -17,7 +17,7 @@
 | 
			
		|||
#include "rgb_matrix.h"
 | 
			
		||||
 | 
			
		||||
void rgb_matrix_set_color_flags(uint8_t red, uint8_t green, uint8_t blue, uint8_t flags) {
 | 
			
		||||
    for (uint8_t ii = 0; ii < DRIVER_LED_TOTAL; ii++) {
 | 
			
		||||
    for (uint8_t ii = 0; ii < RGB_MATRIX_LED_COUNT; ii++) {
 | 
			
		||||
        if (g_led_config.flags[ii] & flags) {
 | 
			
		||||
            rgb_matrix_set_color(ii, red, green, blue);
 | 
			
		||||
        }
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -44,7 +44,7 @@ void set_layer_rgb(uint8_t led_min, uint8_t led_max, int layer) {
 | 
			
		|||
 | 
			
		||||
    uint8_t val = rgb_matrix_get_val();
 | 
			
		||||
 | 
			
		||||
    for (int i = 0; i < DRIVER_LED_TOTAL; i++) {
 | 
			
		||||
    for (int i = 0; i < RGB_MATRIX_LED_COUNT; i++) {
 | 
			
		||||
        HSV hsv = {
 | 
			
		||||
            .h = (*l)[i][0],
 | 
			
		||||
            .s = (*l)[i][1],
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -48,7 +48,7 @@
 | 
			
		|||
        ka4, k73 \
 | 
			
		||||
    }
 | 
			
		||||
// clang-format on
 | 
			
		||||
typedef uint8_t ledmap[DRIVER_LED_TOTAL][3];
 | 
			
		||||
typedef uint8_t ledmap[RGB_MATRIX_LED_COUNT][3];
 | 
			
		||||
extern const ledmap ledmaps[];
 | 
			
		||||
 | 
			
		||||
void set_layer_rgb(uint8_t led_min, uint8_t led_max, int layer);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -20,4 +20,4 @@
 | 
			
		|||
 | 
			
		||||
#define DRIVER_1_LED_TOTAL 66
 | 
			
		||||
#define DRIVER_2_LED_TOTAL 33
 | 
			
		||||
#define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)
 | 
			
		||||
#define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -137,7 +137,7 @@ led_config_t g_led_config = {{
 | 
			
		|||
    2, 4, 2, 2, 4, 4, 2, 2, 4, 2, 2, 4, 4, 2, 2, 4, 4, 2, 2, 4, 4, 4, 4, 4
 | 
			
		||||
}};
 | 
			
		||||
 | 
			
		||||
const aw_led g_aw_leds[DRIVER_LED_TOTAL] = {
 | 
			
		||||
const aw_led g_aw_leds[RGB_MATRIX_LED_COUNT] = {
 | 
			
		||||
    {0, CS1_SW1, CS2_SW1, CS3_SW1},        //  0, ESC, k13
 | 
			
		||||
    {0, CS4_SW1, CS5_SW1, CS6_SW1},        //  1, ~, k16
 | 
			
		||||
    {0, CS7_SW1, CS8_SW1, CS9_SW1},        //  2, Tab, k11
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -136,7 +136,7 @@ led_config_t g_led_config = {{
 | 
			
		|||
    4, 2, 2, 4, 4, 2, 2, 4, 2, 2, 4, 4, 2, 2, 4, 4, 2, 2, 4, 4, 4, 4, 4
 | 
			
		||||
}};
 | 
			
		||||
 | 
			
		||||
const aw_led g_aw_leds[DRIVER_LED_TOTAL] = {
 | 
			
		||||
const aw_led g_aw_leds[RGB_MATRIX_LED_COUNT] = {
 | 
			
		||||
    {0, CS1_SW1, CS2_SW1, CS3_SW1},        //  0, ESC, k13
 | 
			
		||||
    {0, CS4_SW1, CS5_SW1, CS6_SW1},        //  1, ~, k16
 | 
			
		||||
    {0, CS7_SW1, CS8_SW1, CS9_SW1},        //  2, Tab, k11
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -20,4 +20,4 @@
 | 
			
		|||
 | 
			
		||||
#define DRIVER_1_LED_TOTAL 66
 | 
			
		||||
#define DRIVER_2_LED_TOTAL 32
 | 
			
		||||
#define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)
 | 
			
		||||
#define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -20,4 +20,4 @@
 | 
			
		|||
 | 
			
		||||
#define DRIVER_1_LED_TOTAL 66
 | 
			
		||||
#define DRIVER_2_LED_TOTAL 33
 | 
			
		||||
#define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)
 | 
			
		||||
#define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -137,7 +137,7 @@ led_config_t g_led_config = {{
 | 
			
		|||
    2, 4, 2, 2, 4, 4, 2, 2, 4, 2, 2, 4, 4, 2, 2, 4, 4, 2, 2, 4, 4, 4, 4, 4
 | 
			
		||||
}};
 | 
			
		||||
 | 
			
		||||
const aw_led g_aw_leds[DRIVER_LED_TOTAL] = {
 | 
			
		||||
const aw_led g_aw_leds[RGB_MATRIX_LED_COUNT] = {
 | 
			
		||||
    {0, CS1_SW1, CS2_SW1, CS3_SW1},        //  0, ESC, k13
 | 
			
		||||
    {0, CS4_SW1, CS5_SW1, CS6_SW1},        //  1, ~, k16
 | 
			
		||||
    {0, CS7_SW1, CS8_SW1, CS9_SW1},        //  2, Tab, k11
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue