From 9db7651e7bfb13b8e2ebbd95f4de61ea2658b1c8 Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Mon, 16 Dec 2019 16:33:48 +0000 Subject: Disable usb on slave half to resolve random 'lockup' (#7649) --- quantum/split_common/split_util.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'quantum/split_common/split_util.c') 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; -- cgit v1.2.3