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,13 +22,13 @@ static const 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 setPinInputHigh_atomic(pin_t pin) {
 | 
			
		||||
    ATOMIC_BLOCK_FORCEON { setPinInputHigh(pin); }
 | 
			
		||||
    ATOMIC_BLOCK_FORCEON { gpio_set_pin_input_high(pin); }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static void select_row(uint8_t row) {
 | 
			
		||||
| 
						 | 
				
			
			@ -81,7 +81,7 @@ static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row)
 | 
			
		|||
    // For each col...
 | 
			
		||||
    for (uint8_t col_index = 0; col_index < MATRIX_COLS / 2; col_index++) {
 | 
			
		||||
        // Check row pin state
 | 
			
		||||
        if (readPin(col_pins[col_index])) {
 | 
			
		||||
        if (gpio_read_pin(col_pins[col_index])) {
 | 
			
		||||
            // Pin HI, clear col bit
 | 
			
		||||
            current_matrix[current_row] &= ~(MATRIX_ROW_SHIFTER << col_index);
 | 
			
		||||
        } else {
 | 
			
		||||
| 
						 | 
				
			
			@ -109,7 +109,7 @@ static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col)
 | 
			
		|||
        matrix_row_t last_row_value = current_matrix[row_index];
 | 
			
		||||
 | 
			
		||||
        // Check row pin state
 | 
			
		||||
        if (readPin(row_pins[row_index])) {
 | 
			
		||||
        if (gpio_read_pin(row_pins[row_index])) {
 | 
			
		||||
            // Pin HI, clear col bit
 | 
			
		||||
            current_matrix[row_index] &= ~(MATRIX_ROW_SHIFTER << ( current_col + MATRIX_COLS/2));
 | 
			
		||||
        } else {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue