forked from mirrors/qmk_userspace
Fixed mode switch doesn't work on some charger
This commit is contained in:
parent
e073a2b412
commit
bc57b3da30
2 changed files with 10 additions and 0 deletions
|
@ -236,6 +236,11 @@ void transport_changed(transport_t new_transport) {
|
|||
void usb_remote_wakeup(void) {
|
||||
if (USB_DRIVER.state == USB_SUSPENDED) {
|
||||
while (USB_DRIVER.state == USB_SUSPENDED) {
|
||||
wireless_pre_task();
|
||||
if (get_transport() != TRANSPORT_USB) {
|
||||
suspend_wakeup_init_quantum();
|
||||
return;
|
||||
}
|
||||
/* Do this in the suspended state */
|
||||
suspend_power_down(); // on AVR this deep sleeps for 15ms
|
||||
/* Remote wakeup */
|
||||
|
|
|
@ -236,6 +236,11 @@ void transport_changed(transport_t new_transport) {
|
|||
void usb_remote_wakeup(void) {
|
||||
if (USB_DRIVER.state == USB_SUSPENDED) {
|
||||
while (USB_DRIVER.state == USB_SUSPENDED) {
|
||||
wireless_pre_task();
|
||||
if (get_transport() != TRANSPORT_USB) {
|
||||
suspend_wakeup_init_quantum();
|
||||
return;
|
||||
}
|
||||
/* Do this in the suspended state */
|
||||
suspend_power_down(); // on AVR this deep sleeps for 15ms
|
||||
/* Remote wakeup */
|
||||
|
|
Loading…
Add table
Reference in a new issue