|
|
1.1 root 1: /*
2: * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved.
3: *
4: * @APPLE_LICENSE_HEADER_START@
5: *
6: * The contents of this file constitute Original Code as defined in and
7: * are subject to the Apple Public Source License Version 1.1 (the
8: * "License"). You may not use this file except in compliance with the
9: * License. Please obtain a copy of the License at
10: * http://www.apple.com/publicsource and read it before using this file.
11: *
12: * This Original Code and all software distributed under the License are
13: * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
14: * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
15: * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
16: * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the
17: * License for the specific language governing rights and limitations
18: * under the License.
19: *
20: * @APPLE_LICENSE_HEADER_END@
21: */
22: /*
23: * Constants that both OS8 and OSX want to define, and whose values are
24: * specified by the USB Standard.
25: * Put in a seperate file so they can be included if the OS8 include file isn't already
26: * included.
27: */
28: #ifndef _USBSPEC_H
29: #define _USBSPEC_H
30:
31: #ifdef __cplusplus
32: extern "C" {
33: #endif
34:
35: enum {
36: kUSBControl = 0,
37: kUSBIsoc = 1,
38: kUSBBulk = 2,
39: kUSBInterrupt = 3,
40: kUSBAnyType = 0xFF
41: };
42:
43: /* endpoint type */
44:
45: enum {
46: kUSBOut = 0,
47: kUSBIn = 1,
48: kUSBNone = 2,
49: kUSBAnyDirn = 3
50: };
51:
52: /*USBDirection*/
53:
54: enum {
55: kUSBStandard = 0,
56: kUSBClass = 1,
57: kUSBVendor = 2
58: };
59:
60: /*USBRqType*/
61:
62: enum {
63: kUSBDevice = 0,
64: kUSBInterface = 1,
65: kUSBEndpoint = 2,
66: kUSBOther = 3
67: };
68:
69: /*USBRqRecipient*/
70:
71: enum {
72: kUSBRqGetStatus = 0,
73: kUSBRqClearFeature = 1,
74: kUSBRqGetState = 2,
75: kUSBRqSetFeature = 3,
76: kUSBRqReserved2 = 4,
77: kUSBRqSetAddress = 5,
78: kUSBRqGetDescriptor = 6,
79: kUSBRqSetDescriptor = 7,
80: kUSBRqGetConfig = 8,
81: kUSBRqSetConfig = 9,
82: kUSBRqGetInterface = 10,
83: kUSBRqSetInterface = 11,
84: kUSBRqSyncFrame = 12
85: };
86:
87: /*USBRequest*/
88:
89:
90: enum {
91: kUSBAnyDesc = 0, // Wildcard for searches
92: kUSBDeviceDesc = 1,
93: kUSBConfDesc = 2,
94: kUSBStringDesc = 3,
95: kUSBInterfaceDesc = 4,
96: kUSBEndpointDesc = 5,
97: kUSBHIDDesc = 0x21,
98: kUSBReportDesc = 0x22,
99: kUSBPhysicalDesc = 0x23,
100: kUSBHUBDesc = 0x29
101: };
102:
103: /* descriptorType */
104:
105: enum {
106: kUSB100mAAvailable = 50,
107: kUSB500mAAvailable = 250,
108: kUSB100mA = 50,
109: kUSBAtrBusPowered = 0x80,
110: kUSBAtrSelfPowered = 0x40,
111: kUSBAtrRemoteWakeup = 0x20
112: };
113:
114:
115: enum {
116: kUSBRel10 = 0x0100
117: };
118:
119:
120: enum {
121: kHIDRqGetReport = 1,
122: kHIDRqGetIdle = 2,
123: kHIDRqGetProtocol = 3,
124: kHIDRqSetReport = 9,
125: kHIDRqSetIdle = 10,
126: kHIDRqSetProtocol = 11
127: };
128:
129:
130: enum {
131: kHIDRtInputReport = 1,
132: kHIDRtOutputReport = 2,
133: kHIDRtFeatureReport = 3
134: };
135:
136:
137: enum {
138: kHIDBootProtocolValue = 0,
139: kHIDReportProtocolValue = 1
140: };
141:
142:
143: enum {
144: kHIDKeyboardInterfaceProtocol = 1,
145: kHIDMouseInterfaceProtocol = 2
146: };
147:
148:
149: enum {
150: kUSBCapsLockKey = 0x39,
151: kUSBNumLockKey = 0x53,
152: kUSBScrollLockKey = 0x47
153: };
154:
155: enum {
156: kUSBCompositeClass = 0,
157: kUSBAudioClass = 1,
158: kUSBCommClass = 2,
159: kUSBHIDClass = 3,
160: kUSBDisplayClass = 4,
161: kUSBPrintingClass = 7,
162: kUSBMassStorageClass = 8,
163: kUSBHubClass = 9,
164: kUSBDataClass = 10,
165: kUSBVendorSpecificClass = 0xFF
166: };
167:
168: /* deviceClass */
169:
170: enum {
171: kUSBCompositeSubClass = 0,
172: kUSBHubSubClass = 1,
173: kUSBRootHubSubClass = 2
174: };
175:
176: /* deviceSubClass */
177:
178: #ifdef __cplusplus
179: }
180: #endif
181:
182: #endif /* _USBSPEC_H */
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.