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
				
			
		| 
						 | 
				
			
			@ -34,7 +34,7 @@
 | 
			
		|||
// #define RGBLIGHT_VAL_STEP 12        // Units to step when in/decreasing value (brightness)
 | 
			
		||||
// #define RGB_DISABLE_AFTER_TIMEOUT 0   // number of ticks to wait until disabling effects
 | 
			
		||||
// #define RGB_DISABLE_WHEN_USB_SUSPENDED false // turn off effects when suspended
 | 
			
		||||
// #define RGB_MATRIX_LED_PROCESS_LIMIT (DRIVER_LED_TOTAL + 4) / 5 // limits the number of LEDs to process in an animation per task run (increases keyboard responsiveness)
 | 
			
		||||
// #define RGB_MATRIX_LED_PROCESS_LIMIT (RGB_MATRIX_LED_COUNT + 4) / 5 // limits the number of LEDs to process in an animation per task run (increases keyboard responsiveness)
 | 
			
		||||
// #define RGB_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness)
 | 
			
		||||
// #define RGBLIGHT_ANIMATIONS             // Run RGB animations
 | 
			
		||||
// #define RGBLIGHT_ANIMATIONS             // Enable all additional animation modes.
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -75,6 +75,6 @@ extern uint8_t raw_hid_buffer[RAW_EPSIZE];
 | 
			
		|||
 | 
			
		||||
// Defined in rgb_matrix_user.inc
 | 
			
		||||
// It's 119 for Massdrop CTRL, 0 - 118.
 | 
			
		||||
extern RGB rgb_matrix_led_state[DRIVER_LED_TOTAL];
 | 
			
		||||
extern RGB rgb_matrix_led_state[RGB_MATRIX_LED_COUNT];
 | 
			
		||||
 | 
			
		||||
void raw_hid_perform_send(void);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -199,9 +199,9 @@ void raw_hid_led(uint8_t *data) {
 | 
			
		|||
    //rgb_matrix_set_color(data[1], data[2], data[3], data[4]);
 | 
			
		||||
    const uint8_t led = data[1];
 | 
			
		||||
 | 
			
		||||
    if (led >= DRIVER_LED_TOTAL) {
 | 
			
		||||
    if (led >= RGB_MATRIX_LED_COUNT) {
 | 
			
		||||
        raw_hid_buffer[1] = CTRL_HID_NOK;
 | 
			
		||||
        raw_hid_buffer[2] = DRIVER_LED_TOTAL;
 | 
			
		||||
        raw_hid_buffer[2] = RGB_MATRIX_LED_COUNT;
 | 
			
		||||
        raw_hid_buffer[3] = CTRL_HID_EOM;
 | 
			
		||||
        return;
 | 
			
		||||
    }
 | 
			
		||||
| 
						 | 
				
			
			@ -219,7 +219,7 @@ void raw_hid_leds(uint8_t *data) {
 | 
			
		|||
    const uint8_t number_leds = data[2];
 | 
			
		||||
 | 
			
		||||
    uint8_t i = 0;
 | 
			
		||||
    while (i < number_leds && first_led + i < DRIVER_LED_TOTAL && i * 3 + 5 < RAW_EPSIZE) {
 | 
			
		||||
    while (i < number_leds && first_led + i < RGB_MATRIX_LED_COUNT && i * 3 + 5 < RAW_EPSIZE) {
 | 
			
		||||
        rgb_matrix_led_state[first_led + i].r = data[3 + i * 3 + 0];
 | 
			
		||||
        rgb_matrix_led_state[first_led + i].g = data[3 + i * 3 + 1];
 | 
			
		||||
        rgb_matrix_led_state[first_led + i].b = data[3 + i * 3 + 2];
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -26,7 +26,7 @@ RGB_MATRIX_EFFECT(hid_effect)
 | 
			
		|||
// Define effects inside the `RGB_MATRIX_CUSTOM_EFFECT_IMPLS` ifdef block
 | 
			
		||||
#ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS
 | 
			
		||||
 | 
			
		||||
RGB rgb_matrix_led_state[DRIVER_LED_TOTAL];
 | 
			
		||||
RGB rgb_matrix_led_state[RGB_MATRIX_LED_COUNT];
 | 
			
		||||
 | 
			
		||||
// e.g: A simple effect, self-contained within a single method
 | 
			
		||||
static bool hid_effect(effect_params_t* params) {
 | 
			
		||||
| 
						 | 
				
			
			@ -38,7 +38,7 @@ static bool hid_effect(effect_params_t* params) {
 | 
			
		|||
            rgb_matrix_led_state[i].g,
 | 
			
		||||
            rgb_matrix_led_state[i].b);
 | 
			
		||||
    }
 | 
			
		||||
    return led_max < DRIVER_LED_TOTAL;
 | 
			
		||||
    return led_max < RGB_MATRIX_LED_COUNT;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
#endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue