]> git.donarmstrong.com Git - qmk_firmware.git/blob - keyboard/clueboard2/clueboard2.c
adds backlight levels to the satan keyboard (#431)
[qmk_firmware.git] / keyboard / clueboard2 / clueboard2.c
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     // JTAG disable for PORT F. write JTD bit twice within four cycles.
30     MCUCR |= (1<<JTD);
31     MCUCR |= (1<<JTD);
32 };
33
34 void matrix_scan_kb(void) {
35         // put your looping keyboard code here
36         // runs every cycle (a lot)
37         if (matrix_scan_user) {
38                 (*matrix_scan_user)();
39         }
40 };