diff options
Diffstat (limited to 'keyboards/gh60/revc')
-rw-r--r-- | keyboards/gh60/revc/config.h | 3 | ||||
-rw-r--r-- | keyboards/gh60/revc/revc.c | 26 | ||||
-rw-r--r-- | keyboards/gh60/revc/revc.h | 20 |
3 files changed, 13 insertions, 36 deletions
diff --git a/keyboards/gh60/revc/config.h b/keyboards/gh60/revc/config.h index 8c24b1e7e..ccb95a989 100644 --- a/keyboards/gh60/revc/config.h +++ b/keyboards/gh60/revc/config.h | |||
@@ -57,6 +57,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
57 | /* define if matrix has ghost (lacks anti-ghosting diodes) */ | 57 | /* define if matrix has ghost (lacks anti-ghosting diodes) */ |
58 | //#define MATRIX_HAS_GHOST | 58 | //#define MATRIX_HAS_GHOST |
59 | 59 | ||
60 | #define LED_CAPS_LOCK_PIN B2 | ||
61 | #define LED_PIN_ON_STATE 0 | ||
62 | |||
60 | /* number of backlight levels */ | 63 | /* number of backlight levels */ |
61 | #define BACKLIGHT_LEVELS 3 | 64 | #define BACKLIGHT_LEVELS 3 |
62 | 65 | ||
diff --git a/keyboards/gh60/revc/revc.c b/keyboards/gh60/revc/revc.c index e06739d2b..47dd5410f 100644 --- a/keyboards/gh60/revc/revc.c +++ b/keyboards/gh60/revc/revc.c | |||
@@ -1,27 +1 @@ | |||
1 | #include "revc.h" | #include "revc.h" | |
2 | |||
3 | |||
4 | extern inline void gh60_caps_led_on(void); | ||
5 | extern inline void gh60_poker_leds_on(void); | ||
6 | extern inline void gh60_fn_led_on(void); | ||
7 | extern inline void gh60_esc_led_on(void); | ||
8 | extern inline void gh60_wasd_leds_on(void); | ||
9 | |||
10 | extern inline void gh60_caps_led_off(void); | ||
11 | extern inline void gh60_poker_leds_off(void); | ||
12 | extern inline void gh60_fn_led_off(void); | ||
13 | extern inline void gh60_esc_led_off(void); | ||
14 | extern inline void gh60_wasd_leds_off(void); | ||
15 | |||
16 | |||
17 | void led_set_kb(uint8_t usb_led) { | ||
18 | // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here | ||
19 | |||
20 | if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { | ||
21 | gh60_caps_led_on(); | ||
22 | } else { | ||
23 | gh60_caps_led_off(); | ||
24 | } | ||
25 | |||
26 | led_set_user(usb_led); | ||
27 | } | ||
diff --git a/keyboards/gh60/revc/revc.h b/keyboards/gh60/revc/revc.h index 450c59020..a94322ad7 100644 --- a/keyboards/gh60/revc/revc.h +++ b/keyboards/gh60/revc/revc.h | |||
@@ -12,17 +12,17 @@ | |||
12 | * B2 Capslock LED | 12 | * B2 Capslock LED |
13 | * B0 not connected | 13 | * B0 not connected |
14 | */ | 14 | */ |
15 | inline void gh60_caps_led_on(void) { setPinOutput(B2); writePinLow(B2); } | 15 | static inline void gh60_caps_led_on(void) { setPinOutput(B2); writePinLow(B2); } |
16 | inline void gh60_poker_leds_on(void) { setPinOutput(F4); writePinLow(F4); } | 16 | static inline void gh60_poker_leds_on(void) { setPinOutput(F4); writePinLow(F4); } |
17 | inline void gh60_fn_led_on(void) { setPinOutput(F5); writePinLow(F5); } | 17 | static inline void gh60_fn_led_on(void) { setPinOutput(F5); writePinLow(F5); } |
18 | inline void gh60_esc_led_on(void) { setPinOutput(F6); writePinLow(F6); } | 18 | static inline void gh60_esc_led_on(void) { setPinOutput(F6); writePinLow(F6); } |
19 | inline void gh60_wasd_leds_on(void) { setPinOutput(F7); writePinLow(F7); } | 19 | static inline void gh60_wasd_leds_on(void) { setPinOutput(F7); writePinLow(F7); } |
20 | 20 | ||
21 | inline void gh60_caps_led_off(void) { setPinInput(B2); } | 21 | static inline void gh60_caps_led_off(void) { setPinInput(B2); } |
22 | inline void gh60_poker_leds_off(void) { setPinInput(F4); } | 22 | static inline void gh60_poker_leds_off(void) { setPinInput(F4); } |
23 | inline void gh60_fn_led_off(void) { setPinInput(F5); } | 23 | static inline void gh60_fn_led_off(void) { setPinInput(F5); } |
24 | inline void gh60_esc_led_off(void) { setPinInput(F6); } | 24 | static inline void gh60_esc_led_off(void) { setPinInput(F6); } |
25 | inline void gh60_wasd_leds_off(void) { setPinInput(F7); } | 25 | static inline void gh60_wasd_leds_off(void) { setPinInput(F7); } |
26 | 26 | ||
27 | /* GH60 keymap definition macro | 27 | /* GH60 keymap definition macro |
28 | * K2C, K31 and K3C are extra keys for ISO | 28 | * K2C, K31 and K3C are extra keys for ISO |