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
|
@ -130,12 +130,12 @@ void keyboard_post_init_kb(void) {
|
|||
// and disable USB connectivity when the ADC value exceeds 1000,
|
||||
// to avoid affecting the serial usart communication between the left hand and the right hand.
|
||||
if (is_keyboard_left()) {
|
||||
setPinOutput(A0);
|
||||
writePinHigh(A0);
|
||||
gpio_set_pin_output(A0);
|
||||
gpio_write_pin_high(A0);
|
||||
} else {
|
||||
if ((analogReadPin_my(B0) > 1000) || (analogReadPin_my(B1) > 1000)) {
|
||||
setPinInput(A11);
|
||||
setPinInput(A12);
|
||||
gpio_set_pin_input(A11);
|
||||
gpio_set_pin_input(A12);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue