aboutsummaryrefslogtreecommitdiffstats
path: root/Demos/Host/LowLevel/MouseHostWithParser
diff options
context:
space:
mode:
authorDean Camera <dean@fourwalledcubicle.com>2010-09-30 07:56:47 +0000
committerDean Camera <dean@fourwalledcubicle.com>2010-09-30 07:56:47 +0000
commit7166c7ba3e27f3458b83360302c8af8a866f7a34 (patch)
treedd3d7d307c56cbcef53911bcd42f93e5ba908ecb /Demos/Host/LowLevel/MouseHostWithParser
parent158afe910947739b1df00000628c1e758bdf0812 (diff)
downloadlufa-7166c7ba3e27f3458b83360302c8af8a866f7a34.tar.gz
lufa-7166c7ba3e27f3458b83360302c8af8a866f7a34.tar.bz2
lufa-7166c7ba3e27f3458b83360302c8af8a866f7a34.zip
Fix low level host mode demos not correctly fetching the next endpoint when an invalid interface is discarded.
Update the pipe configuration routines in the host mode class drivers so that they use the same new code to enumerate compatible devices to increase reliability. Add support to the host mode class drivers for non-sequential (but non-overlapping with other interface) pipe numbers.
Diffstat (limited to 'Demos/Host/LowLevel/MouseHostWithParser')
-rw-r--r--Demos/Host/LowLevel/MouseHostWithParser/ConfigDescriptor.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/Demos/Host/LowLevel/MouseHostWithParser/ConfigDescriptor.c b/Demos/Host/LowLevel/MouseHostWithParser/ConfigDescriptor.c
index f285f5a02..c5afbe476 100644
--- a/Demos/Host/LowLevel/MouseHostWithParser/ConfigDescriptor.c
+++ b/Demos/Host/LowLevel/MouseHostWithParser/ConfigDescriptor.c
@@ -83,7 +83,7 @@ uint8_t ProcessConfigurationDescriptor(void)
}
/* 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))
{
@@ -108,7 +108,10 @@ uint8_t ProcessConfigurationDescriptor(void)
}
/* 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 */