--- /dev/null
+/*\r
+ LUFA Library\r
+ Copyright (C) Dean Camera, 2009.\r
+ \r
+ dean [at] fourwalledcubicle [dot] com\r
+ www.fourwalledcubicle.com\r
+*/\r
+\r
+/*\r
+ Copyright 2009 Dean Camera (dean [at] fourwalledcubicle [dot] com)\r
+\r
+ Permission to use, copy, modify, and distribute this software\r
+ and its documentation for any purpose and without fee is hereby\r
+ granted, provided that the above copyright notice appear in all\r
+ copies and that both that the copyright notice and this\r
+ permission notice and warranty disclaimer appear in supporting\r
+ documentation, and that the name of the author not be used in\r
+ advertising or publicity pertaining to distribution of the\r
+ software without specific, written prior permission.\r
+\r
+ The author disclaim all warranties with regard to this\r
+ software, including all implied warranties of merchantability\r
+ and fitness. In no event shall the author be liable for any\r
+ special, indirect or consequential damages or any damages\r
+ whatsoever resulting from loss of use, data or profits, whether\r
+ in an action of contract, negligence or other tortious action,\r
+ arising out of or in connection with the use or performance of\r
+ this software.\r
+*/\r
+\r
+/** \file\r
+ *\r
+ * Header file for HIDReport.c.\r
+ */\r
+\r
+#ifndef _HID_REPORT_H_\r
+#define _HID_REPORT_H_\r
+\r
+ /* Includes: */\r
+ #include <LUFA/Drivers/USB/Class/HIDParser.h> // HID Class Report Parser\r
+ \r
+ #include "KeyboardHostWithParser.h"\r
+\r
+ /* Macros: */\r
+ /** HID Report Descriptor Usage Page value for a desktop keyboard */\r
+ #define USAGE_PAGE_KEYBOARD 0x07\r
+\r
+ /* Enums: */\r
+ /** Enum for the possible return codes of the GetHIDReportData() function. */\r
+ enum KeyboardHostWithParser_GetHIDReportDataCodes_t\r
+ {\r
+ ParseSuccessful = 0, /**< HID report descriptor parsed successfully */\r
+ ParseError = 1, /**< Failed to fully process the HID report descriptor */\r
+ ParseControlError = 2, /**< Control error occured while trying to read the device HID descriptor */\r
+ };\r
+ \r
+ /* Type Defines: */\r
+ /** Type define for a HID descriptor. */\r
+ typedef struct\r
+ {\r
+ USB_Descriptor_Header_t Header; /**< Regular descriptor header containing the descriptor's type and length */\r
+ \r
+ uint16_t HIDSpec; /**< Implemented HID class specification, in BCD encoded format */\r
+ uint8_t CountryCode; /**< Country code value for localized hardware */\r
+ \r
+ uint8_t TotalHIDReports; /**< Total number of HID report descriptors in the current interface */\r
+\r
+ uint8_t HIDReportType; /**< HID report type of the first HID report descriptor */\r
+ uint16_t HIDReportLength; /**< Total size in bytes of the first HID report descriptor */\r
+ } USB_Descriptor_HID_t;\r
+\r
+ /* External Variables: */\r
+ extern uint16_t HIDReportSize;\r
+ extern HID_ReportInfo_t HIDReportInfo;\r
+\r
+ /* Function Prototypes: */\r
+ uint8_t GetHIDReportData(void);\r
+ \r
+#endif\r