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
|
@ -17,20 +17,20 @@
|
|||
|
||||
void led_init_ports(void) {
|
||||
/* Setting status LEDs pins to output and +5V (off) */
|
||||
setPinOutput(B4);
|
||||
setPinOutput(B5);
|
||||
setPinOutput(B6);
|
||||
writePinHigh(B4);
|
||||
writePinHigh(B5);
|
||||
writePinHigh(B6);
|
||||
gpio_set_pin_output(B4);
|
||||
gpio_set_pin_output(B5);
|
||||
gpio_set_pin_output(B6);
|
||||
gpio_write_pin_high(B4);
|
||||
gpio_write_pin_high(B5);
|
||||
gpio_write_pin_high(B6);
|
||||
}
|
||||
|
||||
bool led_update_kb(led_t led_state) {
|
||||
bool res = led_update_user(led_state);
|
||||
if(res) {
|
||||
writePin(B4, !led_state.num_lock);
|
||||
writePin(B6, !led_state.caps_lock);
|
||||
writePin(B5, !led_state.scroll_lock);
|
||||
gpio_write_pin(B4, !led_state.num_lock);
|
||||
gpio_write_pin(B6, !led_state.caps_lock);
|
||||
gpio_write_pin(B5, !led_state.scroll_lock);
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue