diff options
Diffstat (limited to 'keyboards/tgr/alice/alice.c')
-rw-r--r-- | keyboards/tgr/alice/alice.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/keyboards/tgr/alice/alice.c b/keyboards/tgr/alice/alice.c index 39aed2cf5..9fb4957ac 100644 --- a/keyboards/tgr/alice/alice.c +++ b/keyboards/tgr/alice/alice.c | |||
@@ -16,3 +16,26 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
16 | */ | 16 | */ |
17 | 17 | ||
18 | #include "alice.h" | 18 | #include "alice.h" |
19 | |||
20 | void keyboard_pre_init_kb(void) { | ||
21 | led_init_ports(); | ||
22 | keyboard_pre_init_user(); | ||
23 | } | ||
24 | |||
25 | void led_init_ports(void) { | ||
26 | setPinOutput(D0); | ||
27 | setPinOutput(D1); | ||
28 | setPinOutput(D6); | ||
29 | writePinHigh(D0); | ||
30 | writePinHigh(D1); | ||
31 | writePinHigh(D6); | ||
32 | } | ||
33 | |||
34 | bool led_update_kb(led_t led_state) { | ||
35 | if (led_update_user(led_state)) { | ||
36 | writePin(D0, !led_state.num_lock); | ||
37 | writePin(D1, !led_state.caps_lock); | ||
38 | writePin(D6, !led_state.scroll_lock); | ||
39 | } | ||
40 | return true; | ||
41 | } | ||