X-Git-Url: https://git.friedersdorff.com/?a=blobdiff_plain;f=tmk_core%2Fprotocol%2Fchibios%2Fmain.c;h=b62cfa9c57e8392131e652be40135b69a41ef376;hb=524c7d133c57fd744906a0269189fe4bc979e894;hp=c4666ebd01bfe0d1f89f6daa69af351b92622e14;hpb=c1c8e079ca78937096238f11f5ed6ee87cc743ef;p=max%2Ftmk_keyboard.git diff --git a/tmk_core/protocol/chibios/main.c b/tmk_core/protocol/chibios/main.c index c4666ebd..b62cfa9c 100644 --- a/tmk_core/protocol/chibios/main.c +++ b/tmk_core/protocol/chibios/main.c @@ -121,10 +121,10 @@ int main(void) { while(USB_DRIVER.state == USB_SUSPENDED) { /* Do this in the suspended state */ suspend_power_down(); // on AVR this deep sleeps for 15ms - // TODO: remote wakeup - // if(USB_Device_RemoteWakeupEnabled (USB_DRIVER.status & 2) && suspend_wakeup_condition()) { - // USB_Device_SendRemoteWakeup(); - // } + /* Remote wakeup */ + if((USB_DRIVER.status & 2) && suspend_wakeup_condition()) { + send_remote_wakeup(&USB_DRIVER); + } } /* Woken up */ // variables has been already cleared by the wakeup hook @@ -135,6 +135,5 @@ int main(void) { } keyboard_task(); - chThdSleepMilliseconds(5); } }