aboutsummaryrefslogtreecommitdiff
path: root/keyboards/gh60
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/gh60')
-rw-r--r--keyboards/gh60/revc/config.h3
-rw-r--r--keyboards/gh60/revc/revc.c26
-rw-r--r--keyboards/gh60/revc/revc.h20
-rw-r--r--keyboards/gh60/satan/config.h3
-rw-r--r--keyboards/gh60/satan/satan.c23
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
4extern inline void gh60_caps_led_on(void);
5extern inline void gh60_poker_leds_on(void);
6extern inline void gh60_fn_led_on(void);
7extern inline void gh60_esc_led_on(void);
8extern inline void gh60_wasd_leds_on(void);
9
10extern inline void gh60_caps_led_off(void);
11extern inline void gh60_poker_leds_off(void);
12extern inline void gh60_fn_led_off(void);
13extern inline void gh60_esc_led_off(void);
14extern inline void gh60_wasd_leds_off(void);
15
16
17void 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 */
15inline void gh60_caps_led_on(void) { setPinOutput(B2); writePinLow(B2); } 15static inline void gh60_caps_led_on(void) { setPinOutput(B2); writePinLow(B2); }
16inline void gh60_poker_leds_on(void) { setPinOutput(F4); writePinLow(F4); } 16static inline void gh60_poker_leds_on(void) { setPinOutput(F4); writePinLow(F4); }
17inline void gh60_fn_led_on(void) { setPinOutput(F5); writePinLow(F5); } 17static inline void gh60_fn_led_on(void) { setPinOutput(F5); writePinLow(F5); }
18inline void gh60_esc_led_on(void) { setPinOutput(F6); writePinLow(F6); } 18static inline void gh60_esc_led_on(void) { setPinOutput(F6); writePinLow(F6); }
19inline void gh60_wasd_leds_on(void) { setPinOutput(F7); writePinLow(F7); } 19static inline void gh60_wasd_leds_on(void) { setPinOutput(F7); writePinLow(F7); }
20 20
21inline void gh60_caps_led_off(void) { setPinInput(B2); } 21static inline void gh60_caps_led_off(void) { setPinInput(B2); }
22inline void gh60_poker_leds_off(void) { setPinInput(F4); } 22static inline void gh60_poker_leds_off(void) { setPinInput(F4); }
23inline void gh60_fn_led_off(void) { setPinInput(F5); } 23static inline void gh60_fn_led_off(void) { setPinInput(F5); }
24inline void gh60_esc_led_off(void) { setPinInput(F6); } 24static inline void gh60_esc_led_off(void) { setPinInput(F6); }
25inline void gh60_wasd_leds_off(void) { setPinInput(F7); } 25static 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
3void matrix_init_kb(void) {
4 matrix_init_user();
5 led_init_ports();
6};
7
8void matrix_scan_kb(void) {
9 matrix_scan_user();
10};
11
12void led_init_ports(void) {
13 setPinOutput(B2);
14}
15
16void 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}