]> git.donarmstrong.com Git - qmk_firmware.git/blob - quantum/template/template.c
Merge branch 'master' of https://github.com/jackhumbert/qmk_firmware
[qmk_firmware.git] / quantum / template / template.c
1 #include "%KEYBOARD%.h"
2
3 __attribute__ ((weak))
4 void matrix_init_user(void) {
5         // leave this function blank - it can be defined in a keymap file
6 };
7
8 __attribute__ ((weak))
9 void matrix_scan_user(void) {
10         // leave this function blank - it can be defined in a keymap file
11 }
12
13 __attribute__ ((weak))
14 void led_set_user(uint8_t usb_led) {
15         // leave this function blank - it can be defined in a keymap file
16 }
17
18 void matrix_init_kb(void) {
19         // put your keyboard start-up code here
20         // runs once when the firmware starts up
21         
22         matrix_init_user();
23 }
24
25 void matrix_scan_kb(void) {
26     // put your looping keyboard code here
27     // runs every cycle (a lot)
28
29         matrix_scan_user();
30 }
31
32 void led_set_kb(uint8_t usb_led) {
33         // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
34
35         led_set_user(usb_led);
36 }