diff options
Diffstat (limited to 'keyboard/clueboard2/clueboard2.c')
-rw-r--r-- | keyboard/clueboard2/clueboard2.c | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/keyboard/clueboard2/clueboard2.c b/keyboard/clueboard2/clueboard2.c new file mode 100644 index 000000000..97d393d18 --- /dev/null +++ b/keyboard/clueboard2/clueboard2.c | |||
@@ -0,0 +1,44 @@ | |||
1 | #include "clueboard2.h" | ||
2 | |||
3 | #ifdef BACKLIGHT_ENABLE | ||
4 | #include "backlight.h" | ||
5 | #endif | ||
6 | |||
7 | __attribute__ ((weak)) | ||
8 | void * matrix_init_user(void) { | ||
9 | // leave these blank | ||
10 | }; | ||
11 | |||
12 | __attribute__ ((weak)) | ||
13 | void * matrix_scan_user(void) { | ||
14 | // leave these blank | ||
15 | }; | ||
16 | |||
17 | void * matrix_init_kb(void) { | ||
18 | // put your keyboard start-up code here | ||
19 | // runs once when the firmware starts up | ||
20 | if (matrix_init_user) { | ||
21 | (*matrix_init_user)(); | ||
22 | } | ||
23 | led_init_ports(); | ||
24 | |||
25 | #ifdef BACKLIGHT_ENABLE | ||
26 | init_backlight_pin(); | ||
27 | #endif | ||
28 | |||
29 | #ifdef RGBLIGHT_ENABLE | ||
30 | rgblight_init(); | ||
31 | #endif | ||
32 | |||
33 | // JTAG disable for PORT F. write JTD bit twice within four cycles. | ||
34 | MCUCR |= (1<<JTD); | ||
35 | MCUCR |= (1<<JTD); | ||
36 | }; | ||
37 | |||
38 | void * matrix_scan_kb(void) { | ||
39 | // put your looping keyboard code here | ||
40 | // runs every cycle (a lot) | ||
41 | if (matrix_scan_user) { | ||
42 | (*matrix_scan_user)(); | ||
43 | } | ||
44 | }; | ||