aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoel Challis <git@zvecr.com>2019-11-28 21:59:14 +0000
committerGitHub <noreply@github.com>2019-11-28 21:59:14 +0000
commit99f3321e2634547b57ec07f0d1d8b107670be824 (patch)
treefc13e4d297b29c9974b1f0fc004d9da19c03eb69
parent235da6973d34c3cffc4bd8f8cd0b9c8537d6b811 (diff)
downloadqmk_firmware-99f3321e2634547b57ec07f0d1d8b107670be824.tar.gz
qmk_firmware-99f3321e2634547b57ec07f0d1d8b107670be824.zip
Fix processing of RGB keycodes on slave half (#7404)
-rw-r--r--keyboards/crkbd/rev1/split_util.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/keyboards/crkbd/rev1/split_util.c b/keyboards/crkbd/rev1/split_util.c
index c0d44af29..35aa54d78 100644
--- a/keyboards/crkbd/rev1/split_util.c
+++ b/keyboards/crkbd/rev1/split_util.c
@@ -48,13 +48,13 @@ __attribute__((weak)) bool is_keyboard_left(void) {
48#elif defined(EE_HANDS) 48#elif defined(EE_HANDS)
49 return eeconfig_read_handedness(); 49 return eeconfig_read_handedness();
50#elif defined(MASTER_RIGHT) 50#elif defined(MASTER_RIGHT)
51 return !is_keyboard_master(); 51 return !has_usb();
52#endif 52#endif
53 53
54 return is_keyboard_master(); 54 return has_usb();
55} 55}
56 56
57__attribute__((weak)) bool is_keyboard_master(void) { 57__attribute__((weak)) bool has_usb(void) {
58 static enum { UNKNOWN, MASTER, SLAVE } usbstate = UNKNOWN; 58 static enum { UNKNOWN, MASTER, SLAVE } usbstate = UNKNOWN;
59 59
60 // only check once, as this is called often 60 // only check once, as this is called often
@@ -103,8 +103,3 @@ void split_keyboard_setup(void) {
103 } 103 }
104 sei(); 104 sei();
105} 105}
106
107// backwards compat
108bool has_usb(void) {
109 return is_keyboard_master();
110}