projects
/
pub
/
lufa.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add new attributes to the HID Report Parser and HID Host Mode Class driver to keep...
[pub/lufa.git]
/
LUFA
/
Drivers
/
USB
/
Class
/
Host
/
HID.c
diff --git
a/LUFA/Drivers/USB/Class/Host/HID.c
b/LUFA/Drivers/USB/Class/Host/HID.c
index
87d3793
..
b420a5b
100644
(file)
--- a/
LUFA/Drivers/USB/Class/Host/HID.c
+++ b/
LUFA/Drivers/USB/Class/Host/HID.c
@@
-101,6
+101,7
@@
uint8_t HID_Host_ConfigurePipes(USB_ClassInfo_HID_Host_t* const HIDInterfaceInfo
}
\r
}
\r
\r
}
\r
}
\r
\r
+ HIDInterfaceInfo->State.LargestReportSize = 8;
\r
HIDInterfaceInfo->State.IsActive = true;
\r
return HID_ENUMERROR_NoError;
\r
}
\r
HIDInterfaceInfo->State.IsActive = true;
\r
return HID_ENUMERROR_NoError;
\r
}
\r
@@
-288,6
+289,7
@@
uint8_t USB_HID_Host_SetBootProtocol(USB_ClassInfo_HID_Host_t* const HIDInterfac
if ((ErrorCode = USB_Host_SendControlRequest(NULL)) != HOST_SENDCONTROL_Successful)
\r
return ErrorCode;
\r
\r
if ((ErrorCode = USB_Host_SendControlRequest(NULL)) != HOST_SENDCONTROL_Successful)
\r
return ErrorCode;
\r
\r
+ HIDInterfaceInfo->State.LargestReportSize = 8;
\r
HIDInterfaceInfo->State.UsingBootProtocol = true;
\r
\r
return HOST_SENDCONTROL_Successful;
\r
HIDInterfaceInfo->State.UsingBootProtocol = true;
\r
\r
return HOST_SENDCONTROL_Successful;
\r
@@
-339,6
+341,9
@@
uint8_t USB_HID_Host_SetReportProtocol(USB_ClassInfo_HID_Host_t* const HIDInterf
return HID_ERROR_LOGICAL | ErrorCode;
\r
}
\r
\r
return HID_ERROR_LOGICAL | ErrorCode;
\r
}
\r
\r
+ uint8_t LargestReportSizeBits = HIDInterfaceInfo->Config.HIDParserData->LargestReportSizeBits;
\r
+ HIDInterfaceInfo->State.LargestReportSize = (LargestReportSizeBits >> 3) + ((LargestReportSizeBits & 0x07) != 0);
\r
+
\r
return 0;
\r
}
\r
\r
return 0;
\r
}
\r
\r