aboutsummaryrefslogtreecommitdiff
path: root/keyboards/xbows/knight/knight.c
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/xbows/knight/knight.c')
-rw-r--r--keyboards/xbows/knight/knight.c30
1 files changed, 17 insertions, 13 deletions
diff --git a/keyboards/xbows/knight/knight.c b/keyboards/xbows/knight/knight.c
index 1b8adc8c2..f697f23f9 100644
--- a/keyboards/xbows/knight/knight.c
+++ b/keyboards/xbows/knight/knight.c
@@ -1,19 +1,23 @@
1#include "knight.h" 1#include "knight.h"
2
2void matrix_init_kb(void) { 3void matrix_init_kb(void) {
4 // put your keyboard start-up code here
5 // runs once when the firmware starts up
6
7 matrix_init_user();
8 led_init_ports();
9}
10
11void led_init_ports(void) {
3 setPinOutput(D1); 12 setPinOutput(D1);
13 writePinHigh(D1);
4 setPinOutput(E2); 14 setPinOutput(E2);
5 matrix_init_user(); 15 writePinHigh(E2);
6}; 16}
7void led_set_kb(uint8_t usb_led) { 17bool led_update_kb(led_t led_state) {
8 if (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) { 18 if(led_update_user(led_state)) {
9 writePinHigh(D1); 19 writePin(E2, !led_state.caps_lock);
10 } else { 20 writePin(D1, !led_state.num_lock);
11 writePinLow(D1);
12 }
13 if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) {
14 writePinHigh(E2);
15 } else {
16 writePinLow(E2);
17 } 21 }
18 led_set_user(usb_led); 22 return true;
19} 23}