mirror of
https://github.com/qmk/qmk_firmware
synced 2024-11-17 17:35:30 +00:00
[Core] ChibiOS: Fix USB bus disconnect handling (#18566)
This commit is contained in:
parent
c4ff8192c2
commit
6f13a76530
2 changed files with 3 additions and 1 deletions
|
@ -734,6 +734,7 @@ void init_usb_driver(USBDriver *usbp) {
|
|||
* after a reset.
|
||||
*/
|
||||
usbDisconnectBus(usbp);
|
||||
usbStop(usbp);
|
||||
wait_ms(50);
|
||||
usbStart(usbp, &usbcfg);
|
||||
usbConnectBus(usbp);
|
||||
|
@ -742,8 +743,8 @@ void init_usb_driver(USBDriver *usbp) {
|
|||
}
|
||||
|
||||
__attribute__((weak)) void restart_usb_driver(USBDriver *usbp) {
|
||||
usbStop(usbp);
|
||||
usbDisconnectBus(usbp);
|
||||
usbStop(usbp);
|
||||
|
||||
#if USB_SUSPEND_WAKEUP_DELAY > 0
|
||||
// Some hubs, kvm switches, and monitors do
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
#include "usb_util.h"
|
||||
|
||||
void usb_disconnect(void) {
|
||||
usbDisconnectBus(&USBD1);
|
||||
usbStop(&USBD1);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue