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
30 DSCR_INTERFACE_TYPE = 4
31 DSCR_ENDPOINT_TYPE = 5
35 DSCR_INTERFACE_LEN = 9
39 ENDPOINT_TYPE_CONTROL = 0
41 ENDPOINT_TYPE_BULK = 2
44 .globl _dev_dscr, _dev_qual_dscr, _highspd_dscr, _fullspd_dscr, _dev_strings, _dev_strings_end
45 .area DSCR_AREA (CODE)
47 ; -----------------------------------------------------------------------------
49 ; -----------------------------------------------------------------------------
51 .db dev_dscr_end - _dev_dscr
54 .db 0xff ; Class (vendor specific)
55 .db 0xff ; Subclass (vendor specific)
56 .db 0xff ; Protocol (vendor specific)
57 .db 64 ; Max. EP0 packet size
58 .dw VID ; Manufacturer ID
60 .dw 0x0100 ; Product version (0.01)
61 .db 1 ; Manufacturer string index
62 .db 2 ; Product string index
63 .db 3 ; Serial number string index (none)
64 .db 1 ; Number of configurations
67 ; -----------------------------------------------------------------------------
68 ; Device qualifier (for "other device speed")
69 ; -----------------------------------------------------------------------------
71 .db dev_qualdscr_end - _dev_qual_dscr
74 .db 0xff ; Class (vendor specific)
75 .db 0xff ; Subclass (vendor specific)
76 .db 0xff ; Protocol (vendor specific)
77 .db 64 ; Max. EP0 packet size
78 .db 1 ; Number of configurations
79 .db 0 ; Extra reserved byte
82 ; -----------------------------------------------------------------------------
83 ; High-Speed configuration descriptor
84 ; -----------------------------------------------------------------------------
86 .db highspd_dscr_end - _highspd_dscr
88 ; Total length of the configuration (1st line LSB, 2nd line MSB)
89 .db (highspd_dscr_realend - _highspd_dscr) % 256
90 .db (highspd_dscr_realend - _highspd_dscr) / 256
91 .db 1 ; Number of interfaces
92 .db 1 ; Configuration number
93 .db 0 ; Configuration string (none)
94 .db 0x80 ; Attributes (bus powered, no wakeup)
95 .db 0x32 ; Max. power (100mA)
98 ; Interfaces (only one in our case)
99 .db DSCR_INTERFACE_LEN
100 .db DSCR_INTERFACE_TYPE
101 .db 0 ; Interface index
102 .db 0 ; Alternate setting index
103 .db 1 ; Number of endpoints
104 .db 0xff ; Class (vendor specific)
105 .db 0xff ; Subclass (vendor specific)
106 .db 0xff ; Protocol (vendor specific)
107 .db 0 ; String index (none)
110 .db DSCR_ENDPOINT_LEN
111 .db DSCR_ENDPOINT_TYPE
112 .db 0x82 ; EP number (2), direction (IN)
113 .db ENDPOINT_TYPE_BULK ; Endpoint type (bulk)
114 .db 0x00 ; Max. packet size, LSB (512 bytes)
115 .db 0x02 ; Max. packet size, MSB (512 bytes)
116 .db 0x00 ; Polling interval (ignored for bulk)
118 highspd_dscr_realend:
122 ; -----------------------------------------------------------------------------
123 ; Full-Speed configuration descriptor
124 ; -----------------------------------------------------------------------------
126 .db fullspd_dscr_end - _fullspd_dscr
128 ; Total length of the configuration (1st line LSB, 2nd line MSB)
129 .db (fullspd_dscr_realend - _fullspd_dscr) % 256
130 .db (fullspd_dscr_realend - _fullspd_dscr) / 256
131 .db 1 ; Number of interfaces
132 .db 1 ; Configuration number
133 .db 0 ; Configuration string (none)
134 .db 0x80 ; Attributes (bus powered, no wakeup)
135 .db 0x32 ; Max. power (100mA)
138 ; Interfaces (only one in our case)
139 .db DSCR_INTERFACE_LEN
140 .db DSCR_INTERFACE_TYPE
141 .db 0 ; Interface index
142 .db 0 ; Alternate setting index
143 .db 1 ; Number of endpoints
144 .db 0xff ; Class (vendor specific)
145 .db 0xff ; Subclass (vendor specific)
146 .db 0xff ; Protocol (vendor specific)
147 .db 0 ; String index (none)
150 .db DSCR_ENDPOINT_LEN
151 .db DSCR_ENDPOINT_TYPE
152 .db 0x82 ; EP number (2), direction (IN)
153 .db ENDPOINT_TYPE_BULK ; Endpoint type (bulk)
154 .db 0x40 ; Max. packet size, LSB (64 bytes)
155 .db 0x00 ; Max. packet size, MSB (64 bytes)
156 .db 0x00 ; Polling interval (ignored for bulk)
158 fullspd_dscr_realend:
162 ; -----------------------------------------------------------------------------
164 ; -----------------------------------------------------------------------------
168 ; See http://www.usb.org/developers/docs/USB_LANGIDs.pdf for the full list.
169 string_descriptor_lang 0 0x0409 ; Language code 0x0409 (English, US)
171 string_descriptor_a 1,^"sigrok"
172 string_descriptor_a 2,^"fx2lafw"