Update GPIO API usage in keyboard code (#23361)

This commit is contained in:
Ryan 2024-05-03 15:21:29 +10:00 committed by GitHub
parent 5426a7a129
commit d09a06a1b3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
390 changed files with 3912 additions and 3913 deletions

View file

@ -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);
}
}