LED Matrix: rename LED_DRIVER_LED_COUNT to DRIVER_LED_TOTAL (#11858)
				
					
				
			This commit is contained in:
		
							parent
							
								
									6f44c2ec31
								
							
						
					
					
						commit
						9ee1282019
					
				
					 14 changed files with 24 additions and 25 deletions
				
			
		| 
						 | 
				
			
			@ -59,7 +59,7 @@ bool g_suspend_state = false;
 | 
			
		|||
uint32_t g_tick = 0;
 | 
			
		||||
 | 
			
		||||
// Ticks since this key was last hit.
 | 
			
		||||
uint8_t g_key_hit[LED_DRIVER_LED_COUNT];
 | 
			
		||||
uint8_t g_key_hit[DRIVER_LED_TOTAL];
 | 
			
		||||
 | 
			
		||||
// Ticks since any key was last hit.
 | 
			
		||||
uint32_t g_any_key_hit = 0;
 | 
			
		||||
| 
						 | 
				
			
			@ -152,7 +152,7 @@ void led_matrix_task(void) {
 | 
			
		|||
        g_any_key_hit++;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    for (int led = 0; led < LED_DRIVER_LED_COUNT; led++) {
 | 
			
		||||
    for (int led = 0; led < DRIVER_LED_TOTAL; led++) {
 | 
			
		||||
        if (g_key_hit[led] < 255) {
 | 
			
		||||
            if (g_key_hit[led] == 254) g_last_led_count = MAX(g_last_led_count - 1, 0);
 | 
			
		||||
            g_key_hit[led]++;
 | 
			
		||||
| 
						 | 
				
			
			@ -217,7 +217,7 @@ void led_matrix_init(void) {
 | 
			
		|||
    wait_ms(500);
 | 
			
		||||
 | 
			
		||||
    // clear the key hits
 | 
			
		||||
    for (int led = 0; led < LED_DRIVER_LED_COUNT; led++) {
 | 
			
		||||
    for (int led = 0; led < DRIVER_LED_TOTAL; led++) {
 | 
			
		||||
        g_key_hit[led] = 255;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -265,7 +265,7 @@ static uint8_t decrement(uint8_t value, uint8_t step, uint8_t min, uint8_t max)
 | 
			
		|||
//     uint8_t led[8];
 | 
			
		||||
//     uint8_t led_count = map_row_column_to_led(row, column, led);
 | 
			
		||||
//     for(uint8_t i = 0; i < led_count; i++) {
 | 
			
		||||
//         if (led[i] < LED_DRIVER_LED_COUNT) {
 | 
			
		||||
//         if (led[i] < DRIVER_LED_TOTAL) {
 | 
			
		||||
//             void *address = backlight_get_custom_key_value_eeprom_address(led[i]);
 | 
			
		||||
//             eeprom_update_byte(address, value);
 | 
			
		||||
//         }
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -66,7 +66,7 @@ static void init(void) {
 | 
			
		|||
#        endif
 | 
			
		||||
#    endif
 | 
			
		||||
 | 
			
		||||
    for (int index = 0; index < LED_DRIVER_LED_COUNT; index++) {
 | 
			
		||||
    for (int index = 0; index < DRIVER_LED_TOTAL; index++) {
 | 
			
		||||
#    ifdef IS31FL3731
 | 
			
		||||
        IS31FL3731_set_led_control_register(index, true);
 | 
			
		||||
#    else
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -49,8 +49,8 @@ typedef struct PACKED {
 | 
			
		|||
 | 
			
		||||
typedef struct PACKED {
 | 
			
		||||
    uint8_t matrix_co[MATRIX_ROWS][MATRIX_COLS];
 | 
			
		||||
    point_t point[LED_DRIVER_LED_COUNT];
 | 
			
		||||
    uint8_t flags[LED_DRIVER_LED_COUNT];
 | 
			
		||||
    point_t point[DRIVER_LED_TOTAL];
 | 
			
		||||
    uint8_t flags[DRIVER_LED_TOTAL];
 | 
			
		||||
} led_config_t;
 | 
			
		||||
 | 
			
		||||
typedef union {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue