}
/* Save the HID report size for later use */
- HIDReportSize = DESCRIPTOR_CAST(CurrConfigLocation, USB_Descriptor_HID_t).HIDReportLength;
+ HIDReportSize = DESCRIPTOR_PCAST(CurrConfigLocation, USB_Descriptor_HID_t)->HIDReportLength;
while (!(DataINEndpoint))
{
}
/* Save the HID report size for later use */
- HIDReportSize = DESCRIPTOR_CAST(CurrConfigLocation, USB_Descriptor_HID_t).HIDReportLength;
+ HIDReportSize = DESCRIPTOR_PCAST(CurrConfigLocation, USB_Descriptor_HID_t)->HIDReportLength;
+
+ /* Skip the remainder of the loop as we have not found an endpoint yet */
+ continue;
}
/* Retrieve the endpoint address from the endpoint descriptor */