summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdrian <elagil@users.noreply.github.com>2020-06-10 18:25:45 +0200
committerGitHub <noreply@github.com>2020-06-10 17:25:45 +0100
commitcff3c3bf284a2d60b1c3cb80e9775580559de739 (patch)
treed13756f79d7366d5f1e456210d05fd65c4d3d276
parentb7cb4111ea1804b90dfe2ab402b1776ae4d07d26 (diff)
Fixed slave-side keyboard half unresponsiveness (#9360)
* Fixed slave-side keyboard half unresponsiveness due to how LUFA handles USB_Disable() * changes to formatting Co-authored-by: Joel Challis <git@zvecr.com> Co-authored-by: Joel Challis <git@zvecr.com>
-rw-r--r--quantum/split_common/split_util.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/quantum/split_common/split_util.c b/quantum/split_common/split_util.c
index dfd06f5f94..afcd9d2aa5 100644
--- a/quantum/split_common/split_util.c
+++ b/quantum/split_common/split_util.c
@@ -39,7 +39,10 @@ volatile bool isLeftHand = true;
#if defined(SPLIT_USB_DETECT)
# if defined(PROTOCOL_LUFA)
static inline bool usbHasActiveConnection(void) { return USB_Device_IsAddressSet(); }
-static inline void usbDisable(void) { USB_Disable(); }
+static inline void usbDisable(void) {
+ USB_Disable();
+ USB_DeviceState = DEVICE_STATE_Unattached;
+}
# elif defined(PROTOCOL_CHIBIOS)
static inline bool usbHasActiveConnection(void) { return usbGetDriverStateI(&USBD1) == USB_ACTIVE; }
static inline void usbDisable(void) { usbStop(&USBD1); }