summaryrefslogtreecommitdiffstats
path: root/keyboards/bpiphany/sixshooter/sixshooter.h
diff options
context:
space:
mode:
authormechmerlin <mechmerlin@gmail.com>2019-02-18 19:17:47 +0100
committerDrashna Jaelre <drashna@live.com>2019-02-20 05:48:35 +0100
commitffb75b720fd0d4d28ed0ae99b66313c06df47183 (patch)
tree5837c340bef6eab446c23551dc04ac603df90005 /keyboards/bpiphany/sixshooter/sixshooter.h
parent33f1259f89f9d752c9507c5a2cb19a9286cf1388 (diff)
downloadqmk_firmware-ffb75b720fd0d4d28ed0ae99b66313c06df47183.tar.gz
qmk_firmware-ffb75b720fd0d4d28ed0ae99b66313c06df47183.tar.xz
move sixshooter into bpiphany directory and edit readme
Diffstat (limited to 'keyboards/bpiphany/sixshooter/sixshooter.h')
-rw-r--r--keyboards/bpiphany/sixshooter/sixshooter.h44
1 files changed, 44 insertions, 0 deletions
diff --git a/keyboards/bpiphany/sixshooter/sixshooter.h b/keyboards/bpiphany/sixshooter/sixshooter.h
new file mode 100644
index 000000000..490d562d0
--- /dev/null
+++ b/keyboards/bpiphany/sixshooter/sixshooter.h
@@ -0,0 +1,44 @@
+#ifndef SIXSHOOTER_H
+#define SIXSHOOTER_H
+
+#include "quantum.h"
+
+#define LAYOUT( \
+ K00, K01, K02, \
+ K03, K04, K05 \
+) { \
+ { K00, K01, K02, K03, K04, K05 }, \
+}
+
+inline void sixshooter_led_0_on(void) { DDRB |= (1<<6); PORTB |= (1<<6); }
+inline void sixshooter_led_1_on(void) { DDRC |= (1<<7); PORTC |= (1<<7); }
+inline void sixshooter_led_2_on(void) { DDRD |= (1<<0); PORTD |= (1<<0); }
+inline void sixshooter_led_3_on(void) { DDRB |= (1<<5); PORTB |= (1<<5); }
+inline void sixshooter_led_4_on(void) { DDRD |= (1<<7); PORTD |= (1<<7); }
+inline void sixshooter_led_5_on(void) { DDRB |= (1<<7); PORTB |= (1<<7); }
+
+inline void sixshooter_led_0_off(void) { DDRB &= ~(1<<6); PORTB &= ~(1<<6); }
+inline void sixshooter_led_1_off(void) { DDRC &= ~(1<<7); PORTC &= ~(1<<7); }
+inline void sixshooter_led_2_off(void) { DDRD &= ~(1<<0); PORTD &= ~(1<<0); }
+inline void sixshooter_led_3_off(void) { DDRB &= ~(1<<5); PORTB &= ~(1<<5); }
+inline void sixshooter_led_4_off(void) { DDRD &= ~(1<<7); PORTD &= ~(1<<7); }
+inline void sixshooter_led_5_off(void) { DDRB &= ~(1<<7); PORTB &= ~(1<<7); }
+
+inline void sixshooter_led_all_on(void) {
+ sixshooter_led_0_on();
+ sixshooter_led_1_on();
+ sixshooter_led_2_on();
+ sixshooter_led_3_on();
+ sixshooter_led_4_on();
+ sixshooter_led_5_on();
+}
+inline void sixshooter_led_all_off(void) {
+ sixshooter_led_0_off();
+ sixshooter_led_1_off();
+ sixshooter_led_2_off();
+ sixshooter_led_3_off();
+ sixshooter_led_4_off();
+ sixshooter_led_5_off();
+}
+
+#endif