]> git.donarmstrong.com Git - qmk_firmware.git/blob - keyboard/cluepad/cluepad.c
Adding clueboard/cluepad support to qmk
[qmk_firmware.git] / keyboard / cluepad / cluepad.c
1 #include "cluepad.h"
2
3 __attribute__ ((weak))
4 void * matrix_init_user(void) {
5     // leave these blank
6 };
7
8 __attribute__ ((weak))
9 void * matrix_scan_user(void) {
10     // leave these blank
11 };
12
13 void * matrix_init_kb(void) {
14     // put your keyboard start-up code here
15     // runs once when the firmware starts up
16     if (matrix_init_user) {
17         (*matrix_init_user)();
18     }
19
20     #ifdef BACKLIGHT_ENABLE
21         init_backlight_pin();
22     #endif
23
24     #ifdef RGBLIGHT_ENABLE
25         rgblight_init();
26     #endif
27
28     // JTAG disable for PORT F. write JTD bit twice within four cycles.
29     MCUCR |= (1<<JTD);
30     MCUCR |= (1<<JTD);
31 };
32
33 void * matrix_scan_kb(void) {
34         // put your looping keyboard code here
35         // runs every cycle (a lot)
36         if (matrix_scan_user) {
37                 (*matrix_scan_user)();
38         }
39 };