diff options
Diffstat (limited to 'keyboards/gh60')
-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 | ||||
-rw-r--r-- | keyboards/gh60/satan/config.h | 3 | ||||
-rw-r--r-- | keyboards/gh60/satan/satan.c | 23 |
5 files changed, 16 insertions, 59 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 |
diff --git a/keyboards/gh60/satan/config.h b/keyboards/gh60/satan/config.h index 8c172314a..ac343782e 100644 --- a/keyboards/gh60/satan/config.h +++ b/keyboards/gh60/satan/config.h | |||
@@ -37,6 +37,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
37 | #define MATRIX_COL_PINS { F0, F1, E6, C7, C6, B7, D4, B1, B0, B5, B4, D7, D6, B3 } | 37 | #define MATRIX_COL_PINS { F0, F1, E6, C7, C6, B7, D4, B1, B0, B5, B4, D7, D6, B3 } |
38 | #define UNUSED_PINS | 38 | #define UNUSED_PINS |
39 | 39 | ||
40 | #define LED_NUM_LOCK_PIN B2 | ||
41 | #define LED_PIN_ON_STATE 0 | ||
42 | |||
40 | #define BACKLIGHT_PIN B6 | 43 | #define BACKLIGHT_PIN B6 |
41 | 44 | ||
42 | /* COL2ROW or ROW2COL */ | 45 | /* COL2ROW or ROW2COL */ |
diff --git a/keyboards/gh60/satan/satan.c b/keyboards/gh60/satan/satan.c index 8542a57c4..cd6508445 100644 --- a/keyboards/gh60/satan/satan.c +++ b/keyboards/gh60/satan/satan.c | |||
@@ -1,24 +1 @@ | |||
1 | #include "satan.h" | #include "satan.h" | |
2 | |||
3 | void matrix_init_kb(void) { | ||
4 | matrix_init_user(); | ||
5 | led_init_ports(); | ||
6 | }; | ||
7 | |||
8 | void matrix_scan_kb(void) { | ||
9 | matrix_scan_user(); | ||
10 | }; | ||
11 | |||
12 | void led_init_ports(void) { | ||
13 | setPinOutput(B2); | ||
14 | } | ||
15 | |||
16 | void led_set_kb(uint8_t usb_led) { | ||
17 | if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { | ||
18 | // Turn Caps Lock LED on | ||
19 | writePinLow(B2); | ||
20 | } else { | ||
21 | // Turn Caps Lock LED off | ||
22 | writePinHigh(B2); | ||
23 | } | ||
24 | } | ||