aboutsummaryrefslogtreecommitdiffstats
path: root/firmware/fx3/b200/common/common_descriptors.c
blob: 7cb670a4a6c71e7aa5eb5ca7d4dc0817a4b74b61 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
//
// Copyright 2019 Ettus Research, a National Instruments Brand
//
// SPDX-License-Identifier: GPL-3.0-or-later
//

/* This file contains all descriptors that are common between the bootloader
   and firmware code.  Non-const descriptors are modified at runtime based on
   information read from the EEPROM. */

/* Standard Device Descriptor for USB 2.0 */
unsigned char common_usb2_dev_desc[] =
{
    0x12,                           /* Descriptor size */
    0x01,/* CY_U3P_USB_DEVICE_DESCR    Device descriptor type */
    0x10,0x02,                      /* USB 2.10 */
    0xFF,                           /* Device class */
    0x00,                           /* Device sub-class */
    0x00,                           /* Device protocol */
    0x40,                           /* Maxpacket size for EP0 : 64 bytes */
    0xB4,0x04,                      /* Vendor ID */
    0xF0,0x00,                      /* Product ID */
    0x00,0x00,                      /* Device release number */
    0x01,                           /* Manufacture string index */
    0x02,                           /* Product string index */
    0x03,                           /* Serial number string index */
    0x01                            /* Number of configurations */
};

/* Standard Device Descriptor for USB 3.0 */
unsigned char common_usb3_dev_desc[] =
{
    0x12,                           /* Descriptor size */
    0x01,/* CY_U3P_USB_DEVICE_DESCR    Device descriptor type */
    0x00,0x03,                      /* USB 3.0 */
    0xFF,                           /* Device class */
    0x00,                           /* Device sub-class */
    0x00,                           /* Device protocol */
    0x09,                           /* Maxpacket size for EP0 : 2^9 */
    0xB4,0x04,                      /* Vendor ID */
    0xF0,0x00,                      /* Product ID */
    0x00,0x00,                      /* Device release number */
    0x01,                           /* Manufacture string index */
    0x02,                           /* Product string index */
    0x03,                           /* Serial number string index */
    0x01                            /* Number of configurations */
};

/* Standard Device Qualifier Descriptor */
const unsigned char common_dev_qual_desc[] =
{
    0x0A,                           /* Descriptor size */
    0x06,/* CY_U3P_USB_DEVQUAL_DESCR   Device qualifier descriptor type */
    0x00,0x02,                      /* USB 2.0 */
    0xFF,                           /* Device class */
    0x00,                           /* Device sub-class */
    0x00,                           /* Device protocol */
    0x40,                           /* Maxpacket size for EP0 : 64 bytes */
    0x01,                           /* Number of configurations */
    0x00                            /* Reserved */
};

/* Standard Binary Device Object Store Descriptor */
const unsigned char common_usb_bos_desc[] =
{
    0x05,                           /* Descriptor size */
    0x0F,/* CY_U3P_BOS_DESCR           Device descriptor type */
    0x16,0x00,                      /* Length of this descriptor and all sub descriptors */
    0x02,                           /* Number of device capability descriptors */

    /* USB 2.0 extension */
    0x07,                           /* Descriptor size */
    0x10,/* CY_U3P_DEVICE_CAPB_DESCR   Device capability type descriptor */
    0x02,/* CY_U3P_USB2_EXTN_CAPB_TYPE USB 2.0 extension capability type */
    0x02,0x00,0x00,0x00,            /* Supported device level features: LPM support  */

    /* SuperSpeed device capability */
    0x0A,                           /* Descriptor size */
    0x10,/* CY_U3P_DEVICE_CAPB_DESCR   Device capability type descriptor */
    0x03,/* CY_U3P_SS_USB_CAPB_TYPE    SuperSpeed device capability type */
    0x00,                           /* Supported device level features  */
    0x0E,0x00,                      /* Speeds supported by the device : SS, HS and FS */
    0x03,                           /* Functionality support */
    0x00,                           /* U1 Device Exit latency */
    0x00,0x00                       /* U2 Device Exit latency */
};

