Update GPIO macros in keymaps (#23792)
This commit is contained in:
		
							parent
							
								
									8ff8e9eae5
								
							
						
					
					
						commit
						b8f29c3865
					
				
					 82 changed files with 402 additions and 402 deletions
				
			
		| 
						 | 
				
			
			@ -51,20 +51,20 @@ bool encoder_update_user(uint8_t index, bool clockwise) {
 | 
			
		|||
 | 
			
		||||
void matrix_init_user(void) {
 | 
			
		||||
  // set top LED to output and off (active low)
 | 
			
		||||
  setPinOutput(D5);
 | 
			
		||||
  writePinHigh(D5);
 | 
			
		||||
  gpio_set_pin_output(D5);
 | 
			
		||||
  gpio_write_pin_high(D5);
 | 
			
		||||
  // set middle LED to output and off (active low)
 | 
			
		||||
  setPinOutput(D4);
 | 
			
		||||
  writePinHigh(D4);
 | 
			
		||||
  gpio_set_pin_output(D4);
 | 
			
		||||
  gpio_write_pin_high(D4);
 | 
			
		||||
  // set bottom LED to output and off (active low)
 | 
			
		||||
  setPinOutput(D3);
 | 
			
		||||
  writePinHigh(D3);
 | 
			
		||||
  gpio_set_pin_output(D3);
 | 
			
		||||
  gpio_write_pin_high(D3);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// write to above indicators in a binary fashion based on current layer
 | 
			
		||||
layer_state_t layer_state_set_user(layer_state_t state) {
 | 
			
		||||
    writePin(D5, get_highest_layer(state));
 | 
			
		||||
    writePin(D4, !layer_state_cmp(state, 1));
 | 
			
		||||
    writePin(D3, !layer_state_cmp(state, 2));
 | 
			
		||||
    gpio_write_pin(D5, get_highest_layer(state));
 | 
			
		||||
    gpio_write_pin(D4, !layer_state_cmp(state, 1));
 | 
			
		||||
    gpio_write_pin(D3, !layer_state_cmp(state, 2));
 | 
			
		||||
    return state;
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -51,20 +51,20 @@ bool encoder_update_user(uint8_t index, bool clockwise) {
 | 
			
		|||
 | 
			
		||||
void matrix_init_user(void) {
 | 
			
		||||
  // set top LED to output and off (active low)
 | 
			
		||||
  setPinOutput(D5);
 | 
			
		||||
  writePinHigh(D5);
 | 
			
		||||
  gpio_set_pin_output(D5);
 | 
			
		||||
  gpio_write_pin_high(D5);
 | 
			
		||||
  // set middle LED to output and off (active low)
 | 
			
		||||
  setPinOutput(D4);
 | 
			
		||||
  writePinHigh(D4);
 | 
			
		||||
  gpio_set_pin_output(D4);
 | 
			
		||||
  gpio_write_pin_high(D4);
 | 
			
		||||
  // set bottom LED to output and off (active low)
 | 
			
		||||
  setPinOutput(D3);
 | 
			
		||||
  writePinHigh(D3);
 | 
			
		||||
  gpio_set_pin_output(D3);
 | 
			
		||||
  gpio_write_pin_high(D3);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// write to above indicators in a binary fashion based on current layer
 | 
			
		||||
layer_state_t layer_state_set_user(layer_state_t state) {
 | 
			
		||||
    writePin(D5, get_highest_layer(state));
 | 
			
		||||
    writePin(D4, !layer_state_cmp(state, 1));
 | 
			
		||||
    writePin(D3, !layer_state_cmp(state, 2));
 | 
			
		||||
    gpio_write_pin(D5, get_highest_layer(state));
 | 
			
		||||
    gpio_write_pin(D4, !layer_state_cmp(state, 1));
 | 
			
		||||
    gpio_write_pin(D3, !layer_state_cmp(state, 2));
 | 
			
		||||
    return state;
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue