2 ;; This file is part of the sigrok-firmware-fx2lafw project.
4 ;; Copyright (C) 2011-2012 Uwe Hermann <uwe@hermann-uwe.de>
5 ;; Copyright (C) 2012 Joel Holdsworth <joel@airwebreathe.org.uk>
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.
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.
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
28 DSCR_INTERFACE_TYPE = 4
29 DSCR_ENDPOINT_TYPE = 5
33 DSCR_INTERFACE_LEN = 9
37 ENDPOINT_TYPE_CONTROL = 0
39 ENDPOINT_TYPE_BULK = 2
42 .globl _dev_dscr, _dev_qual_dscr, _highspd_dscr, _fullspd_dscr, _dev_strings, _dev_strings_end
43 .area DSCR_AREA (CODE)
45 ; -----------------------------------------------------------------------------
47 ; -----------------------------------------------------------------------------
49 .db dev_dscr_end - _dev_dscr
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 VID ; Manufacturer ID
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
65 ; -----------------------------------------------------------------------------
66 ; Device qualifier (for "other device speed")
67 ; -----------------------------------------------------------------------------
69 .db dev_qualdscr_end - _dev_qual_dscr
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
80 ; -----------------------------------------------------------------------------
81 ; High-Speed configuration descriptor
82 ; -----------------------------------------------------------------------------
84 .db highspd_dscr_end - _highspd_dscr
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)
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 1 ; 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)
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
116 highspd_dscr_realend:
120 ; -----------------------------------------------------------------------------
121 ; Full-Speed configuration descriptor
122 ; -----------------------------------------------------------------------------
124 .db fullspd_dscr_end - _fullspd_dscr
126 ; Total length of the configuration (1st line LSB, 2nd line MSB)
127 .db (fullspd_dscr_realend - _fullspd_dscr) % 256
128 .db (fullspd_dscr_realend - _fullspd_dscr) / 256
129 .db 1 ; Number of interfaces
130 .db 1 ; Configuration number
131 .db 0 ; Configuration string (none)
132 .db 0x80 ; Attributes (bus powered, no wakeup)
133 .db 0x32 ; Max. power (100mA)
136 ; Interfaces (only one in our case)
137 .db DSCR_INTERFACE_LEN
138 .db DSCR_INTERFACE_TYPE
139 .db 0 ; Interface index
140 .db 0 ; Alternate setting index
141 .db 1 ; Number of endpoints
142 .db 0xff ; Class (vendor specific)
143 .db 0xff ; Subclass (vendor specific)
144 .db 0xff ; Protocol (vendor specific)
145 .db 0 ; String index (none)
148 .db DSCR_ENDPOINT_LEN
149 .db DSCR_ENDPOINT_TYPE
150 .db 0x82 ; EP number (2), direction (IN)
151 .db ENDPOINT_TYPE_BULK ; Endpoint type (bulk)
152 .db 0x40 ; Max. packet size, LSB (64 bytes)
153 .db 0x00 ; Max. packet size, MSB (64 bytes)
154 .db 0x00 ; Polling interval
156 fullspd_dscr_realend:
160 ; -----------------------------------------------------------------------------
162 ; -----------------------------------------------------------------------------
166 ; See http://www.usb.org/developers/docs/USB_LANGIDs.pdf for the full list.
168 .db string0end - _string0
170 .db 0x09, 0x04 ; Language code 0x0409 (English, US)
174 .db string1end - _string1
191 .db string2end - _string2