summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoel Challis <git@zvecr.com>2019-12-16 16:33:48 +0000
committerFlorian Didron <fdidron@users.noreply.github.com>2020-01-09 08:57:11 +0900
commit9db7651e7bfb13b8e2ebbd95f4de61ea2658b1c8 (patch)
tree14e501c8a0cb55e7772982a43d7c5b35e5b6fa43
parentb89cafbdecff76b74dd8f797c149c03ed77a9ffd (diff)
Disable usb on slave half to resolve random 'lockup' (#7649)
-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 5c548de059..da9e0a57dc 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;