2023-05-01 03:33:10 +00:00
|
|
|
#include "quantum.h"
|
2019-01-24 06:07:31 +00:00
|
|
|
|
2021-08-03 17:34:32 +00:00
|
|
|
void led_init_ports(void) {
|
2020-01-27 06:32:11 +00:00
|
|
|
// Set our LED pins as output
|
2024-05-03 05:21:29 +00:00
|
|
|
gpio_set_pin_output(B13); // LED1
|
|
|
|
gpio_write_pin_low(B13);
|
|
|
|
gpio_set_pin_output(B14); // LED2
|
|
|
|
gpio_write_pin_low(B14);
|
|
|
|
gpio_set_pin_output(A8); // LED3
|
|
|
|
gpio_write_pin_low(A8);
|
|
|
|
gpio_set_pin_output(A0); // Capslock LED
|
|
|
|
gpio_write_pin_low(A0);
|
2019-01-24 06:07:31 +00:00
|
|
|
}
|
|
|
|
|
2020-11-21 19:11:50 +00:00
|
|
|
bool led_update_kb(led_t led_state) {
|
|
|
|
bool res = led_update_user(led_state);
|
|
|
|
if(res) {
|
2024-05-03 05:21:29 +00:00
|
|
|
gpio_write_pin(B13, led_state.num_lock);
|
|
|
|
gpio_write_pin(A0, led_state.caps_lock);
|
|
|
|
gpio_write_pin(B14, led_state.caps_lock);
|
|
|
|
gpio_write_pin(A8, led_state.scroll_lock);
|
2019-01-24 06:07:31 +00:00
|
|
|
}
|
2020-11-21 19:11:50 +00:00
|
|
|
return res;
|
2019-01-24 06:07:31 +00:00
|
|
|
}
|