]> git.donarmstrong.com Git - qmk_firmware.git/blob - keyboards/gh60/gh60.c
Merge branch 'master' of https://github.com/jackhumbert/qmk_firmware
[qmk_firmware.git] / keyboards / gh60 / gh60.c
1 #include "gh60.h"\r
2 #include "led.h"\r
3 \r
4 __attribute__ ((weak))\r
5 void matrix_init_user(void) {\r
6         // leave this function blank - it can be defined in a keymap file\r
7 };\r
8 \r
9 __attribute__ ((weak))\r
10 void matrix_scan_user(void) {\r
11         // leave this function blank - it can be defined in a keymap file\r
12 }\r
13 \r
14 __attribute__ ((weak))\r
15 bool process_action_user(keyrecord_t *record) {\r
16         // leave this function blank - it can be defined in a keymap file\r
17         return true;\r
18 }\r
19 \r
20 __attribute__ ((weak))\r
21 void led_set_user(uint8_t usb_led) {\r
22         // leave this function blank - it can be defined in a keymap file\r
23 }\r
24 \r
25 void matrix_init_kb(void) {\r
26         // put your keyboard start-up code here\r
27         // runs once when the firmware starts up\r
28 \r
29         matrix_init_user();\r
30 }\r
31 \r
32 void matrix_scan_kb(void) {\r
33         // put your looping keyboard code here\r
34         // runs every cycle (a lot)\r
35 \r
36         matrix_scan_user();\r
37 }\r
38 \r
39 bool process_action_kb(keyrecord_t *record) {\r
40         // put your per-action keyboard code here\r
41         // runs for every action, just before processing by the firmware\r
42 \r
43         return process_action_user(record);\r
44 }\r
45 \r
46 void led_set_kb(uint8_t usb_led) {\r
47         // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here\r
48         \r
49     if (usb_led & (1<<USB_LED_CAPS_LOCK)) {\r
50                 gh60_caps_led_on();\r
51                 } else {\r
52                 gh60_caps_led_off(); \r
53     }\r
54         \r
55     // if (usb_led & (1<<USB_LED_NUM_LOCK)) {\r
56                 // gh60_esc_led_on();\r
57                 // } else {\r
58                 // gh60_esc_led_off(); \r
59     // }\r
60         \r
61     // if (usb_led & (1<<USB_LED_SCROLL_LOCK)) {\r
62                 // gh60_fn_led_on();\r
63                 // } else {\r
64                 // gh60_fn_led_off();   \r
65     // }\r
66 \r
67         led_set_user(usb_led);  \r
68 }\r