|
From: <IC-...@t-...> - 2006-09-04 09:59:05
|
Hello,
>From: IC-...@t-... (kosel)
>It seems, that this prevents the host (XP SP2) to wake up my device after S1
>resume!
>I am also not sure, if allways all the certified USB 2.0 hubs have received a
>resume.
>
>My loop:
>
>#ifdef unix
>// see ms-help://MS.VSCC.2003/MS.MSDNQTR.2003FEB.1031/dnucmg/html/UCMGch09.htm
>#include <time.h>
>#define SECONDS 1 // unix measures time in sleep in seconds
>#else
>#include <windows.h>
>#define SECONDS 1000 // microsoft sleep uses milliseconds
>#define sleep(x) Sleep(x*SECONDS)
>#endif
>
> while(!udev) {
if I call the sleep function in this line, no USB device resumes at all!
(At least all devices and hubs which are connected to the same root hub port.)
> udev = getUsbStepcounter(devicenumber);
> fflush(stderr);
> if(!udev) {
> printf("Waiting for device %d to reconnect\n",
> devicenumber);
> fflush(stdout); // flush iobuffers before
> // sleepling
> sleep(1);
> }
> }
Is there any known side effect between the MS Sleep function and libusb?
Greetings
Juergen
|