]> sigrok.org Git - sigrok-firmware-fx2lafw.git/blame - hw/cwav-usbeesx/dscr.a51
Added support for USBee SX
[sigrok-firmware-fx2lafw.git] / hw / cwav-usbeesx / dscr.a51
CommitLineData
95550c95
JH
1;;
2;; This file is part of the fx2lafw project.
3;;
4;; Copyright (C) 2011-2012 Uwe Hermann <uwe@hermann-uwe.de>
5;; Copyright (C) 2012 Joel Holdsworth <joel@airwebreathe.org.uk>
6;;
7;; This program is free software; you can redistribute it and/or modify
8;; it under the terms of the GNU General Public License as published by
9;; the Free Software Foundation; either version 2 of the License, or
10;; (at your option) any later version.
11;;
12;; This program is distributed in the hope that it will be useful,
13;; but WITHOUT ANY WARRANTY; without even the implied warranty of
14;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15;; GNU General Public License for more details.
16;;
17;; You should have received a copy of the GNU General Public License
18;; along with this program; if not, write to the Free Software
19;; Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20;;
21
22.module DEV_DSCR
23
24; Descriptor types
25DSCR_DEVICE_TYPE = 1
26DSCR_CONFIG_TYPE = 2
27DSCR_STRING_TYPE = 3
28DSCR_INTERFACE_TYPE = 4
29DSCR_ENDPOINT_TYPE = 5
30DSCR_DEVQUAL_TYPE = 6
31
32; Descriptor lengths
33DSCR_INTERFACE_LEN = 9
34DSCR_ENDPOINT_LEN = 7
35
36; Endpoint types
37ENDPOINT_TYPE_CONTROL = 0
38ENDPOINT_TYPE_ISO = 1
39ENDPOINT_TYPE_BULK = 2
40ENDPOINT_TYPE_INT = 3
41
42.globl _dev_dscr, _dev_qual_dscr, _highspd_dscr, _fullspd_dscr, _dev_strings, _dev_strings_end
43.area DSCR_AREA (CODE)
44
45; -----------------------------------------------------------------------------
46; Device descriptor
47; -----------------------------------------------------------------------------
48_dev_dscr:
49 .db dev_dscr_end - _dev_dscr
50 .db DSCR_DEVICE_TYPE
51 .dw 0x0002 ; USB 2.0
52 .db 0xff ; Class (vendor specific)
53 .db 0xff ; Subclass (vendor specific)
54 .db 0xff ; Protocol (vendor specific)
55 .db 64 ; Max. EP0 packet size
56 .dw 0xa908 ; Manufacturer ID (0x08a9)
57 .dw 0x0900 ; Product ID (0x0014)
58 .dw 0x0100 ; Product version (0.01)
59 .db 1 ; Manufacturer string index
60 .db 2 ; Product string index
61 .db 0 ; Serial number string index (none)
62 .db 1 ; Number of configurations
63dev_dscr_end:
64
65; -----------------------------------------------------------------------------
66; Device qualifier (for "other device speed")
67; -----------------------------------------------------------------------------
68_dev_qual_dscr:
69 .db dev_qualdscr_end - _dev_qual_dscr
70 .db DSCR_DEVQUAL_TYPE
71 .dw 0x0002 ; USB 2.0
72 .db 0xff ; Class (vendor specific)
73 .db 0xff ; Subclass (vendor specific)
74 .db 0xff ; Protocol (vendor specific)
75 .db 64 ; Max. EP0 packet size
76 .db 1 ; Number of configurations
77 .db 0 ; Extra reserved byte
78dev_qualdscr_end:
79
80; -----------------------------------------------------------------------------
81; High-Speed configuration descriptor
82; -----------------------------------------------------------------------------
83_highspd_dscr:
84 .db highspd_dscr_end - _highspd_dscr
85 .db DSCR_CONFIG_TYPE
86 ; Total length of the configuration (1st line LSB, 2nd line MSB)
87 .db (highspd_dscr_realend - _highspd_dscr) % 256
88 .db (highspd_dscr_realend - _highspd_dscr) / 256
89 .db 1 ; Number of interfaces
90 .db 1 ; Configuration number
91 .db 0 ; Configuration string (none)
92 .db 0x80 ; Attributes (bus powered, no wakeup)
93 .db 0x32 ; Max. power (100mA)
94highspd_dscr_end:
95
96 ; Interfaces (only one in our case)
97 .db DSCR_INTERFACE_LEN
98 .db DSCR_INTERFACE_TYPE
99 .db 0 ; Interface index
100 .db 0 ; Alternate setting index
101 .db 2 ; Number of endpoints
102 .db 0xff ; Class (vendor specific)
103 .db 0xff ; Subclass (vendor specific)
104 .db 0xff ; Protocol (vendor specific)
105 .db 0 ; String index (none)
106
107 ; Endpoint 2 (IN)
108 .db DSCR_ENDPOINT_LEN
109 .db DSCR_ENDPOINT_TYPE
110 .db 0x82 ; EP number (2), direction (IN)
111 .db ENDPOINT_TYPE_BULK ; Endpoint type (bulk)
112 .db 0x00 ; Max. packet size, LSB (512 bytes)
113 .db 0x02 ; Max. packet size, MSB (512 bytes)
114 .db 0x00 ; Polling interval
115
116 ; Endpoint 6 (IN)
117 .db DSCR_ENDPOINT_LEN
118 .db DSCR_ENDPOINT_TYPE
119 .db 0x86 ; EP number (6), direction (IN)
120 .db ENDPOINT_TYPE_BULK ; Endpoint type (bulk)
121 .db 0x00 ; Max. packet size, LSB (512 bytes)
122 .db 0x02 ; Max. packet size, MSB (512 bytes)
123 .db 0x00 ; Polling interval
124
125highspd_dscr_realend:
126
127 .even
128
129; -----------------------------------------------------------------------------
130; Full-Speed configuration descriptor
131; -----------------------------------------------------------------------------
132_fullspd_dscr:
133 .db fullspd_dscr_end - _fullspd_dscr
134 .db DSCR_CONFIG_TYPE
135 ; Total length of the configuration (1st line LSB, 2nd line MSB)
136 .db (fullspd_dscr_realend - _fullspd_dscr) % 256
137 .db (fullspd_dscr_realend - _fullspd_dscr) / 256
138 .db 1 ; Number of interfaces
139 .db 1 ; Configuration number
140 .db 0 ; Configuration string (none)
141 .db 0x80 ; Attributes (bus powered, no wakeup)
142 .db 0x32 ; Max. power (100mA)
143fullspd_dscr_end:
144
145 ; Interfaces (only one in our case)
146 .db DSCR_INTERFACE_LEN
147 .db DSCR_INTERFACE_TYPE
148 .db 0 ; Interface index
149 .db 0 ; Alternate setting index
150 .db 2 ; Number of endpoints
151 .db 0xff ; Class (vendor specific)
152 .db 0xff ; Subclass (vendor specific)
153 .db 0xff ; Protocol (vendor specific)
154 .db 0 ; String index (none)
155
156 ; Endpoint 2 (IN)
157 .db DSCR_ENDPOINT_LEN
158 .db DSCR_ENDPOINT_TYPE
159 .db 0x82 ; EP number (2), direction (IN)
160 .db ENDPOINT_TYPE_BULK ; Endpoint type (bulk)
161 .db 0x40 ; Max. packet size, LSB (64 bytes)
162 .db 0x00 ; Max. packet size, MSB (64 bytes)
163 .db 0x00 ; Polling interval
164
165 ; Endpoint 6 (IN)
166 .db DSCR_ENDPOINT_LEN
167 .db DSCR_ENDPOINT_TYPE
168 .db 0x86 ; EP number (6), direction (IN)
169 .db ENDPOINT_TYPE_BULK ; Endpoint type (bulk)
170 .db 0x40 ; Max. packet size, LSB (64 bytes)
171 .db 0x00 ; Max. packet size, MSB (64 bytes)
172 .db 0x00 ; Polling interval
173
174fullspd_dscr_realend:
175
176 .even
177
178; -----------------------------------------------------------------------------
179; Strings
180; -----------------------------------------------------------------------------
181
182_dev_strings:
183
184; See http://www.usb.org/developers/docs/USB_LANGIDs.pdf for the full list.
185_string0:
186 .db string0end - _string0
187 .db DSCR_STRING_TYPE
188 .db 0x09, 0x04 ; Language code 0x0409 (English, US)
189string0end:
190
191_string1:
192 .db string1end - _string1
193 .db DSCR_STRING_TYPE
194 .ascii 's'
195 .db 0
196 .ascii 'i'
197 .db 0
198 .ascii 'g'
199 .db 0
200 .ascii 'r'
201 .db 0
202 .ascii 'o'
203 .db 0
204 .ascii 'k'
205 .db 0
206string1end:
207
208_string2:
209 .db string2end - _string2
210 .db DSCR_STRING_TYPE
211 .ascii 'f'
212 .db 0
213 .ascii 'x'
214 .db 0
215 .ascii '2'
216 .db 0
217 .ascii 'l'
218 .db 0
219 .ascii 'a'
220 .db 0
221 .ascii 'f'
222 .db 0
223 .ascii 'w'
224 .db 0
225string2end:
226
227_dev_strings_end:
228 .dw 0x0000
229