Disable usb on slave half to resolve random 'lockup' (#7649)

This commit is contained in:
Joel Challis
2019-12-16 16:33:48 +00:00
committed by Florian Didron
parent b89cafbdec
commit 9db7651e7b

View File

@@ -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;