summaryrefslogtreecommitdiff
path: root/quantum/split_common
diff options
context:
space:
mode:
authorJoel Challis <git@zvecr.com>2019-12-16 16:33:48 +0000
committerGitHub <noreply@github.com>2019-12-16 16:33:48 +0000
commitf3bf301825db5fd8bfa369d26584a64f5d640ecb (patch)
tree66e12caa8197ec58b3992f077882710e8f33d41d /quantum/split_common
parent85f4c3ebb456c2d6feebf8934ab014436d7f8f17 (diff)
Disable usb on slave half to resolve random 'lockup' (#7649)
Diffstat (limited to 'quantum/split_common')
-rw-r--r--quantum/split_common/split_util.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/quantum/split_common/split_util.c b/quantum/split_common/split_util.c
index 9366c3297a..076f186649 100644
--- a/quantum/split_common/split_util.c
+++ b/quantum/split_common/split_util.c
@@ -33,9 +33,11 @@ bool waitForUsb(void) {
wait_ms(100);
}
-#if defined(__AVR__)
// Avoid NO_USB_STARTUP_CHECK - Disable USB as the previous checks seem to enable it somehow
+#if defined(__AVR__)
(USBCON &= ~(_BV(USBE) | _BV(OTGPADE)));
+#else
+ usbStop(&USBD1);
#endif
return false;