X-Git-Url: http://git.linex4red.de/pub/USBasp.git/blobdiff_plain/feabfd12ce3d14b43d2decb2b2f1c5b27e9d6181..d0db78432fc02bacbd57cc9f15eb05b4e56981cb:/LUFA/Drivers/USB/LowLevel/Host.c diff --git a/LUFA/Drivers/USB/LowLevel/Host.c b/LUFA/Drivers/USB/LowLevel/Host.c index 1932b645c..efe4baeeb 100644 --- a/LUFA/Drivers/USB/LowLevel/Host.c +++ b/LUFA/Drivers/USB/LowLevel/Host.c @@ -66,6 +66,7 @@ void USB_Host_ProcessNextHostState(void) USB_HostState = HOST_STATE_Attached_WaitForDeviceSettle; break; case HOST_STATE_Attached_WaitForDeviceSettle: + #if HOST_DEVICE_SETTLE_DELAY_MS > 0 _delay_ms(1); if (!(WaitMSRemaining--)) @@ -78,6 +79,9 @@ void USB_Host_ProcessNextHostState(void) USB_HostState = HOST_STATE_Attached_WaitForConnect; } + #else + USB_HostState = HOST_STATE_Attached_WaitForConnect; + #endif break; case HOST_STATE_Attached_WaitForConnect: @@ -162,8 +166,6 @@ void USB_Host_ProcessNextHostState(void) break; } - Pipe_SetInfiniteINRequests(); - USB_ControlRequest = (USB_Request_Header_t) { .bmRequestType = (REQDIR_HOSTTODEVICE | REQTYPE_STANDARD | REQREC_DEVICE), @@ -286,7 +288,7 @@ static void USB_Host_ResetDevice(void) USB_INT_Enable(USB_INT_DDISCI); } -uint8_t USB_Host_SetDeviceConfiguration(uint8_t ConfigNumber) +uint8_t USB_Host_SetDeviceConfiguration(const uint8_t ConfigNumber) { USB_ControlRequest = (USB_Request_Header_t) { @@ -302,7 +304,7 @@ uint8_t USB_Host_SetDeviceConfiguration(uint8_t ConfigNumber) return USB_Host_SendControlRequest(NULL); } -uint8_t USB_Host_GetDeviceDescriptor(void* DeviceDescriptorPtr) +uint8_t USB_Host_GetDeviceDescriptor(void* const DeviceDescriptorPtr) { USB_ControlRequest = (USB_Request_Header_t) {