/* Function to read in the HID report descriptor from the attached device, and process it into easy-to-read structures via the HID parser routines in the LUFA library. */
uint8_t GetHIDReportData(void)
/* Function to read in the HID report descriptor from the attached device, and process it into easy-to-read structures via the HID parser routines in the LUFA library. */
uint8_t GetHIDReportData(void)
{
	uint8_t HIDReportData[HIDReportSize];
	USB_ControlRequest = (USB_Request_Header_t)
		{
			.bmRequestType = (REQDIR_DEVICETOHOST | REQTYPE_STANDARD | REQREC_INTERFACE),
			.bRequest      = REQ_GetDescriptor,
			.wValue        = (HID_DTYPE_Report << 8),
			.wIndex        = 0,
			.wLength       = HIDReportSize,
		};
	Pipe_SelectPipe(PIPE_CONTROLPIPE);
	if (USB_Host_SendControlRequest(HIDReportData) != HOST_SENDCONTROL_Successful)
	  return ParseControlError;
	if (USB_ProcessHIDReport(HIDReportData, HIDReportSize, &HIDReportInfo) != HID_PARSE_Successful)
	  return ParseError;
	return ParseSuccessful;
}