Update GPIO API usage in keyboard code (#23361)
This commit is contained in:
		
							parent
							
								
									5426a7a129
								
							
						
					
					
						commit
						d09a06a1b3
					
				
					 390 changed files with 3912 additions and 3913 deletions
				
			
		| 
						 | 
				
			
			@ -22,20 +22,20 @@ void board_init(void) {
 | 
			
		|||
}
 | 
			
		||||
 | 
			
		||||
void keyboard_pre_init_kb(void) {
 | 
			
		||||
  setPinOutput(B5);
 | 
			
		||||
  setPinOutput(B6);
 | 
			
		||||
  setPinOutput(B7);
 | 
			
		||||
  setPinOutput(B8);
 | 
			
		||||
  setPinOutput(B9);
 | 
			
		||||
  gpio_set_pin_output(B5);
 | 
			
		||||
  gpio_set_pin_output(B6);
 | 
			
		||||
  gpio_set_pin_output(B7);
 | 
			
		||||
  gpio_set_pin_output(B8);
 | 
			
		||||
  gpio_set_pin_output(B9);
 | 
			
		||||
  keyboard_pre_init_user();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
layer_state_t layer_state_set_kb(layer_state_t state) {
 | 
			
		||||
    state = layer_state_set_user(state);
 | 
			
		||||
    writePin(B7, layer_state_cmp(state, 0));
 | 
			
		||||
    writePin(B6, layer_state_cmp(state, 1));
 | 
			
		||||
    writePin(B5, layer_state_cmp(state, 2));
 | 
			
		||||
    writePin(B8, layer_state_cmp(state, 3));
 | 
			
		||||
    writePin(B9, layer_state_cmp(state, 4));
 | 
			
		||||
    gpio_write_pin(B7, layer_state_cmp(state, 0));
 | 
			
		||||
    gpio_write_pin(B6, layer_state_cmp(state, 1));
 | 
			
		||||
    gpio_write_pin(B5, layer_state_cmp(state, 2));
 | 
			
		||||
    gpio_write_pin(B8, layer_state_cmp(state, 3));
 | 
			
		||||
    gpio_write_pin(B9, layer_state_cmp(state, 4));
 | 
			
		||||
    return state;
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue