1
0
Fork 0

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

@ -22,16 +22,16 @@ void matrix_io_delay(void) { __asm__ volatile("nop\nnop\nnop\n"); }
void keyboard_pre_init_user(void) {
// Call the keyboard pre init code.
// Set our LED pins as output
setPinOutput(LED_LAYERS_PIN);
gpio_set_pin_output(LED_LAYERS_PIN);
}
layer_state_t layer_state_set_kb(layer_state_t state) {
switch (get_highest_layer(state)) {
case 1:
writePinHigh(LED_LAYERS_PIN);
gpio_write_pin_high(LED_LAYERS_PIN);
break;
default: // for any other layers, or the default layer
writePinLow(LED_LAYERS_PIN);
gpio_write_pin_low(LED_LAYERS_PIN);
break;
}
return layer_state_set_user(state);