X-Git-Url: http://git.linex4red.de/pub/USBasp.git/blobdiff_plain/f1199200e167a737a4676378da184387e543830c..f547eb36080dacf275cd94fc3ddfb4c618c587fa:/Demos/Host/LowLevel/CDCHost/ConfigDescriptor.c?ds=sidebyside diff --git a/Demos/Host/LowLevel/CDCHost/ConfigDescriptor.c b/Demos/Host/LowLevel/CDCHost/ConfigDescriptor.c index baf02a216..f1a57cd74 100644 --- a/Demos/Host/LowLevel/CDCHost/ConfigDescriptor.c +++ b/Demos/Host/LowLevel/CDCHost/ConfigDescriptor.c @@ -52,7 +52,7 @@ uint8_t ProcessConfigurationDescriptor(void) uint8_t FoundEndpoints = 0; /* Get Configuration Descriptor size from the device */ - if (USB_GetDeviceConfigDescriptor(&ConfigDescriptorSize, NULL) != HOST_SENDCONTROL_Successful) + if (USB_GetDeviceConfigDescriptor(1, &ConfigDescriptorSize, NULL) != HOST_SENDCONTROL_Successful) return ControlError; /* Ensure that the Configuration Descriptor isn't too large */ @@ -63,7 +63,7 @@ uint8_t ProcessConfigurationDescriptor(void) ConfigDescriptorData = alloca(ConfigDescriptorSize); /* Retrieve the entire configuration descriptor into the allocated buffer */ - USB_GetDeviceConfigDescriptor(&ConfigDescriptorSize, ConfigDescriptorData); + USB_GetDeviceConfigDescriptor(1, &ConfigDescriptorSize, ConfigDescriptorData); /* Validate returned data - ensure first entry is a configuration header descriptor */ if (DESCRIPTOR_TYPE(ConfigDescriptorData) != DTYPE_Configuration) @@ -138,7 +138,6 @@ uint8_t ProcessConfigurationDescriptor(void) Pipe_ConfigurePipe(CDC_NOTIFICATIONPIPE, EP_TYPE_INTERRUPT, PIPE_TOKEN_IN, EndpointData->EndpointAddress, EndpointData->EndpointSize, PIPE_BANK_SINGLE); - Pipe_SetInfiniteINRequests(); Pipe_SetInterruptPeriod(EndpointData->PollingIntervalMS); /* Set the flag indicating that the notification pipe has been found */ @@ -153,9 +152,6 @@ uint8_t ProcessConfigurationDescriptor(void) /* Configure the data IN pipe */ Pipe_ConfigurePipe(CDC_DATAPIPE_IN, EP_TYPE_BULK, PIPE_TOKEN_IN, EndpointData->EndpointAddress, EndpointData->EndpointSize, PIPE_BANK_SINGLE); - - Pipe_SetInfiniteINRequests(); - Pipe_Unfreeze(); /* Set the flag indicating that the data IN pipe has been found */ FoundEndpoints |= (1 << CDC_DATAPIPE_IN); @@ -166,8 +162,6 @@ uint8_t ProcessConfigurationDescriptor(void) Pipe_ConfigurePipe(CDC_DATAPIPE_OUT, EP_TYPE_BULK, PIPE_TOKEN_OUT, EndpointData->EndpointAddress, EndpointData->EndpointSize, PIPE_BANK_SINGLE); - Pipe_Unfreeze(); - /* Set the flag indicating that the data OUT pipe has been found */ FoundEndpoints |= (1 << CDC_DATAPIPE_OUT); }