2023-04-30 20:33:10 -07:00
|
|
|
#include "quantum.h"
|
2019-01-23 22:07:31 -08:00
|
|
|
|
2021-08-03 10:34:32 -07:00
|
|
|
void led_init_ports(void) {
|
2020-01-26 22:32:11 -08:00
|
|
|
// Set our LED pins as output
|
2020-11-21 11:11:50 -08:00
|
|
|
setPinOutput(B13); // LED1
|
|
|
|
writePinLow(B13);
|
|
|
|
setPinOutput(B14); // LED2
|
|
|
|
writePinLow(B14);
|
|
|
|
setPinOutput(A8); // LED3
|
|
|
|
writePinLow(A8);
|
|
|
|
setPinOutput(A0); // Capslock LED
|
|
|
|
writePinLow(A0);
|
2019-01-23 22:07:31 -08:00
|
|
|
}
|
|
|
|
|
2020-11-21 11:11:50 -08:00
|
|
|
bool led_update_kb(led_t led_state) {
|
|
|
|
bool res = led_update_user(led_state);
|
|
|
|
if(res) {
|
|
|
|
writePin(B13, led_state.num_lock);
|
|
|
|
writePin(A0, led_state.caps_lock);
|
|
|
|
writePin(B14, led_state.caps_lock);
|
|
|
|
writePin(A8, led_state.scroll_lock);
|
2019-01-23 22:07:31 -08:00
|
|
|
}
|
2020-11-21 11:11:50 -08:00
|
|
|
return res;
|
2019-01-23 22:07:31 -08:00
|
|
|
}
|