mirror of
https://github.com/qmk/qmk_firmware.git
synced 2024-11-22 11:29:26 +00:00
Add hotfix for chibios keyboards not wake
This commit is contained in:
parent
3430907692
commit
02516cbc24
@ -230,6 +230,7 @@ int main(void) {
|
|||||||
/* Remote wakeup */
|
/* Remote wakeup */
|
||||||
if (suspend_wakeup_condition()) {
|
if (suspend_wakeup_condition()) {
|
||||||
usbWakeupHost(&USB_DRIVER);
|
usbWakeupHost(&USB_DRIVER);
|
||||||
|
restart_usb_driver(&USB_DRIVER);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* Woken up */
|
/* Woken up */
|
||||||
|
@ -574,6 +574,13 @@ void init_usb_driver(USBDriver *usbp) {
|
|||||||
chVTObjectInit(&keyboard_idle_timer);
|
chVTObjectInit(&keyboard_idle_timer);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void restart_usb_driver(USBDriver *usbp) {
|
||||||
|
usbStop(usbp);
|
||||||
|
usbDisconnectBus(usbp);
|
||||||
|
usbStart(usbp, &usbcfg);
|
||||||
|
usbConnectBus(usbp);
|
||||||
|
}
|
||||||
|
|
||||||
/* ---------------------------------------------------------
|
/* ---------------------------------------------------------
|
||||||
* Keyboard functions
|
* Keyboard functions
|
||||||
* ---------------------------------------------------------
|
* ---------------------------------------------------------
|
||||||
|
@ -35,6 +35,9 @@
|
|||||||
/* Initialize the USB driver and bus */
|
/* Initialize the USB driver and bus */
|
||||||
void init_usb_driver(USBDriver *usbp);
|
void init_usb_driver(USBDriver *usbp);
|
||||||
|
|
||||||
|
/* Restart the USB driver and bus */
|
||||||
|
void restart_usb_driver(USBDriver *usbp);
|
||||||
|
|
||||||
/* ---------------
|
/* ---------------
|
||||||
* Keyboard header
|
* Keyboard header
|
||||||
* ---------------
|
* ---------------
|
||||||
|
Loading…
Reference in New Issue
Block a user