X-Git-Url: http://git.linex4red.de/pub/USBasp.git/blobdiff_plain/958a1b4e2bffdc548b34edd322d30cec5d5feacd..86e6ed7f31d29fa3d2aea1f6c40aa4647fce2690:/LUFA/Drivers/USB/LowLevel/HostChapter9.c diff --git a/LUFA/Drivers/USB/LowLevel/HostChapter9.c b/LUFA/Drivers/USB/LowLevel/HostChapter9.c index 4b96c691d..2bdab7c67 100644 --- a/LUFA/Drivers/USB/LowLevel/HostChapter9.c +++ b/LUFA/Drivers/USB/LowLevel/HostChapter9.c @@ -46,7 +46,7 @@ uint8_t USB_Host_SendControlRequest(void* BufferPtr) USB_Host_ResumeBus(); if ((ReturnStatus = USB_Host_WaitMS(1)) != HOST_WAITERROR_Successful) - return ReturnStatus; + goto End_Of_Control_Send; Pipe_SetToken(PIPE_TOKEN_SETUP); Pipe_ClearErrorFlags(); @@ -153,7 +153,11 @@ 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()) || ((WaitType == USB_HOST_WAITFOR_InReceived) && Pipe_IsINReceived()) ||