qmk_firmware

QMK firmware for my keyboards (Corne, Sweep Ferris) and trackball (Ploopy Adept)
Log | Files | Refs | Submodules | LICENSE

sixshooter.h (1940B)


      1 #pragma once
      2 
      3 #include "quantum.h"
      4 
      5 #define SIXSHOOTER_LED_0_PIN B6
      6 #define SIXSHOOTER_LED_1_PIN C7
      7 #define SIXSHOOTER_LED_2_PIN D0
      8 #define SIXSHOOTER_LED_3_PIN B5
      9 #define SIXSHOOTER_LED_4_PIN D7
     10 #define SIXSHOOTER_LED_5_PIN B7
     11 
     12 inline void sixshooter_led_0_on(void) {
     13   gpio_set_pin_output(SIXSHOOTER_LED_0_PIN);
     14   gpio_write_pin_high(SIXSHOOTER_LED_0_PIN);
     15 }
     16 inline void sixshooter_led_1_on(void) {
     17   gpio_set_pin_output(SIXSHOOTER_LED_1_PIN);
     18   gpio_write_pin_high(SIXSHOOTER_LED_1_PIN);
     19 }
     20 inline void sixshooter_led_2_on(void) {
     21   gpio_set_pin_output(SIXSHOOTER_LED_2_PIN);
     22   gpio_write_pin_high(SIXSHOOTER_LED_2_PIN);
     23 }
     24 inline void sixshooter_led_3_on(void) {
     25   gpio_set_pin_output(SIXSHOOTER_LED_3_PIN);
     26   gpio_write_pin_high(SIXSHOOTER_LED_3_PIN);
     27 }
     28 inline void sixshooter_led_4_on(void) {
     29   gpio_set_pin_output(SIXSHOOTER_LED_4_PIN);
     30   gpio_write_pin_high(SIXSHOOTER_LED_4_PIN);
     31 }
     32 inline void sixshooter_led_5_on(void) {
     33   gpio_set_pin_output(SIXSHOOTER_LED_5_PIN);
     34   gpio_write_pin_high(SIXSHOOTER_LED_5_PIN);
     35 }
     36 
     37 inline void sixshooter_led_0_off(void) {
     38   gpio_set_pin_input(SIXSHOOTER_LED_0_PIN);
     39 }
     40 inline void sixshooter_led_1_off(void) {
     41   gpio_set_pin_input(SIXSHOOTER_LED_1_PIN);
     42 }
     43 inline void sixshooter_led_2_off(void) {
     44   gpio_set_pin_input(SIXSHOOTER_LED_2_PIN);
     45 }
     46 inline void sixshooter_led_3_off(void) {
     47   gpio_set_pin_input(SIXSHOOTER_LED_3_PIN);
     48 }
     49 inline void sixshooter_led_4_off(void) {
     50   gpio_set_pin_input(SIXSHOOTER_LED_4_PIN);
     51 }
     52 inline void sixshooter_led_5_off(void) {
     53   gpio_set_pin_input(SIXSHOOTER_LED_5_PIN);
     54 }
     55 
     56 inline void sixshooter_led_all_on(void) {
     57   sixshooter_led_0_on();
     58   sixshooter_led_1_on();
     59   sixshooter_led_2_on();
     60   sixshooter_led_3_on();
     61   sixshooter_led_4_on();
     62   sixshooter_led_5_on();
     63 }
     64 inline void sixshooter_led_all_off(void) {
     65   sixshooter_led_0_off();
     66   sixshooter_led_1_off();
     67   sixshooter_led_2_off();
     68   sixshooter_led_3_off();
     69   sixshooter_led_4_off();
     70   sixshooter_led_5_off();
     71 }