]> git.donarmstrong.com Git - qmk_firmware.git/blob - keyboards/sixshooter/sixshooter.c
First pass at reorganizing docs
[qmk_firmware.git] / keyboards / sixshooter / sixshooter.c
1 #include "sixshooter.h"
2
3 extern inline void sixshooter_led_0_on(void);
4 extern inline void sixshooter_led_1_on(void);
5 extern inline void sixshooter_led_2_on(void);
6 extern inline void sixshooter_led_3_on(void);
7 extern inline void sixshooter_led_4_on(void);
8 extern inline void sixshooter_led_5_on(void);
9
10 extern inline void sixshooter_led_0_off(void);
11 extern inline void sixshooter_led_1_off(void);
12 extern inline void sixshooter_led_2_off(void);
13 extern inline void sixshooter_led_3_off(void);
14 extern inline void sixshooter_led_4_off(void);
15 extern inline void sixshooter_led_5_off(void);
16
17 extern inline void sixshooter_led_all_on(void);
18 extern inline void sixshooter_led_all_off(void);
19
20 void matrix_init_kb(void) {
21         // put your keyboard start-up code here
22         // runs once when the firmware starts up
23
24         matrix_init_user();
25 }
26
27 void matrix_scan_kb(void) {
28         // put your looping keyboard code here
29         // runs every cycle (a lot)
30
31         matrix_scan_user();
32 }
33
34 bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
35         // put your per-action keyboard code here
36         // runs for every action, just before processing by the firmware
37   if (record->event.pressed) {
38
39     /* Check for custom keycodes for turning on and off LEDs */
40     switch(keycode) {
41       case SS_LON:
42         sixshooter_led_all_on();
43         return false;
44       case SS_LOFF:
45         sixshooter_led_all_off();
46         return false;
47     }
48   }
49
50         return process_record_user(keycode, record);
51 }
52
53 void led_set_kb(uint8_t usb_led) {
54         // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
55
56         led_set_user(usb_led);
57 }