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
				
			
		| 
						 | 
				
			
			@ -36,27 +36,27 @@ static pin_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS;
 | 
			
		|||
 | 
			
		||||
static inline void setPinOutput_writeLow(pin_t pin) {
 | 
			
		||||
    ATOMIC_BLOCK_FORCEON {
 | 
			
		||||
        setPinOutput(pin);
 | 
			
		||||
        writePinLow(pin);
 | 
			
		||||
        gpio_set_pin_output(pin);
 | 
			
		||||
        gpio_write_pin_low(pin);
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static inline void setPinOutput_writeHigh(pin_t pin) {
 | 
			
		||||
    ATOMIC_BLOCK_FORCEON {
 | 
			
		||||
        setPinOutput(pin);
 | 
			
		||||
        writePinHigh(pin);
 | 
			
		||||
        gpio_set_pin_output(pin);
 | 
			
		||||
        gpio_write_pin_high(pin);
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static inline void setPinInputHigh_atomic(pin_t pin) {
 | 
			
		||||
    ATOMIC_BLOCK_FORCEON {
 | 
			
		||||
        setPinInputHigh(pin);
 | 
			
		||||
        gpio_set_pin_input_high(pin);
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static inline uint8_t readMatrixPin(pin_t pin) {
 | 
			
		||||
    if (pin != NO_PIN) {
 | 
			
		||||
        return readPin(pin);
 | 
			
		||||
        return gpio_read_pin(pin);
 | 
			
		||||
    } else {
 | 
			
		||||
        return 1;
 | 
			
		||||
    }
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue