Added new SCSI_ASENSE_NOT_READY_TO_READY_CHANGE constant to the Mass Storage class...
[pub/USBasp.git] / LUFA / Drivers / USB / Class / Host / HIDReportData.h
1 /*
2 LUFA Library
3 Copyright (C) Dean Camera, 2010.
4
5 dean [at] fourwalledcubicle [dot] com
6 www.fourwalledcubicle.com
7 */
8
9 /*
10 Copyright 2010 Dean Camera (dean [at] fourwalledcubicle [dot] com)
11
12 Permission to use, copy, modify, distribute, and sell this
13 software and its documentation for any purpose is hereby granted
14 without fee, provided that the above copyright notice appear in
15 all copies and that both that the copyright notice and this
16 permission notice and warranty disclaimer appear in supporting
17 documentation, and that the name of the author not be used in
18 advertising or publicity pertaining to distribution of the
19 software without specific, written prior permission.
20
21 The author disclaim all warranties with regard to this
22 software, including all implied warranties of merchantability
23 and fitness. In no event shall the author be liable for any
24 special, indirect or consequential damages or any damages
25 whatsoever resulting from loss of use, data or profits, whether
26 in an action of contract, negligence or other tortious action,
27 arising out of or in connection with the use or performance of
28 this software.
29 */
30
31 /** \file
32 * \brief Constants for HID report item attributes.
33 *
34 * HID report item constants for report item attributes. Refer to the HID specification for
35 * details on each flag's meaning when applied to an IN, OUT or FEATURE item.
36 */
37
38 /** \ingroup Group_HIDParser
39 * @defgroup Group_HIDIOFConst Input/Output/Feature Masks
40 *
41 * Masks indicating the type of Input, Output of Feature HID report item.
42 *
43 * @{
44 */
45
46 #ifndef __HIDREPORTDATA_H__
47 #define __HIDREPORTDATA_H__
48
49 /* Public Interface - May be used in end-application: */
50 /* Macros: */
51 /** HID_ReportItem_t.ItemFlags flag for constant data. */
52 #define IOF_CONSTANT (1 << 0)
53
54 /** HID_ReportItem_t.ItemFlags flag for data. */
55 #define IOF_DATA (0 << 0)
56
57 /** HID_ReportItem_t.ItemFlags flag for variable data. */
58 #define IOF_VARIABLE (1 << 1)
59
60 /** HID_ReportItem_t.ItemFlags flag for array data. */
61 #define IOF_ARRAY (0 << 1)
62
63 /** HID_ReportItem_t.ItemFlags flag for relative data. */
64 #define IOF_RELATIVE (1 << 2)
65
66 /** HID_ReportItem_t.ItemFlags flag for absolute data. */
67 #define IOF_ABSOLUTE (0 << 2)
68
69 /** HID_ReportItem_t.ItemFlags flag for wrapped value data. */
70 #define IOF_WRAP (1 << 3)
71
72 /** HID_ReportItem_t.ItemFlags flag for non-wrapped value data. */
73 #define IOF_NOWRAP (0 << 3)
74
75 /** HID_ReportItem_t.ItemFlags flag for non linear data. */
76 #define IOF_NONLINEAR (1 << 4)
77
78 /** HID_ReportItem_t.ItemFlags flag for linear data. */
79 #define IOF_LINEAR (0 << 4)
80
81 /** HID_ReportItem_t.ItemFlags flag for no preferred state. */
82 #define IOF_NOPREFERRED (1 << 5)
83
84 /** HID_ReportItem_t.ItemFlags flag for preferred state items. */
85 #define IOF_PREFERREDSTATE (0 << 5)
86
87 /** HID_ReportItem_t.ItemFlags flag for null state items. */
88 #define IOF_NULLSTATE (1 << 6)
89
90 /** HID_ReportItem_t.ItemFlags flag for no null position data. */
91 #define IOF_NONULLPOSITION (0 << 6)
92
93 /** HID_ReportItem_t.ItemFlags flag for buffered bytes. */
94 #define IOF_BUFFEREDBYTES (1 << 8)
95
96 /** HID_ReportItem_t.ItemFlags flag for bit field data. */
97 #define IOF_BITFIELD (0 << 8)
98
99 /* Private Interface - For use in library only: */
100 #if !defined(__DOXYGEN__)
101 /* Macros: */
102 #define DATA_SIZE_MASK 0x03
103 #define TYPE_MASK 0x0C
104 #define TAG_MASK 0xF0
105
106 #define DATA_SIZE_0 0x00
107 #define DATA_SIZE_1 0x01
108 #define DATA_SIZE_2 0x02
109 #define DATA_SIZE_4 0x03
110
111 #define TYPE_MAIN 0x00
112 #define TYPE_GLOBAL 0x04
113 #define TYPE_LOCAL 0x08
114
115 #define TAG_MAIN_INPUT 0x80
116 #define TAG_MAIN_OUTPUT 0x90
117 #define TAG_MAIN_COLLECTION 0xA0
118 #define TAG_MAIN_FEATURE 0xB0
119 #define TAG_MAIN_ENDCOLLECTION 0xC0
120
121 #define TAG_GLOBAL_USAGEPAGE 0x00
122 #define TAG_GLOBAL_LOGICALMIN 0x10
123 #define TAG_GLOBAL_LOGICALMAX 0x20
124 #define TAG_GLOBAL_PHYSMIN 0x30
125 #define TAG_GLOBAL_PHYSMAX 0x40
126 #define TAG_GLOBAL_UNITEXP 0x50
127 #define TAG_GLOBAL_UNIT 0x60
128 #define TAG_GLOBAL_REPORTSIZE 0x70
129 #define TAG_GLOBAL_REPORTID 0x80
130 #define TAG_GLOBAL_REPORTCOUNT 0x90
131 #define TAG_GLOBAL_PUSH 0xA0
132 #define TAG_GLOBAL_POP 0xB0
133
134 #define TAG_LOCAL_USAGE 0x00
135 #define TAG_LOCAL_USAGEMIN 0x10
136 #define TAG_LOCAL_USAGEMAX 0x20
137 #endif
138
139 /** @} */
140
141 #endif