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
				
			
		| 
						 | 
				
			
			@ -1,19 +1,19 @@
 | 
			
		|||
#include "quantum.h"
 | 
			
		||||
 | 
			
		||||
void keyboard_pre_init_kb (void) {
 | 
			
		||||
  setPinOutput(B12);
 | 
			
		||||
  setPinOutput(B13);
 | 
			
		||||
  gpio_set_pin_output(B12);
 | 
			
		||||
  gpio_set_pin_output(B13);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
bool led_update_kb(led_t led_state) {
 | 
			
		||||
  bool res = led_update_user(led_state);
 | 
			
		||||
  if(res) {
 | 
			
		||||
    writePin(B13, led_state.caps_lock);
 | 
			
		||||
    gpio_write_pin(B13, led_state.caps_lock);
 | 
			
		||||
  }
 | 
			
		||||
  return res;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
__attribute__((weak)) layer_state_t layer_state_set_user(layer_state_t state) {
 | 
			
		||||
  writePin(B12, layer_state_cmp(state, 1));
 | 
			
		||||
  gpio_write_pin(B12, layer_state_cmp(state, 1));
 | 
			
		||||
  return state;
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue