1 ; Copyright (C) 2009 Ubixum, Inc.
3 ; This library is free software; you can redistribute it and/or
4 ; modify it under the terms of the GNU Lesser General Public
5 ; License as published by the Free Software Foundation; either
6 ; version 2.1 of the License, or (at your option) any later version.
8 ; This library is distributed in the hope that it will be useful,
9 ; but WITHOUT ANY WARRANTY; without even the implied warranty of
10 ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 ; Lesser General Public License for more details.
13 ; You should have received a copy of the GNU Lesser General Public
14 ; License along with this library; if not, write to the Free Software
15 ; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17 ; this is a the default
18 ; full speed and high speed
19 ; descriptors found in the TRM
20 ; change however you want but leave
21 ; the descriptor pointers so the setupdat.c file works right
35 ; for the repeating interfaces
40 ENDPOINT_TYPE_CONTROL=0
45 .globl _dev_dscr, _dev_qual_dscr, _highspd_dscr, _fullspd_dscr, _dev_strings, _dev_strings_end
46 ; These need to be in code memory. If
47 ; they aren't you'll have to manully copy them somewhere
48 ; in code memory otherwise SUDPTRH:L don't work right
49 .area DSCR_AREA (CODE)
52 .db dev_dscr_end-_dev_dscr ; len
53 .db DSCR_DEVICE_TYPE ; type
55 .db 0xff ; class (vendor specific)
56 .db 0xff ; subclass (vendor specific)
57 .db 0xff ; protocol (vendor specific)
58 .db 64 ; packet size (ep0)
59 .dw 0xB504 ; vendor id
60 .dw 0x2260 ; product id
61 .dw 0x0000 ; version id
62 .db 1 ; manufacturure str idx
63 .db 2 ; product str idx
64 .db 0 ; serial str idx
65 .db 1 ; n configurations
69 .db dev_qualdscr_end-_dev_qual_dscr
77 .db 0 ; extra reserved byte
81 .db highspd_dscr_end-_highspd_dscr ; dscr len ;; Descriptor length
83 ; can't use .dw because byte order is different
84 .db (highspd_dscr_realend-_highspd_dscr) % 256 ; total length of config lsb
85 .db (highspd_dscr_realend-_highspd_dscr) / 256 ; total length of config msb
89 .db 0x80 ; attrs = bus powered, no wakeup
90 .db 55 ; max power = 110mA
93 ; all the interfaces next
95 .db DSCR_INTERFACE_LEN
96 .db DSCR_INTERFACE_TYPE
98 .db 0 ; alt setting idx
106 .db DSCR_ENDPOINT_LEN
107 .db DSCR_ENDPOINT_TYPE
108 .db 0x86 ; ep1 dir=in and address
109 .db ENDPOINT_TYPE_BULK ; type
110 .db 0x00 ; max packet LSB
111 .db 0x02 ; max packet size=512 bytes
112 .db 0x00 ; polling interval
114 ; ISOCHRONOUS interface
115 .db DSCR_INTERFACE_LEN
116 .db DSCR_INTERFACE_TYPE
118 .db 1 ; alt setting idx
126 .db DSCR_ENDPOINT_LEN
127 .db DSCR_ENDPOINT_TYPE
128 .db 0x82 ; ep1 dir=in and address
129 .db ENDPOINT_TYPE_ISO ; type
130 .db 0x00 ; max packet LSB
131 .db 0x14 ; max packet size=3*1024 bytes
132 .db 0x01 ; polling interval
134 ; ISOCHRONOUS interface 16MB/s
135 .db DSCR_INTERFACE_LEN
136 .db DSCR_INTERFACE_TYPE
138 .db 2 ; alt setting idx
146 .db DSCR_ENDPOINT_LEN
147 .db DSCR_ENDPOINT_TYPE
148 .db 0x82 ; ep1 dir=in and address
149 .db ENDPOINT_TYPE_ISO ; type
150 .db 0x00 ; max packet LSB
151 .db 0x0c ; max packet size=2*1024 bytes
152 .db 0x01 ; polling interval
154 ; ISOCHRONOUS interface 8MB/s
155 .db DSCR_INTERFACE_LEN
156 .db DSCR_INTERFACE_TYPE
158 .db 3 ; alt setting idx
166 .db DSCR_ENDPOINT_LEN
167 .db DSCR_ENDPOINT_TYPE
168 .db 0x82 ; ep1 dir=in and address
169 .db ENDPOINT_TYPE_ISO ; type
170 .db 0x00 ; max packet LSB
171 .db 0x04 ; max packet size=1024 bytes
172 .db 0x01 ; polling interval
174 ; ISOCHRONOUS interface 4MB/s
175 .db DSCR_INTERFACE_LEN
176 .db DSCR_INTERFACE_TYPE
178 .db 4 ; alt setting idx
186 .db DSCR_ENDPOINT_LEN
187 .db DSCR_ENDPOINT_TYPE
188 .db 0x82 ; ep1 dir=in and address
189 .db ENDPOINT_TYPE_ISO ; type
190 .db 0x00 ; max packet LSB
191 .db 0x04 ; max packet size=1024 bytes
192 .db 0x02 ; polling interval
195 ; ISOCHRONOUS interface 2MB/s
196 .db DSCR_INTERFACE_LEN
197 .db DSCR_INTERFACE_TYPE
199 .db 5 ; alt setting idx
207 .db DSCR_ENDPOINT_LEN
208 .db DSCR_ENDPOINT_TYPE
209 .db 0x82 ; ep1 dir=in and address
210 .db ENDPOINT_TYPE_ISO ; type
211 .db 0x00 ; max packet LSB
212 .db 0x04 ; max packet size=1024 bytes
213 .db 0x03 ; polling interval
215 ; ISOCHRONOUS interface 1MB/s
216 .db DSCR_INTERFACE_LEN
217 .db DSCR_INTERFACE_TYPE
219 .db 6 ; alt setting idx
227 .db DSCR_ENDPOINT_LEN
228 .db DSCR_ENDPOINT_TYPE
229 .db 0x82 ; ep1 dir=in and address
230 .db ENDPOINT_TYPE_ISO ; type
231 .db 0x00 ; max packet LSB
232 .db 0x04 ; max packet size=1024 bytes
233 .db 0x04 ; polling interval
235 ; ISOCHRONOUS interface 500 kB/s
236 .db DSCR_INTERFACE_LEN
237 .db DSCR_INTERFACE_TYPE
239 .db 7 ; alt setting idx
247 .db DSCR_ENDPOINT_LEN
248 .db DSCR_ENDPOINT_TYPE
249 .db 0x82 ; ep1 dir=in and address
250 .db ENDPOINT_TYPE_ISO ; type
251 .db 0x00 ; max packet LSB
252 .db 0x02 ; max packet size=512 bytes
253 .db 0x04 ; polling interval
256 highspd_dscr_realend:
260 .db fullspd_dscr_end-_fullspd_dscr ; dscr len
262 ; can't use .dw because byte order is different
263 .db (fullspd_dscr_realend-_fullspd_dscr) % 256 ; total length of config lsb
264 .db (fullspd_dscr_realend-_fullspd_dscr) / 256 ; total length of config msb
266 .db 1 ; config number
267 .db 0 ; config string
268 .db 0x80 ; attrs = bus powered, no wakeup
269 .db 55 ; max power = 110mA
273 ; all the interfaces next
275 .db DSCR_INTERFACE_LEN
276 .db DSCR_INTERFACE_TYPE
278 .db 0 ; alt setting idx
286 .db DSCR_ENDPOINT_LEN
287 .db DSCR_ENDPOINT_TYPE
288 .db 0x86 ; ep1 dir=in and address
289 .db ENDPOINT_TYPE_BULK ; type
290 .db 0x40 ; max packet LSB
291 .db 0x00 ; max packet size=512 bytes
292 .db 0x00 ; polling interval
294 ; ISOCHRONOUS interface 1 MB/s
295 .db DSCR_INTERFACE_LEN
296 .db DSCR_INTERFACE_TYPE
298 .db 1 ; alt setting idx
306 .db DSCR_ENDPOINT_LEN
307 .db DSCR_ENDPOINT_TYPE
308 .db 0x82 ; ep1 dir=in and address
309 .db ENDPOINT_TYPE_ISO ; type
310 .db 0xff ; max packet LSB
311 .db 0x03 ; max packet size=1023 bytes
312 .db 0x01 ; polling interval
314 ; ISOCHRONOUS interface 500 kB/s
315 .db DSCR_INTERFACE_LEN
316 .db DSCR_INTERFACE_TYPE
318 .db 2 ; alt setting idx
326 .db DSCR_ENDPOINT_LEN
327 .db DSCR_ENDPOINT_TYPE
328 .db 0x82 ; ep1 dir=in and address
329 .db ENDPOINT_TYPE_ISO ; type
330 .db 0x00 ; max packet LSB
331 .db 0x02 ; max packet size=512 bytes
332 .db 0x01 ; polling interval
334 fullspd_dscr_realend:
340 .db string0end-_string0 ; len
342 .db 0x09, 0x04 ; 0x0409 is the language code for English. Possible to add more codes after this.
344 ; add more strings here
346 .db string1end-_string1 ; len
351 .db string2end-_string2 ; len
353 .ascii 'H\0a\0n\0t\0e\0k\0D\0S\0O\0006\0000\0002\0002\0B\0E\0'
358 .dw 0x0000 ; in case you wanted to look at memory between _dev_strings and _dev_strings_end