mirror of
				https://github.com/mfulz/qmk_firmware.git
				synced 2025-10-31 05:12:33 +01:00 
			
		
		
		
	Adding keyboard level weak function for slave matrix scan (#12317)
This commit is contained in:
		
							parent
							
								
									2f6236d1ea
								
							
						
					
					
						commit
						ff41c22fdc
					
				| @ -74,6 +74,11 @@ void matrix_scan_kb(void); | |||||||
| void matrix_init_user(void); | void matrix_init_user(void); | ||||||
| void matrix_scan_user(void); | void matrix_scan_user(void); | ||||||
| 
 | 
 | ||||||
|  | #ifdef SPLIT_KEYBOARD | ||||||
|  | void matrix_slave_scan_kb(void); | ||||||
|  | void matrix_slave_scan_user(void); | ||||||
|  | #endif | ||||||
|  | 
 | ||||||
| #ifdef __cplusplus | #ifdef __cplusplus | ||||||
| } | } | ||||||
| #endif | #endif | ||||||
|  | |||||||
| @ -43,6 +43,7 @@ extern matrix_row_t matrix[MATRIX_ROWS];      // debounced values | |||||||
| uint8_t thisHand, thatHand; | uint8_t thisHand, thatHand; | ||||||
| 
 | 
 | ||||||
| // user-defined overridable functions
 | // user-defined overridable functions
 | ||||||
|  | __attribute__((weak)) void matrix_slave_scan_kb(void) { matrix_slave_scan_user(); } | ||||||
| __attribute__((weak)) void matrix_slave_scan_user(void) {} | __attribute__((weak)) void matrix_slave_scan_user(void) {} | ||||||
| 
 | 
 | ||||||
| static inline void setPinOutput_writeLow(pin_t pin) { | static inline void setPinOutput_writeLow(pin_t pin) { | ||||||
| @ -284,7 +285,7 @@ bool matrix_post_scan(void) { | |||||||
|     } else { |     } else { | ||||||
|         transport_slave(matrix + thatHand, matrix + thisHand); |         transport_slave(matrix + thatHand, matrix + thisHand); | ||||||
| 
 | 
 | ||||||
|         matrix_slave_scan_user(); |         matrix_slave_scan_kb(); | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     return changed; |     return changed; | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 XScorpion2
						XScorpion2