Fix double oops -- Host mode settle delay was still being ignored due to inverted logic, HID Parser was assigning the usage Min/Max usage value to the report item's collection path rather than the report item itself.

pull/1469/head
Dean Camera 15 years ago
parent a925407588
commit 7e86387958

@ -194,7 +194,7 @@ uint8_t USB_ProcessHIDReport(const uint8_t* ReportData, uint16_t ReportSize, HID
for (uint8_t i = 0; i < UsageListSize; i++) for (uint8_t i = 0; i < UsageListSize; i++)
UsageList[i] = UsageList[i + 1]; UsageList[i] = UsageList[i + 1];
UsageListSize--; UsageListSize--;
} }
else if (UsageMinMax.Minimum <= UsageMinMax.Maximum) else if (UsageMinMax.Minimum <= UsageMinMax.Maximum)
@ -235,9 +235,9 @@ uint8_t USB_ProcessHIDReport(const uint8_t* ReportData, uint16_t ReportSize, HID
} }
else if (UsageMinMax.Minimum <= UsageMinMax.Maximum) else if (UsageMinMax.Minimum <= UsageMinMax.Maximum)
{ {
CurrCollectionPath->Usage.Usage = UsageMinMax.Minimum++; NewReportItem.Attributes.Usage.Usage = UsageMinMax.Minimum++;
} }
uint8_t ItemTag = (HIDReportItem & TAG_MASK); uint8_t ItemTag = (HIDReportItem & TAG_MASK);
if (ItemTag == TAG_MAIN_INPUT) if (ItemTag == TAG_MAIN_INPUT)

@ -66,7 +66,7 @@ void USB_Host_ProcessNextHostState(void)
USB_HostState = HOST_STATE_Powered_WaitForDeviceSettle; USB_HostState = HOST_STATE_Powered_WaitForDeviceSettle;
break; break;
case HOST_STATE_Powered_WaitForDeviceSettle: case HOST_STATE_Powered_WaitForDeviceSettle:
if (!(WaitMSRemaining--)) if (WaitMSRemaining--)
{ {
_delay_ms(1); _delay_ms(1);
break; break;

Loading…
Cancel
Save