--- /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
+ * Constants for HID report item attributes. Refer to the HID specification for details on each\r
+ * flag's meaning when applied to an IN, OUT or FEATURE item.\r
+ */\r
+\r
+/** \ingroup Group_HIDParser\r
+ * @defgroup Group_HIDIOFConst Input/Output/Feature Masks\r
+ *\r
+ * Masks indicating the type of Input, Output of Feature HID report item.\r
+ *\r
+ * @{\r
+ */\r
+ \r
+#ifndef __HIDREPORTDATA_H__\r
+#define __HIDREPORTDATA_H__\r
+\r
+ /* Public Interface - May be used in end-application: */\r
+ /* Macros: */\r
+ /** HID_ReportItem_t.ItemFlags flag for constant data. */\r
+ #define IOF_CONSTANT (1 << 0)\r
+\r
+ /** HID_ReportItem_t.ItemFlags flag for data. */\r
+ #define IOF_DATA (0 << 0)\r
+\r
+ /** HID_ReportItem_t.ItemFlags flag for variable data. */\r
+ #define IOF_VARIABLE (1 << 1)\r
+\r
+ /** HID_ReportItem_t.ItemFlags flag for array data. */\r
+ #define IOF_ARRAY (0 << 1)\r
+\r
+ /** HID_ReportItem_t.ItemFlags flag for relative data. */\r
+ #define IOF_RELATIVE (1 << 2)\r
+\r
+ /** HID_ReportItem_t.ItemFlags flag for absolute data. */\r
+ #define IOF_ABSOLUTE (0 << 2)\r
+\r
+ /** HID_ReportItem_t.ItemFlags flag for wrapped value data. */\r
+ #define IOF_WRAP (1 << 3)\r
+\r
+ /** HID_ReportItem_t.ItemFlags flag for non-wrapped value data. */\r
+ #define IOF_NOWRAP (0 << 3)\r
+\r
+ /** HID_ReportItem_t.ItemFlags flag for non linear data. */\r
+ #define IOF_NONLINEAR (1 << 4)\r
+\r
+ /** HID_ReportItem_t.ItemFlags flag for linear data. */\r
+ #define IOF_LINEAR (0 << 4)\r
+\r
+ /** HID_ReportItem_t.ItemFlags flag for no preferred state. */\r
+ #define IOF_NOPREFERRED (1 << 5)\r
+\r
+ /** HID_ReportItem_t.ItemFlags flag for preferred state items. */\r
+ #define IOF_PREFERREDSTATE (0 << 5)\r
+\r
+ /** HID_ReportItem_t.ItemFlags flag for null state items. */\r
+ #define IOF_NULLSTATE (1 << 6)\r
+\r
+ /** HID_ReportItem_t.ItemFlags flag for no null position data. */\r
+ #define IOF_NONULLPOSITION (0 << 6)\r
+\r
+ /** HID_ReportItem_t.ItemFlags flag for buffered bytes. */\r
+ #define IOF_BUFFEREDBYTES (1 << 8)\r
+\r
+ /** HID_ReportItem_t.ItemFlags flag for bit field data. */\r
+ #define IOF_BITFIELD (0 << 8)\r
+\r
+ /* Private Interface - For use in library only: */\r
+ #if !defined(__DOXYGEN__)\r
+ /* Macros: */\r
+ #define DATA_SIZE_MASK 0x03\r
+ #define TYPE_MASK 0x0C\r
+ #define TAG_MASK 0xF0\r
+\r
+ #define DATA_SIZE_0 0x00\r
+ #define DATA_SIZE_1 0x01\r
+ #define DATA_SIZE_2 0x02\r
+ #define DATA_SIZE_4 0x03\r
+ \r
+ #define TYPE_MAIN 0x00\r
+ #define TYPE_GLOBAL 0x04\r
+ #define TYPE_LOCAL 0x08\r
+ \r
+ #define TAG_MAIN_INPUT 0x80\r
+ #define TAG_MAIN_OUTPUT 0x90\r
+ #define TAG_MAIN_COLLECTION 0xA0\r
+ #define TAG_MAIN_FEATURE 0xB0\r
+ #define TAG_MAIN_ENDCOLLECTION 0xC0\r
+\r
+ #define TAG_GLOBAL_USAGEPAGE 0x00\r
+ #define TAG_GLOBAL_LOGICALMIN 0x10\r
+ #define TAG_GLOBAL_LOGICALMAX 0x20\r
+ #define TAG_GLOBAL_PHYSMIN 0x30\r
+ #define TAG_GLOBAL_PHYSMAX 0x40\r
+ #define TAG_GLOBAL_UNITEXP 0x50\r
+ #define TAG_GLOBAL_UNIT 0x60\r
+ #define TAG_GLOBAL_REPORTSIZE 0x70\r
+ #define TAG_GLOBAL_REPORTID 0x80\r
+ #define TAG_GLOBAL_REPORTCOUNT 0x90\r
+ #define TAG_GLOBAL_PUSH 0xA0\r
+ #define TAG_GLOBAL_POP 0xB0\r
+ \r
+ #define TAG_LOCAL_USAGE 0x00\r
+ #define TAG_LOCAL_USAGEMIN 0x10\r
+ #define TAG_LOCAL_USAGEMAX 0x20\r
+ #endif\r
+\r
+/** @} */\r
+ \r
+#endif\r