{\r
uint8_t* ConfigDescriptorData;\r
uint16_t ConfigDescriptorSize;\r
- uint8_t ErrorCode;\r
\r
/* Get Configuration Descriptor size from the device */\r
if (USB_GetDeviceConfigDescriptor(&ConfigDescriptorSize, NULL) != HOST_SENDCONTROL_Successful)\r
return InvalidConfigDataReturned;\r
\r
/* Get the mouse interface from the configuration descriptor */\r
- if ((ErrorCode = USB_GetNextDescriptorComp(&ConfigDescriptorSize, &ConfigDescriptorData, NextMouseInterface)))\r
+ if (USB_GetNextDescriptorComp(&ConfigDescriptorSize, &ConfigDescriptorData,\r
+ NextMouseInterface) != DESCRIPTOR_SEARCH_COMP_Found)\r
{\r
/* Descriptor not found, error out */\r
return NoHIDInterfaceFound;\r
}\r
\r
/* Get the mouse interface's HID descriptor */\r
- if ((ErrorCode = USB_GetNextDescriptorComp(&ConfigDescriptorSize, &ConfigDescriptorData, NextHID)))\r
+ if (USB_GetNextDescriptorComp(&ConfigDescriptorSize, &ConfigDescriptorData,\r
+ NextHID) != DESCRIPTOR_SEARCH_COMP_Found)\r
{\r
/* Descriptor not found, error out */\r
return NoHIDDescriptorFound;\r
HIDReportSize = DESCRIPTOR_CAST(ConfigDescriptorData, USB_Descriptor_HID_t).HIDReportLength;\r
\r
/* Get the mouse interface's data endpoint descriptor */\r
- if ((ErrorCode = USB_GetNextDescriptorComp(&ConfigDescriptorSize, &ConfigDescriptorData,\r
- NextInterfaceMouseDataEndpoint)))\r
+ if (USB_GetNextDescriptorComp(&ConfigDescriptorSize, &ConfigDescriptorData,\r
+ NextInterfaceMouseDataEndpoint) != DESCRIPTOR_SEARCH_COMP_Found)\r
{\r
/* Descriptor not found, error out */\r
return NoEndpointFound;\r