X-Git-Url: http://git.linex4red.de/pub/USBasp.git/blobdiff_plain/d860e9e842c05e759214f5170f78783decae9956..35bdada24b49c4dd1900a78a1595077b99814cf9:/LUFA/Drivers/USB/LowLevel/HostChapter9.c?ds=inline diff --git a/LUFA/Drivers/USB/LowLevel/HostChapter9.c b/LUFA/Drivers/USB/LowLevel/HostChapter9.c index ee51cf3ae..238e099ef 100644 --- a/LUFA/Drivers/USB/LowLevel/HostChapter9.c +++ b/LUFA/Drivers/USB/LowLevel/HostChapter9.c @@ -153,9 +153,13 @@ End_Of_Control_Send: static uint8_t USB_Host_Wait_For_Setup_IOS(const uint8_t WaitType) { + #if (USB_HOST_TIMEOUT_MS < 0xFF) + uint8_t TimeoutCounter = USB_HOST_TIMEOUT_MS; + #else uint16_t TimeoutCounter = USB_HOST_TIMEOUT_MS; + #endif - while (!(((WaitType == USB_HOST_WAITFOR_SetupSent) && Pipe_IsSETUPSent()) || + while (!(((WaitType == USB_HOST_WAITFOR_SetupSent) && Pipe_IsSETUPSent()) || ((WaitType == USB_HOST_WAITFOR_InReceived) && Pipe_IsINReceived()) || ((WaitType == USB_HOST_WAITFOR_OutReady) && Pipe_IsOUTReady()))) {