diff options
Diffstat (limited to 'keyboard/cluepad/cluepad.c')
| -rw-r--r-- | keyboard/cluepad/cluepad.c | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/keyboard/cluepad/cluepad.c b/keyboard/cluepad/cluepad.c new file mode 100644 index 000000000..d55b99960 --- /dev/null +++ b/keyboard/cluepad/cluepad.c | |||
| @@ -0,0 +1,39 @@ | |||
| 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 | }; | ||
