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

@ -20,18 +20,18 @@ void keyboard_post_init_kb(void)
{
// Led pins:
// C12 is the left-most led, normally Num Lock, but on Spacesaver M it's Caps Lock. Configured in info.json
setPinOutput(C11); // middle led, always off on Spacesaver M
writePin(C11, 0);
setPinOutput(C10); // right-most led, normally Scroll Lock, but on Spacesaver M indicates function layer
gpio_set_pin_output(C11); // middle led, always off on Spacesaver M
gpio_write_pin(C11, 0);
gpio_set_pin_output(C10); // right-most led, normally Scroll Lock, but on Spacesaver M indicates function layer
}
layer_state_t layer_state_set_kb(layer_state_t state) {
switch (get_highest_layer(state)) {
case 0:
writePin(C10, 0);
gpio_write_pin(C10, 0);
break;
default:
writePin(C10, 1);
gpio_write_pin(C10, 1);
break;
}
return layer_state_set_user(state);