X-Git-Url: http://git.linex4red.de/pub/USBasp.git/blobdiff_plain/f1199200e167a737a4676378da184387e543830c..2a0c28e6e47c8a173f32fc99cd8666a2633c5c12:/Demos/Host/LowLevel/GenericHIDHost/ConfigDescriptor.c?ds=inline diff --git a/Demos/Host/LowLevel/GenericHIDHost/ConfigDescriptor.c b/Demos/Host/LowLevel/GenericHIDHost/ConfigDescriptor.c index 29fa60ba3..dbec62b63 100644 --- a/Demos/Host/LowLevel/GenericHIDHost/ConfigDescriptor.c +++ b/Demos/Host/LowLevel/GenericHIDHost/ConfigDescriptor.c @@ -53,7 +53,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 */ @@ -64,7 +64,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) @@ -102,8 +102,6 @@ uint8_t ProcessConfigurationDescriptor(void) /* Configure the HID data IN pipe */ Pipe_ConfigurePipe(HID_DATA_IN_PIPE, EP_TYPE_INTERRUPT, PIPE_TOKEN_IN, EndpointData->EndpointAddress, EndpointData->EndpointSize, PIPE_BANK_SINGLE); - - Pipe_SetInfiniteINRequests(); FoundEndpoints |= (1 << HID_DATA_IN_PIPE); } @@ -134,7 +132,7 @@ uint8_t DComp_NextHIDInterface(void* CurrentDescriptor) /* Determine if the current descriptor is an interface descriptor */ if (DESCRIPTOR_TYPE(CurrentDescriptor) == DTYPE_Interface) { - /* Check the HID descriptor class and protocol, break out if correct class/protocol interface found */ + /* Check the HID descriptor class, break out if correct class/protocol interface found */ if (DESCRIPTOR_CAST(CurrentDescriptor, USB_Descriptor_Interface_t).Class == HID_CLASS) { /* Indicate that the descriptor being searched for has been found */