diff options
| author | Dean <Dean@d5102386-fcda-11dd-9fdb-3debd5008f28> | 2010-09-30 07:56:47 +0000 |
|---|---|---|
| committer | Dean <Dean@d5102386-fcda-11dd-9fdb-3debd5008f28> | 2010-09-30 07:56:47 +0000 |
| commit | 076783dd8ae11a29c6536fb631b52659642b2ea5 (patch) | |
| tree | dd3d7d307c56cbcef53911bcd42f93e5ba908ecb /Demos/Host/LowLevel/KeyboardHostWithParser | |
| parent | cfd8bc836157d853a687d6329327ba221b448e37 (diff) | |
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.
git-svn-id: http://lufa-lib.googlecode.com/svn/trunk@1503 d5102386-fcda-11dd-9fdb-3debd5008f28
Diffstat (limited to 'Demos/Host/LowLevel/KeyboardHostWithParser')
| -rw-r--r-- | Demos/Host/LowLevel/KeyboardHostWithParser/ConfigDescriptor.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/Demos/Host/LowLevel/KeyboardHostWithParser/ConfigDescriptor.c b/Demos/Host/LowLevel/KeyboardHostWithParser/ConfigDescriptor.c index d397ca7a..bf2c4e05 100644 --- a/Demos/Host/LowLevel/KeyboardHostWithParser/ConfigDescriptor.c +++ b/Demos/Host/LowLevel/KeyboardHostWithParser/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 */ |
