diff options
Diffstat (limited to 'keyboards/aeboards/ext65/rev1/rev1.c')
-rw-r--r-- | keyboards/aeboards/ext65/rev1/rev1.c | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/keyboards/aeboards/ext65/rev1/rev1.c b/keyboards/aeboards/ext65/rev1/rev1.c new file mode 100644 index 000000000..1d69a6897 --- /dev/null +++ b/keyboards/aeboards/ext65/rev1/rev1.c | |||
@@ -0,0 +1,32 @@ | |||
1 | #include "rev1.h" | ||
2 | |||
3 | void keyboard_pre_init_user(void) { | ||
4 | // Call the keyboard pre init code. | ||
5 | // Set our LED pins as output | ||
6 | setPinOutput(D5); | ||
7 | setPinOutput(D3); | ||
8 | setPinOutput(D2); | ||
9 | setPinOutput(D1); | ||
10 | } | ||
11 | |||
12 | bool led_update_kb(led_t led_state) { | ||
13 | bool res = led_update_user(led_state); | ||
14 | if(res) { | ||
15 | writePin(D5, led_state.num_lock); | ||
16 | writePin(D3, led_state.caps_lock); | ||
17 | writePin(D2, led_state.scroll_lock); | ||
18 | } | ||
19 | return res; | ||
20 | } | ||
21 | |||
22 | layer_state_t layer_state_set_kb(layer_state_t state) { | ||
23 | switch (get_highest_layer(state)) { | ||
24 | case 1: | ||
25 | writePinHigh(D1); | ||
26 | break; | ||
27 | default: // for any other layers, or the default layer | ||
28 | writePinLow(D1); | ||
29 | break; | ||
30 | } | ||
31 | return layer_state_set_user(state); | ||
32 | } | ||