Add a keymatrix_t type
This contains both the matrix number and key position, in preparation for multi-matrix support
This commit is contained in:
		
							parent
							
								
									c11c7948e6
								
							
						
					
					
						commit
						f9c61b1bbe
					
				
					 14 changed files with 59 additions and 49 deletions
				
			
		| 
						 | 
				
			
			@ -34,16 +34,18 @@ namespace
 | 
			
		|||
 | 
			
		||||
 | 
			
		||||
  uint8_t read_cache(uint8_t col, uint8_t row) {
 | 
			
		||||
    keypos_t key;
 | 
			
		||||
    key.col = col;
 | 
			
		||||
    key.row =  row;
 | 
			
		||||
    keymatrix_t key;
 | 
			
		||||
    key.pos.col = col;
 | 
			
		||||
    key.pos.row =  row;
 | 
			
		||||
    key.matrix = 0;
 | 
			
		||||
    return read_source_layers_cache(key);
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  void write_cache(uint8_t col, uint8_t row, uint8_t value) {
 | 
			
		||||
    keypos_t key;
 | 
			
		||||
    key.col = col;
 | 
			
		||||
    key.row =  row;
 | 
			
		||||
    keymatrix_t key;
 | 
			
		||||
    key.pos.col = col;
 | 
			
		||||
    key.pos.row = row;
 | 
			
		||||
    key.matrix = 0;
 | 
			
		||||
    return update_source_layers_cache(key, value);
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue