X-Git-Url: http://git.linex4red.de/pub/USBasp.git/blobdiff_plain/ed031c1df2f5b053b9cd9f48c63e66a42b7c049e..e0985b995009d71b80d214a66944e76f4e41aadb:/Demos/Host/StillImageHost/ConfigDescriptor.c diff --git a/Demos/Host/StillImageHost/ConfigDescriptor.c b/Demos/Host/StillImageHost/ConfigDescriptor.c index a336c1f5e..5e2916ba2 100644 --- a/Demos/Host/StillImageHost/ConfigDescriptor.c +++ b/Demos/Host/StillImageHost/ConfigDescriptor.c @@ -52,7 +52,7 @@ uint8_t ProcessConfigurationDescriptor(void) uint8_t FoundEndpoints = 0; /* Get Configuration Descriptor size from the device */ - if (USB_Host_GetDeviceConfigDescriptor(&ConfigDescriptorSize, NULL) != HOST_SENDCONTROL_Successful) + if (USB_GetDeviceConfigDescriptor(&ConfigDescriptorSize, NULL) != HOST_SENDCONTROL_Successful) return ControlError; /* Ensure that the Configuration Descriptor isn't too large */ @@ -63,14 +63,14 @@ uint8_t ProcessConfigurationDescriptor(void) ConfigDescriptorData = alloca(ConfigDescriptorSize); /* Retrieve the entire configuration descriptor into the allocated buffer */ - USB_Host_GetDeviceConfigDescriptor(&ConfigDescriptorSize, ConfigDescriptorData); + USB_GetDeviceConfigDescriptor(&ConfigDescriptorSize, ConfigDescriptorData); /* Validate returned data - ensure first entry is a configuration header descriptor */ if (DESCRIPTOR_TYPE(ConfigDescriptorData) != DTYPE_Configuration) return InvalidConfigDataReturned; /* Get the Still Image interface from the configuration descriptor */ - if (USB_Host_GetNextDescriptorComp(&ConfigDescriptorSize, &ConfigDescriptorData, NextStillImageInterface)) + if (USB_GetNextDescriptorComp(&ConfigDescriptorSize, &ConfigDescriptorData, NextStillImageInterface)) { /* Descriptor not found, error out */ return NoInterfaceFound; @@ -80,7 +80,7 @@ uint8_t ProcessConfigurationDescriptor(void) while (FoundEndpoints != ((1 << SIMAGE_EVENTS_PIPE) | (1 << SIMAGE_DATA_IN_PIPE) | (1 << SIMAGE_DATA_OUT_PIPE))) { /* Fetch the next endpoint from the current Still Image interface */ - if (USB_Host_GetNextDescriptorComp(&ConfigDescriptorSize, &ConfigDescriptorData, + if (USB_GetNextDescriptorComp(&ConfigDescriptorSize, &ConfigDescriptorData, NextSImageInterfaceDataEndpoint)) { /* Descriptor not found, error out */ @@ -156,11 +156,11 @@ DESCRIPTOR_COMPARATOR(NextStillImageInterface) (DESCRIPTOR_CAST(CurrentDescriptor, USB_Descriptor_Interface_t).SubClass == SIMAGE_SUBCLASS) && (DESCRIPTOR_CAST(CurrentDescriptor, USB_Descriptor_Interface_t).Protocol == SIMAGE_PROTOCOL)) { - return Descriptor_Search_Found; + return DESCRIPTOR_SEARCH_Found; } } - return Descriptor_Search_NotFound; + return DESCRIPTOR_SEARCH_NotFound; } /** Descriptor comparator function. This comparator function is can be called while processing an attached USB device's @@ -180,12 +180,12 @@ DESCRIPTOR_COMPARATOR(NextSImageInterfaceDataEndpoint) USB_Descriptor_Endpoint_t).Attributes & EP_TYPE_MASK); if ((EndpointType == EP_TYPE_BULK) || (EndpointType == EP_TYPE_INTERRUPT)) - return Descriptor_Search_Found; + return DESCRIPTOR_SEARCH_Found; } else if (DESCRIPTOR_TYPE(CurrentDescriptor) == DTYPE_Interface) { - return Descriptor_Search_Fail; + return DESCRIPTOR_SEARCH_Fail; } - return Descriptor_Search_NotFound; + return DESCRIPTOR_SEARCH_NotFound; }