Added flag to the HID report parser to indicate if a device has multiple reports.
SetIdle requests to the HID device driver with a 0 idle period (send changes only) now only affect the requested HID interface within the device, not all HID interfaces. Apply correct fix to the HID report parser for PUSH items - current HID item attribute stack was being copied in the wrong direction. Fixed HID report parser not resetting the FEATURE item count when a REPORT ID item is encountered.
This commit is contained in:
@@ -38,11 +38,8 @@ void HID_Device_ProcessControlRequest(USB_ClassInfo_HID_Device_t* const HIDInter
|
||||
if (!(Endpoint_IsSETUPReceived()))
|
||||
return;
|
||||
|
||||
if ((USB_ControlRequest.wIndex != HIDInterfaceInfo->Config.InterfaceNumber) &&
|
||||
(USB_ControlRequest.bRequest != REQ_SetIdle))
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (USB_ControlRequest.wIndex != HIDInterfaceInfo->Config.InterfaceNumber)
|
||||
return;
|
||||
|
||||
switch (USB_ControlRequest.bRequest)
|
||||
{
|
||||
@@ -106,15 +103,11 @@ void HID_Device_ProcessControlRequest(USB_ClassInfo_HID_Device_t* const HIDInter
|
||||
case REQ_SetIdle:
|
||||
if (USB_ControlRequest.bmRequestType == (REQDIR_HOSTTODEVICE | REQTYPE_CLASS | REQREC_INTERFACE))
|
||||
{
|
||||
if ((USB_ControlRequest.wIndex == HIDInterfaceInfo->Config.InterfaceNumber) ||
|
||||
(USB_ControlRequest.wValue & 0xFF) == 0)
|
||||
{
|
||||
Endpoint_ClearSETUP();
|
||||
Endpoint_ClearSETUP();
|
||||
|
||||
HIDInterfaceInfo->State.IdleCount = ((USB_ControlRequest.wValue & 0xFF00) >> 6);
|
||||
HIDInterfaceInfo->State.IdleCount = ((USB_ControlRequest.wValue & 0xFF00) >> 6);
|
||||
|
||||
Endpoint_ClearStatusStage();
|
||||
}
|
||||
Endpoint_ClearStatusStage();
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user