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
|
@ -128,13 +128,13 @@ static void init_cols(void) {
|
|||
// not needed, already done as part of init_mcp23018()
|
||||
|
||||
// init on teensy
|
||||
setPinInputHigh(F0);
|
||||
setPinInputHigh(F1);
|
||||
setPinInputHigh(F4);
|
||||
setPinInputHigh(F5);
|
||||
setPinInputHigh(F6);
|
||||
setPinInputHigh(F7);
|
||||
setPinInputHigh(D7);
|
||||
gpio_set_pin_input_high(F0);
|
||||
gpio_set_pin_input_high(F1);
|
||||
gpio_set_pin_input_high(F4);
|
||||
gpio_set_pin_input_high(F5);
|
||||
gpio_set_pin_input_high(F6);
|
||||
gpio_set_pin_input_high(F7);
|
||||
gpio_set_pin_input_high(D7);
|
||||
}
|
||||
|
||||
static matrix_row_t read_cols(uint8_t row) {
|
||||
|
@ -175,13 +175,13 @@ static void unselect_rows(void) {
|
|||
// direction
|
||||
|
||||
// unselect on teensy
|
||||
setPinInput(B0);
|
||||
setPinInput(B1);
|
||||
setPinInput(B2);
|
||||
setPinInput(B3);
|
||||
setPinInput(D2);
|
||||
setPinInput(D3);
|
||||
setPinInput(C6);
|
||||
gpio_set_pin_input(B0);
|
||||
gpio_set_pin_input(B1);
|
||||
gpio_set_pin_input(B2);
|
||||
gpio_set_pin_input(B3);
|
||||
gpio_set_pin_input(D2);
|
||||
gpio_set_pin_input(D3);
|
||||
gpio_set_pin_input(C6);
|
||||
}
|
||||
|
||||
static void select_row(uint8_t row) {
|
||||
|
@ -200,32 +200,32 @@ static void select_row(uint8_t row) {
|
|||
// Output low(DDR:1, PORT:0) to select
|
||||
switch (row) {
|
||||
case 7:
|
||||
setPinOutput(B0);
|
||||
writePinLow(B0);
|
||||
gpio_set_pin_output(B0);
|
||||
gpio_write_pin_low(B0);
|
||||
break;
|
||||
case 8:
|
||||
setPinOutput(B1);
|
||||
writePinLow(B1);
|
||||
gpio_set_pin_output(B1);
|
||||
gpio_write_pin_low(B1);
|
||||
break;
|
||||
case 9:
|
||||
setPinOutput(B2);
|
||||
writePinLow(B2);
|
||||
gpio_set_pin_output(B2);
|
||||
gpio_write_pin_low(B2);
|
||||
break;
|
||||
case 10:
|
||||
setPinOutput(B3);
|
||||
writePinLow(B3);
|
||||
gpio_set_pin_output(B3);
|
||||
gpio_write_pin_low(B3);
|
||||
break;
|
||||
case 11:
|
||||
setPinOutput(D2);
|
||||
writePinLow(D2);
|
||||
gpio_set_pin_output(D2);
|
||||
gpio_write_pin_low(D2);
|
||||
break;
|
||||
case 12:
|
||||
setPinOutput(D3);
|
||||
writePinLow(D3);
|
||||
gpio_set_pin_output(D3);
|
||||
gpio_write_pin_low(D3);
|
||||
break;
|
||||
case 13:
|
||||
setPinOutput(C6);
|
||||
writePinLow(C6);
|
||||
gpio_set_pin_output(C6);
|
||||
gpio_write_pin_low(C6);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue