Change the prototype of matrix_output_unselect_delay() (#13045)
The prototype of matrix_output_unselect_delay() has been changed as follows.
```c
void matrix_output_unselect_delay(uint8_t line, bool key_pressed);
```
Currently, no keyboard seems to be redefining `matrix_output_unselect_delay()`, so there is no change in the system behavior.
With this change, the keyboard level code can get some optimization hints, for example, the following.
```c
 void matrix_output_unselect_delay(uint8_t line, bool key_pressed) {
     /* If none of the keys are pressed,
      *  there is no need to wait for time for the next line. */
     if (key_pressed) {
 #ifdef MATRIX_IO_DELAY
 #  if MATRIX_IO_DELAY > 0
         wait_us(MATRIX_IO_DELAY);
 #  endif
 #else
         wait_us(30);
 #endif
     }
}
```
			
			
This commit is contained in:
		
							parent
							
								
									a62b10176e
								
							
						
					
					
						commit
						ac2e6e01f1
					
				
					 3 changed files with 7 additions and 4 deletions
				
			
		| 
						 | 
				
			
			@ -56,7 +56,7 @@ matrix_row_t matrix_get_row(uint8_t row);
 | 
			
		|||
void matrix_print(void);
 | 
			
		||||
/* delay between changing matrix pin state and reading values */
 | 
			
		||||
void matrix_output_select_delay(void);
 | 
			
		||||
void matrix_output_unselect_delay(void);
 | 
			
		||||
void matrix_output_unselect_delay(uint8_t line, bool key_pressed);
 | 
			
		||||
/* only for backwards compatibility. delay between changing matrix pin state and reading values */
 | 
			
		||||
void matrix_io_delay(void);
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue