~ubuntu-branches/ubuntu/lucid/ndiswrapper/lucid

« back to all changes in this revision

Viewing changes to driver/usb.h

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt
  • Date: 2005-09-30 14:56:14 UTC
  • mfrom: (2.1.1 sarge)
  • Revision ID: james.westby@ubuntu.com-20050930145614-eh1a93tehp8nszrm
Tags: 1.1-4ubuntu2
debian/control: Update description to point out that the kernel source
package is not required with the standard Ubuntu kernel.

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
#define USB_STATUS_SUCCESS              0x00000000
25
25
#define USB_STATUS_ERROR                0x80000000
26
26
 
27
 
#define FUNC_SELECT_CONFIGURATION       0x0000
28
 
#define FUNC_BULK_OR_INTERRUPT_TRANSFER 0x0009
29
 
#define FUNC_GET_DESCRIPTOR_FROM_DEVICE 0x000B
30
 
#define FUNC_VENDOR_DEVICE              0x0017
31
 
#define FUNC_VENDOR_INTERFACE           0x0018
32
 
#define FUNC_CLASS_INTERFACE            0x001B
33
 
#define FUNC_RESET_PIPE                 0x001E
 
27
#define URB_FUNCTION_SELECT_CONFIGURATION            0x0000
 
28
#define URB_FUNCTION_SELECT_INTERFACE                0x0001
 
29
#define URB_FUNCTION_ABORT_PIPE                      0x0002
 
30
#define URB_FUNCTION_TAKE_FRAME_LENGTH_CONTROL       0x0003
 
31
#define URB_FUNCTION_RELEASE_FRAME_LENGTH_CONTROL    0x0004
 
32
#define URB_FUNCTION_GET_FRAME_LENGTH                0x0005
 
33
#define URB_FUNCTION_SET_FRAME_LENGTH                0x0006
 
34
#define URB_FUNCTION_GET_CURRENT_FRAME_NUMBER        0x0007
 
35
#define URB_FUNCTION_CONTROL_TRANSFER                0x0008
 
36
#define URB_FUNCTION_BULK_OR_INTERRUPT_TRANSFER      0x0009
 
37
#define URB_FUNCTION_ISOCH_TRANSFER                  0x000A
 
38
#define URB_FUNCTION_GET_DESCRIPTOR_FROM_DEVICE      0x000B
 
39
#define URB_FUNCTION_SET_DESCRIPTOR_TO_DEVICE        0x000C
 
40
#define URB_FUNCTION_SET_FEATURE_TO_DEVICE           0x000D
 
41
#define URB_FUNCTION_SET_FEATURE_TO_INTERFACE        0x000E
 
42
#define URB_FUNCTION_SET_FEATURE_TO_ENDPOINT         0x000F
 
43
#define URB_FUNCTION_CLEAR_FEATURE_TO_DEVICE         0x0010
 
44
#define URB_FUNCTION_CLEAR_FEATURE_TO_INTERFACE      0x0011
 
45
#define URB_FUNCTION_CLEAR_FEATURE_TO_ENDPOINT       0x0012
 
46
#define URB_FUNCTION_GET_STATUS_FROM_DEVICE          0x0013
 
47
#define URB_FUNCTION_GET_STATUS_FROM_INTERFACE       0x0014
 
48
#define URB_FUNCTION_GET_STATUS_FROM_ENDPOINT        0x0015
 
49
#define URB_FUNCTION_RESERVED_0X0016                 0x0016
 
50
#define URB_FUNCTION_VENDOR_DEVICE                   0x0017
 
51
#define URB_FUNCTION_VENDOR_INTERFACE                0x0018
 
52
#define URB_FUNCTION_VENDOR_ENDPOINT                 0x0019
 
53
#define URB_FUNCTION_CLASS_DEVICE                    0x001A
 
54
#define URB_FUNCTION_CLASS_INTERFACE                 0x001B
 
55
#define URB_FUNCTION_CLASS_ENDPOINT                  0x001C
 
56
#define URB_FUNCTION_RESERVE_0X001D                  0x001D
 
57
#define URB_FUNCTION_SYNC_RESET_PIPE_AND_CLEAR_STALL 0x001E
 
58
#define URB_FUNCTION_CLASS_OTHER                     0x001F
 
59
#define URB_FUNCTION_VENDOR_OTHER                    0x0020
 
60
#define URB_FUNCTION_GET_STATUS_FROM_OTHER           0x0021
 
61
#define URB_FUNCTION_CLEAR_FEATURE_TO_OTHER          0x0022
 
62
#define URB_FUNCTION_SET_FEATURE_TO_OTHER            0x0023
 
63
#define URB_FUNCTION_GET_DESCRIPTOR_FROM_ENDPOINT    0x0024
 
64
#define URB_FUNCTION_SET_DESCRIPTOR_TO_ENDPOINT      0x0025
 
65
#define URB_FUNCTION_GET_CONFIGURATION               0x0026
 
66
#define URB_FUNCTION_GET_INTERFACE                   0x0027
 
67
#define URB_FUNCTION_GET_DESCRIPTOR_FROM_INTERFACE   0x0028
 
68
#define URB_FUNCTION_SET_DESCRIPTOR_TO_INTERFACE     0x0029
 
69
#define URB_FUNCTION_GET_MS_FEATURE_DESCRIPTOR       0x002A
 
70
#define URB_FUNCTION_RESERVE_0X002B                  0x002B
 
71
#define URB_FUNCTION_RESERVE_0X002C                  0x002C
 
72
#define URB_FUNCTION_RESERVE_0X002D                  0x002D
 
73
#define URB_FUNCTION_RESERVE_0X002E                  0x002E
 
74
#define URB_FUNCTION_RESERVE_0X002F                  0x002F
 
75
// USB 2.0 calls start at 0x0030         
 
76
#define URB_FUNCTION_SYNC_RESET_PIPE                 0x0030
 
77
#define URB_FUNCTION_SYNC_CLEAR_STALL                0x0031
34
78
 
35
79
#define USBD_TRANSFER_DIRECTION_IN      0x00000001
36
80
#define USBD_SHORT_TRANSFER_OK          0x00000002
37
81
 
38
82
union pipe_handle {
39
83
        void *handle;
40
 
        struct packed {
 
84
        struct {
41
85
                unsigned char endpointAddr;
42
86
                unsigned char pipeType;
43
87
                unsigned char interval;
45
89
        } encoded;
46
90
};
47
91
 
48
 
struct packed usbd_pipe_information {
 
92
struct usbd_pipe_information {
49
93
        unsigned short maxPacketSize;
50
94
        unsigned char endpointAddr;
51
95
        unsigned char interval;
55
99
        unsigned long fill;
56
100
};
57
101
 
58
 
struct packed usbd_interface_information {
 
102
struct usbd_interface_information {
59
103
        unsigned short length;
60
104
        unsigned char intfNum;
61
105
        unsigned char altSet;
68
112
        struct usbd_pipe_information pipes[1];
69
113
};
70
114
 
71
 
struct packed usbd_interface_list_entry {
 
115
struct usbd_interface_list_entry {
72
116
        struct usb_interface_descriptor *intfDesc;
73
117
        struct usbd_interface_information *intf;
74
118
};
75
119
 
76
 
struct packed nt_urb_header {
 
120
struct nt_urb_header {
77
121
        unsigned short length;
78
122
        unsigned short function;
79
123
        long status;
81
125
        unsigned long fill2;
82
126
};
83
127
 
84
 
struct packed select_configuration {
 
128
struct select_configuration {
85
129
        struct nt_urb_header header;
86
130
        struct usb_config_descriptor *config;
87
131
        void *configHandle;
88
132
        struct usbd_interface_information intf;
89
133
};
90
134
 
91
 
struct packed bulk_or_intr_transfer {
 
135
struct bulk_or_intr_transfer {
92
136
        struct nt_urb_header header;
93
137
        union pipe_handle pipeHandle;
94
138
        unsigned long transferFlags;
99
143
        void *fill3[8];
100
144
};
101
145
 
102
 
struct packed control_descriptor_request {
 
146
struct control_descriptor_request {
103
147
        struct nt_urb_header header;
104
148
        void *fill1;
105
149
        unsigned long fill2;
114
158
        unsigned short langid;
115
159
};
116
160
 
117
 
struct packed pipe_request {
 
161
struct pipe_request {
118
162
        struct nt_urb_header header;
119
163
        union pipe_handle pipeHandle;
120
164
};
121
165
 
122
 
struct packed vendor_or_class_request {
 
166
struct vendor_or_class_request {
123
167
        struct nt_urb_header header;
124
168
        void *fill1;
125
169
        unsigned long transferFlags;