/* Standard Language ID String Descriptor */
const unsigned char common_string_lang_id_desc[] =
{
    0x04,                           /* Descriptor Size */
    0x03,/* CY_U3P_USB_STRING_DESCR    Device Descriptor Type */
    0x09,0x04                       /* Language ID supported */
};


/* Ettus Manufacturer String Descriptor */
const unsigned char common_ettus_manufacturer_desc[] =
{
    0x26,                           /* Descriptor Size */
    0x03,/* CY_U3P_USB_STRING_DESCR    Device Descriptor Type */
    'E',0x00,
    't',0x00,
    't',0x00,
    'u',0x00,
    's',0x00,
    ' ',0x00,
    'R',0x00,
    'e',0x00,
    's',0x00,
    'e',0x00,
    'a',0x00,
    'r',0x00,
    'c',0x00,
    'h',0x00,
    ' ',0x00,
    'L',0x00,
    'L',0x00,
    'C',0x00
};

/* NI Manufacturer String Descriptor */
const unsigned char common_ni_manufacturer_desc[] =
{
    0x36,                           /* Descriptor Size */
    0x03,/* CY_U3P_USB_STRING_DESCR    Device Descriptor Type */
    'N',0x00,
    'a',0x00,
    't',0x00,
    'i',0x00,
    'o',0x00,
    'n',0x00,
    'a',0x00,
    'l',0x00,
    ' ',0x00,
    'I',0x00,
    'n',0x00,
    's',0x00,
    't',0x00,
    'r',0x00,
    'u',0x00,
    'm',0x00,
    'e',0x00,
    'n',0x00,
    't',0x00,
    's',0x00,
    ' ',0x00,
    'C',0x00,
    'o',0x00,
    'r',0x00,
    'p',0x00,
    '.',0x00
};


/* Ettus Product String Descriptor */
const unsigned char common_b200_product_desc[] =
{
    0x14,                           /* Descriptor Size */
    0x03,/* CY_U3P_USB_STRING_DESCR    Device Descriptor Type */
    'U',0x00,
    'S',0x00,
    'R',0x00,
    'P',0x00,
    ' ',0x00,
    'B',0x00,
    '2',0x00,
    '0',0x00,
    '0',0x00
};

/* NI-USRP 2900 Product String Descriptor */
const unsigned char common_niusrp_2900_product_desc[] =
{
    0x1A,                           /* Descriptor Size */
    0x03,/* CY_U3P_USB_STRING_DESCR    Device Descriptor Type */
    'N',0x00,
    'I',0x00,
    ' ',0x00,
    'U',0x00,
    'S',0x00,
    'R',0x00,
    'P',0x00,
    '-',0x00,
    '2',0x00,
    '9',0x00,
    '0',0x00,
    '0',0x00
};

/* NI-USRP 2901 Product String Descriptor */
const unsigned char common_niusrp_2901_product_desc[] =
{
    0x1A,                           /* Descriptor Size */
    0x03,/* CY_U3P_USB_STRING_DESCR    Device Descriptor Type */
    'N',0x00,
    'I',0x00,
    ' ',0x00,
    'U',0x00,
    'S',0x00,
    'R',0x00,
    'P',0x00,
    '-',0x00,
    '2',0x00,
    '9',0x00,
    '0',0x00,
    '1',0x00
};

/* Unknown Product String Descriptor */
const unsigned char common_unknown_desc[] =
{
    0x10,                           /* Descriptor Size */
    0x03,/* CY_U3P_USB_STRING_DESCR    Device Descriptor Type */
    'U',0x00,
    'n',0x00,
    'k',0x00,
    'n',0x00,
    'o',0x00,
    'w',0x00,
    'n',0x00
};

unsigned char common_dev_serial_desc[] =
{
    0x14,                           /* Descriptor Size */
    0x03,/* CY_U3P_USB_STRING_DESCR    Device Descriptor Type */
    '0', 0x00,
    '0', 0x00,
    '0', 0x00,
    '0', 0x00,
    '0', 0x00,
    '0', 0x00,
    '0', 0x00,
    '0', 0x00,
    '0', 0x00
};