]> git.friedersdorff.com Git - max/tmk_keyboard.git/blobdiff - tmk_core/protocol/chibios/main.c
Merge commit '657d9f23fe47fb88cf221adb23095082f191ba6a'
[max/tmk_keyboard.git] / tmk_core / protocol / chibios / main.c
index c4666ebd01bfe0d1f89f6daa69af351b92622e14..b62cfa9c57e8392131e652be40135b69a41ef376 100644 (file)
@@ -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);
   }
 }