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
				
			
		| 
						 | 
				
			
			@ -28,7 +28,7 @@ enum custom_keycodes{
 | 
			
		|||
 | 
			
		||||
// Documentation: custom_quantum_functions.md
 | 
			
		||||
void keyboard_post_init_kb(void){
 | 
			
		||||
    setPinOutput(BUZZER_PIN);
 | 
			
		||||
    gpio_set_pin_output(BUZZER_PIN);
 | 
			
		||||
    keyboard_post_init_user();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -36,7 +36,7 @@ void housekeeping_task_kb(void){
 | 
			
		|||
    if(buzzer_on){
 | 
			
		||||
        if(buzzer_active && timer_elapsed(buzzer_timer) > buzzer_dwell){
 | 
			
		||||
        buzzer_active = false;
 | 
			
		||||
        writePinLow(BUZZER_PIN);
 | 
			
		||||
        gpio_write_pin_low(BUZZER_PIN);
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
    housekeeping_task_user();
 | 
			
		||||
| 
						 | 
				
			
			@ -50,7 +50,7 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
 | 
			
		|||
            if(!buzzer_active){
 | 
			
		||||
                buzzer_active = true;
 | 
			
		||||
                buzzer_timer = timer_read();
 | 
			
		||||
                writePinHigh(BUZZER_PIN);
 | 
			
		||||
                gpio_write_pin_high(BUZZER_PIN);
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -94,10 +94,10 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
 | 
			
		|||
                if(buzzer_on == true){
 | 
			
		||||
                    buzzer_active = true;
 | 
			
		||||
                    buzzer_timer = timer_read();
 | 
			
		||||
                    writePinHigh(BUZZER_PIN);
 | 
			
		||||
                    gpio_write_pin_high(BUZZER_PIN);
 | 
			
		||||
                }
 | 
			
		||||
                else{
 | 
			
		||||
                    writePinLow(BUZZER_PIN);
 | 
			
		||||
                    gpio_write_pin_low(BUZZER_PIN);
 | 
			
		||||
                }
 | 
			
		||||
                break;
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue