]> git.donarmstrong.com Git - qmk_firmware.git/blob - keyboards/sixshooter/sixshooter.h
Adds the Proton C base project (#4224)
[qmk_firmware.git] / keyboards / sixshooter / sixshooter.h
1 #ifndef SIXSHOOTER_H
2 #define SIXSHOOTER_H
3
4 #include "quantum.h"
5
6 #define LAYOUT( \
7         K00, K01, K02, \
8         K03, K04, K05 \
9 ) { \
10         { K00, K01, K02, K03, K04, K05 }, \
11 }
12
13
14 /*
15  * Define keyboard specific keycodes for controlling on/off for all LEDs as they
16  * are all on different pins with this PCB, rather than a single backlight pin
17  */
18 enum keyboard_keycode {
19   SS_LON = SAFE_RANGE,
20   SS_LOFF,
21   SAFE_RANGE_KB
22 };
23
24 inline void sixshooter_led_0_on(void)    { DDRB |=  (1<<6); PORTB |=  (1<<6); }
25 inline void sixshooter_led_1_on(void)    { DDRC |=  (1<<7); PORTC |=  (1<<7); }
26 inline void sixshooter_led_2_on(void)    { DDRD |=  (1<<0); PORTD |=  (1<<0); }
27 inline void sixshooter_led_3_on(void)    { DDRB |=  (1<<5); PORTB |=  (1<<5); }
28 inline void sixshooter_led_4_on(void)    { DDRD |=  (1<<7); PORTD |=  (1<<7); }
29 inline void sixshooter_led_5_on(void)    { DDRB |=  (1<<7); PORTB |=  (1<<7); }
30
31 inline void sixshooter_led_0_off(void)   { DDRB &= ~(1<<6); PORTB &= ~(1<<6); }
32 inline void sixshooter_led_1_off(void)   { DDRC &= ~(1<<7); PORTC &= ~(1<<7); }
33 inline void sixshooter_led_2_off(void)   { DDRD &= ~(1<<0); PORTD &= ~(1<<0); }
34 inline void sixshooter_led_3_off(void)   { DDRB &= ~(1<<5); PORTB &= ~(1<<5); }
35 inline void sixshooter_led_4_off(void)   { DDRD &= ~(1<<7); PORTD &= ~(1<<7); }
36 inline void sixshooter_led_5_off(void)   { DDRB &= ~(1<<7); PORTB &= ~(1<<7); }
37
38 inline void sixshooter_led_all_on(void) {
39   sixshooter_led_0_on();
40   sixshooter_led_1_on();
41   sixshooter_led_2_on();
42   sixshooter_led_3_on();
43   sixshooter_led_4_on();
44   sixshooter_led_5_on();
45 }
46 inline void sixshooter_led_all_off(void) {
47   sixshooter_led_0_off();
48   sixshooter_led_1_off();
49   sixshooter_led_2_off();
50   sixshooter_led_3_off();
51   sixshooter_led_4_off();
52   sixshooter_led_5_off();
53 }
54
55 #endif