The Pedigree Project  0.1
UsbConstants.h
1 /*
2  * Copyright (c) 2008-2014, Pedigree Developers
3  *
4  * Please see the CONTRIB file in the root of the source tree for a full
5  * list of contributors.
6  *
7  * Permission to use, copy, modify, and distribute this software for any
8  * purpose with or without fee is hereby granted, provided that the above
9  * copyright notice and this permission notice appear in all copies.
10  *
11  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
12  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
13  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
14  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
15  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
16  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
17  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
18  */
19 
20 #ifndef USBCONSTANTS_H
21 #define USBCONSTANTS_H
22 
23 #include "pedigree/kernel/processor/types.h"
24 
25 namespace UsbRequestType
26 {
27 enum RequestType
28 {
29  Standard = 0x00,
30  Class = 0x20,
31  Vendor = 0x40
32 };
33 };
34 
35 namespace UsbRequestRecipient
36 {
37 enum RequestRecipient
38 {
39  Device = 0x00,
40  Interface = 0x01,
41  Endpoint = 0x02,
42  Other = 0x03
43 };
44 };
45 
46 namespace UsbRequestDirection
47 {
48 enum RequestDirection
49 {
50  Out = 0x00,
51  In = 0x80
52 };
53 };
54 
55 namespace UsbRequest
56 {
57 enum Request
58 {
59  GetStatus = 0,
60  ClearFeature = 1,
61  SetFeature = 3,
62  SetAddress = 5,
63  GetDescriptor = 6,
64  SetDescriptor = 7,
65  GetConfiguration = 8,
66  SetConfiguration = 9,
67  GetInterface = 10,
68  SetInterface = 11,
69  SynchFrame = 12,
70 };
71 };
72 
73 namespace UsbDescriptor
74 {
75 enum Descriptor
76 {
77  Device = 1,
78  Configuration = 2,
79  String = 3,
80  Interface = 4,
81  Endpoint = 5,
82  DeviceQualifier = 6,
83  OtherSpeedConfiguration = 7,
84 };
85 };
86 
87 #endif
Definition: String.h:49
Definition: Device.h:43