Fix remotewakeup of PJRC stack(Fix #121)
authortmk <nobody@nowhere>
Mon, 28 Apr 2014 06:21:42 +0000 (15:21 +0900)
committertmk <nobody@nowhere>
Mon, 28 Apr 2014 07:41:35 +0000 (16:41 +0900)
- without this fix wakeup often fails
- keyboard can wakeup once or twice but fails after that

protocol/pjrc/usb.c

index 2b267d48004199e581aa16bce0bf53656eda3cfd..1e6ba8719a2a124ef687e63916bc30dd037df120 100644 (file)
@@ -629,6 +629,7 @@ uint8_t usb_configured(void)
 void usb_remote_wakeup(void)
 {
     UDCON |= (1<<RMWKUP);
+    while (UDCON & (1<<RMWKUP));
 }
 
 
Imprint / Impressum