Support VMS 5.5_2 mode page bits.
[SCSI2SD-V6.git] / software / SCSI2SD / v3 / SCSI2SD.cydsn / Generated_Source / PSoC5 / USBFS_descr.c
1 /*******************************************************************************\r
2 * File Name: USBFS_descr.c\r
3 * Version 2.80\r
4 *\r
5 * Description:\r
6 *  USB descriptors and storage.\r
7 *\r
8 *  Note:\r
9 *\r
10 ********************************************************************************\r
11 * Copyright 2008-2014, Cypress Semiconductor Corporation.  All rights reserved.\r
12 * You may use this file only in accordance with the license, terms, conditions,\r
13 * disclaimers, and limitations in the end user license agreement accompanying\r
14 * the software package with which this file was provided.\r
15 *******************************************************************************/\r
16 \r
17 #include "USBFS.h"\r
18 #include "USBFS_pvt.h"\r
19 \r
20 \r
21 /*****************************************************************************\r
22 *  User supplied descriptors.  If you want to specify your own descriptors,\r
23 *  define USER_SUPPLIED_DESCRIPTORS below and add your descriptors.\r
24 *****************************************************************************/\r
25 /* `#START USER_DESCRIPTORS_DECLARATIONS` Place your declaration here */\r
26 \r
27 /* `#END` */\r
28 \r
29 \r
30 /***************************************\r
31 *  USB Customizer Generated Descriptors\r
32 ***************************************/\r
33 \r
34 #if !defined(USER_SUPPLIED_DESCRIPTORS)\r
35 /*********************************************************************\r
36 * Device Descriptors\r
37 *********************************************************************/\r
38 const uint8 CYCODE USBFS_DEVICE0_DESCR[18u] = {\r
39 /* Descriptor Length                       */ 0x12u,\r
40 /* DescriptorType: DEVICE                  */ 0x01u,\r
41 /* bcdUSB (ver 2.0)                        */ 0x00u, 0x02u,\r
42 /* bDeviceClass                            */ 0x00u,\r
43 /* bDeviceSubClass                         */ 0x00u,\r
44 /* bDeviceProtocol                         */ 0x00u,\r
45 /* bMaxPacketSize0                         */ 0x08u,\r
46 /* idVendor                                */ 0xB4u, 0x04u,\r
47 /* idProduct                               */ 0x37u, 0x13u,\r
48 /* bcdDevice                               */ 0x01u, 0x30u,\r
49 /* iManufacturer                           */ 0x02u,\r
50 /* iProduct                                */ 0x01u,\r
51 /* iSerialNumber                           */ 0x80u,\r
52 /* bNumConfigurations                      */ 0x01u\r
53 };\r
54 /*********************************************************************\r
55 * Config Descriptor  \r
56 *********************************************************************/\r
57 const uint8 CYCODE USBFS_DEVICE0_CONFIGURATION0_DESCR[73u] = {\r
58 /*  Config Descriptor Length               */ 0x09u,\r
59 /*  DescriptorType: CONFIG                 */ 0x02u,\r
60 /*  wTotalLength                           */ 0x49u, 0x00u,\r
61 /*  bNumInterfaces                         */ 0x02u,\r
62 /*  bConfigurationValue                    */ 0x01u,\r
63 /*  iConfiguration                         */ 0x00u,\r
64 /*  bmAttributes                           */ 0x80u,\r
65 /*  bMaxPower                              */ 0xFAu,\r
66 /*********************************************************************\r
67 * Interface Descriptor\r
68 *********************************************************************/\r
69 /*  Interface Descriptor Length            */ 0x09u,\r
70 /*  DescriptorType: INTERFACE              */ 0x04u,\r
71 /*  bInterfaceNumber                       */ 0x00u,\r
72 /*  bAlternateSetting                      */ 0x00u,\r
73 /*  bNumEndpoints                          */ 0x02u,\r
74 /*  bInterfaceClass                        */ 0x03u,\r
75 /*  bInterfaceSubClass                     */ 0x00u,\r
76 /*  bInterfaceProtocol                     */ 0x00u,\r
77 /*  iInterface                             */ 0x00u,\r
78 /*********************************************************************\r
79 * HID Class Descriptor\r
80 *********************************************************************/\r
81 /*  HID Class Descriptor Length            */ 0x09u,\r
82 /*  DescriptorType: HID_CLASS              */ 0x21u,\r
83 /*  bcdHID                                 */ 0x11u, 0x01u,\r
84 /*  bCountryCode                           */ 0x00u,\r
85 /*  bNumDescriptors                        */ 0x01u,\r
86 /*  bDescriptorType                        */ 0x22u,\r
87 /*  wDescriptorLength (LSB)                */ USBFS_HID_RPT_1_SIZE_LSB,\r
88 /*  wDescriptorLength (MSB)                */ USBFS_HID_RPT_1_SIZE_MSB,\r
89 /*********************************************************************\r
90 * Endpoint Descriptor\r
91 *********************************************************************/\r
92 /*  Endpoint Descriptor Length             */ 0x07u,\r
93 /*  DescriptorType: ENDPOINT               */ 0x05u,\r
94 /*  bEndpointAddress                       */ 0x01u,\r
95 /*  bmAttributes                           */ 0x03u,\r
96 /*  wMaxPacketSize                         */ 0x40u, 0x00u,\r
97 /*  bInterval                              */ 0x20u,\r
98 /*********************************************************************\r
99 * Endpoint Descriptor\r
100 *********************************************************************/\r
101 /*  Endpoint Descriptor Length             */ 0x07u,\r
102 /*  DescriptorType: ENDPOINT               */ 0x05u,\r
103 /*  bEndpointAddress                       */ 0x82u,\r
104 /*  bmAttributes                           */ 0x03u,\r
105 /*  wMaxPacketSize                         */ 0x40u, 0x00u,\r
106 /*  bInterval                              */ 0x20u,\r
107 /*********************************************************************\r
108 * Interface Descriptor\r
109 *********************************************************************/\r
110 /*  Interface Descriptor Length            */ 0x09u,\r
111 /*  DescriptorType: INTERFACE              */ 0x04u,\r
112 /*  bInterfaceNumber                       */ 0x01u,\r
113 /*  bAlternateSetting                      */ 0x00u,\r
114 /*  bNumEndpoints                          */ 0x02u,\r
115 /*  bInterfaceClass                        */ 0x03u,\r
116 /*  bInterfaceSubClass                     */ 0x00u,\r
117 /*  bInterfaceProtocol                     */ 0x00u,\r
118 /*  iInterface                             */ 0x00u,\r
119 /*********************************************************************\r
120 * HID Class Descriptor\r
121 *********************************************************************/\r
122 /*  HID Class Descriptor Length            */ 0x09u,\r
123 /*  DescriptorType: HID_CLASS              */ 0x21u,\r
124 /*  bcdHID                                 */ 0x11u, 0x01u,\r
125 /*  bCountryCode                           */ 0x00u,\r
126 /*  bNumDescriptors                        */ 0x01u,\r
127 /*  bDescriptorType                        */ 0x22u,\r
128 /*  wDescriptorLength (LSB)                */ USBFS_HID_RPT_2_SIZE_LSB,\r
129 /*  wDescriptorLength (MSB)                */ USBFS_HID_RPT_2_SIZE_MSB,\r
130 /*********************************************************************\r
131 * Endpoint Descriptor\r
132 *********************************************************************/\r
133 /*  Endpoint Descriptor Length             */ 0x07u,\r
134 /*  DescriptorType: ENDPOINT               */ 0x05u,\r
135 /*  bEndpointAddress                       */ 0x03u,\r
136 /*  bmAttributes                           */ 0x03u,\r
137 /*  wMaxPacketSize                         */ 0x40u, 0x00u,\r
138 /*  bInterval                              */ 0x20u,\r
139 /*********************************************************************\r
140 * Endpoint Descriptor\r
141 *********************************************************************/\r
142 /*  Endpoint Descriptor Length             */ 0x07u,\r
143 /*  DescriptorType: ENDPOINT               */ 0x05u,\r
144 /*  bEndpointAddress                       */ 0x84u,\r
145 /*  bmAttributes                           */ 0x03u,\r
146 /*  wMaxPacketSize                         */ 0x40u, 0x00u,\r
147 /*  bInterval                              */ 0x20u\r
148 };\r
149 \r
150 /*********************************************************************\r
151 * String Descriptor Table\r
152 *********************************************************************/\r
153 const uint8 CYCODE USBFS_STRING_DESCRIPTORS[45u] = {\r
154 /*********************************************************************\r
155 * Language ID Descriptor\r
156 *********************************************************************/\r
157 /* Descriptor Length                       */ 0x04u,\r
158 /* DescriptorType: STRING                  */ 0x03u,\r
159 /* Language Id                             */ 0x09u, 0x04u,\r
160 /*********************************************************************\r
161 * String Descriptor: "SCSI2SD"\r
162 *********************************************************************/\r
163 /* Descriptor Length                       */ 0x10u,\r
164 /* DescriptorType: STRING                  */ 0x03u,\r
165  (uint8)'S', 0u,(uint8)'C', 0u,(uint8)'S', 0u,(uint8)'I', 0u,(uint8)'2', 0u,\r
166  (uint8)'S', 0u,(uint8)'D', 0u,\r
167 /*********************************************************************\r
168 * String Descriptor: "codesrc.com"\r
169 *********************************************************************/\r
170 /* Descriptor Length                       */ 0x18u,\r
171 /* DescriptorType: STRING                  */ 0x03u,\r
172  (uint8)'c', 0u,(uint8)'o', 0u,(uint8)'d', 0u,(uint8)'e', 0u,(uint8)'s', 0u,\r
173  (uint8)'r', 0u,(uint8)'c', 0u,(uint8)'.', 0u,(uint8)'c', 0u,(uint8)'o', 0u,\r
174  (uint8)'m', 0u,\r
175 /*********************************************************************/\r
176 /* Marks the end of the list.              */ 0x00u};\r
177 /*********************************************************************/\r
178 \r
179 /*********************************************************************\r
180 * Serial Number String Descriptor\r
181 *********************************************************************/\r
182 const uint8 CYCODE USBFS_SN_STRING_DESCRIPTOR[10] = {\r
183 /* Descriptor Length                       */ 0x0Au,\r
184 /* DescriptorType: STRING                  */ 0x03u,\r
185 (uint8)'1', 0u,(uint8)'2', 0u,(uint8)'3', 0u,(uint8)'4', 0u\r
186 };\r
187 \r
188 /*********************************************************************\r
189 * HID Report Descriptor: Generic HID - Vendor FF00\r
190 *********************************************************************/\r
191 const uint8 CYCODE USBFS_HIDREPORT_DESCRIPTOR1[41u] = {\r
192 /*  Descriptor Size (Not part of descriptor)*/ USBFS_HID_RPT_1_SIZE_LSB,\r
193 USBFS_HID_RPT_1_SIZE_MSB,\r
194 /* USAGE_PAGE                              */ 0x06u, 0x00u, 0xFFu, \r
195 /* USAGE                                   */ 0x09u, 0x00u, \r
196 /* COLLECTION                              */ 0xA1u, 0x00u, \r
197 /* USAGE                                   */ 0x09u, 0x00u, \r
198 /* COLLECTION                              */ 0xA1u, 0x00u, \r
199 /* USAGE                                   */ 0x09u, 0x00u, \r
200 /* LOGICAL_MINIMUM                         */ 0x15u, 0x00u, \r
201 /* LOGICAL_MAXIMUM                         */ 0x25u, 0xFFu, \r
202 /* REPORT_SIZE                             */ 0x75u, 0x08u, \r
203 /* REPORT_COUNT                            */ 0x95u, 0x40u, \r
204 /* OUTPUT                                  */ 0x91u, 0x02u, \r
205 /* USAGE                                   */ 0x09u, 0x00u, \r
206 /* LOGICAL_MINIMUM                         */ 0x15u, 0x00u, \r
207 /* LOGICAL_MAXIMUM                         */ 0x25u, 0xFFu, \r
208 /* REPORT_SIZE                             */ 0x75u, 0x08u, \r
209 /* REPORT_COUNT                            */ 0x95u, 0x40u, \r
210 /* INPUT                                   */ 0x81u, 0x02u, \r
211 /* END_COLLECTION                          */ 0xC0u, \r
212 /* END_COLLECTION                          */ 0xC0u, \r
213 /*********************************************************************/\r
214 /* End of the HID Report Descriptor        */ 0x00u, 0x00u};\r
215 /*********************************************************************/\r
216 /*********************************************************************\r
217 * HID Report Descriptor: Generic HID - Vendor FF01\r
218 *********************************************************************/\r
219 const uint8 CYCODE USBFS_HIDREPORT_DESCRIPTOR2[41u] = {\r
220 /*  Descriptor Size (Not part of descriptor)*/ USBFS_HID_RPT_2_SIZE_LSB,\r
221 USBFS_HID_RPT_2_SIZE_MSB,\r
222 /* USAGE_PAGE                              */ 0x06u, 0x01u, 0xFFu, \r
223 /* USAGE                                   */ 0x09u, 0x01u, \r
224 /* COLLECTION                              */ 0xA1u, 0x00u, \r
225 /* USAGE                                   */ 0x09u, 0x00u, \r
226 /* COLLECTION                              */ 0xA1u, 0x00u, \r
227 /* USAGE                                   */ 0x09u, 0x00u, \r
228 /* LOGICAL_MINIMUM                         */ 0x15u, 0x00u, \r
229 /* LOGICAL_MAXIMUM                         */ 0x25u, 0xFFu, \r
230 /* REPORT_SIZE                             */ 0x75u, 0x08u, \r
231 /* REPORT_COUNT                            */ 0x95u, 0x40u, \r
232 /* OUTPUT                                  */ 0x91u, 0x02u, \r
233 /* USAGE                                   */ 0x09u, 0x00u, \r
234 /* LOGICAL_MINIMUM                         */ 0x15u, 0x00u, \r
235 /* LOGICAL_MAXIMUM                         */ 0x25u, 0xFFu, \r
236 /* REPORT_SIZE                             */ 0x75u, 0x08u, \r
237 /* REPORT_COUNT                            */ 0x95u, 0x40u, \r
238 /* INPUT                                   */ 0x81u, 0x02u, \r
239 /* END_COLLECTION                          */ 0xC0u, \r
240 /* END_COLLECTION                          */ 0xC0u, \r
241 /*********************************************************************/\r
242 /* End of the HID Report Descriptor        */ 0x00u, 0x00u};\r
243 /*********************************************************************/\r
244 \r
245 #if !defined(USER_DEFINE_USBFS_DEVICE0_CONFIGURATION0_INTERFACE0_ALTERNATE0_HID_HID_RPT_STORAGE)\r
246 /*********************************************************************\r
247 * HID Input Report Storage\r
248 *********************************************************************/\r
249 T_USBFS_XFER_STATUS_BLOCK USBFS_DEVICE0_CONFIGURATION0_INTERFACE0_ALTERNATE0_HID_IN_RPT_SCB;\r
250 uint8 USBFS_DEVICE0_CONFIGURATION0_INTERFACE0_ALTERNATE0_HID_IN_BUF[\r
251             USBFS_DEVICE0_CONFIGURATION0_INTERFACE0_ALTERNATE0_HID_IN_BUF_SIZE];\r
252 \r
253 /*********************************************************************\r
254 * HID Input Report TD Table\r
255 *********************************************************************/\r
256 const T_USBFS_TD CYCODE USBFS_DEVICE0_CONFIGURATION0_INTERFACE0_ALTERNATE0_HID_IN_RPT_TABLE[1u] = {\r
257     {USBFS_DEVICE0_CONFIGURATION0_INTERFACE0_ALTERNATE0_HID_IN_BUF_SIZE,\r
258     &USBFS_DEVICE0_CONFIGURATION0_INTERFACE0_ALTERNATE0_HID_IN_BUF[0u],\r
259     &USBFS_DEVICE0_CONFIGURATION0_INTERFACE0_ALTERNATE0_HID_IN_RPT_SCB},\r
260 };\r
261 /*********************************************************************\r
262 * HID Output Report Storage\r
263 *********************************************************************/\r
264 T_USBFS_XFER_STATUS_BLOCK USBFS_DEVICE0_CONFIGURATION0_INTERFACE0_ALTERNATE0_HID_OUT_RPT_SCB;\r
265 uint8 USBFS_DEVICE0_CONFIGURATION0_INTERFACE0_ALTERNATE0_HID_OUT_BUF[\r
266             USBFS_DEVICE0_CONFIGURATION0_INTERFACE0_ALTERNATE0_HID_OUT_BUF_SIZE];\r
267 \r
268 /*********************************************************************\r
269 * HID Output Report TD Table\r
270 *********************************************************************/\r
271 const T_USBFS_TD CYCODE USBFS_DEVICE0_CONFIGURATION0_INTERFACE0_ALTERNATE0_HID_OUT_RPT_TABLE[1u] = {\r
272     {USBFS_DEVICE0_CONFIGURATION0_INTERFACE0_ALTERNATE0_HID_OUT_BUF_SIZE,\r
273     &USBFS_DEVICE0_CONFIGURATION0_INTERFACE0_ALTERNATE0_HID_OUT_BUF[0u],\r
274     &USBFS_DEVICE0_CONFIGURATION0_INTERFACE0_ALTERNATE0_HID_OUT_RPT_SCB},\r
275 };\r
276 /*********************************************************************\r
277 * HID Report Look Up Table         This table has four entries:\r
278 *                                        IN Report Table\r
279 *                                        OUT Report Table\r
280 *                                        Feature Report Table\r
281 *                                        HID Report Descriptor\r
282 *                                        HID Class Descriptor\r
283 *********************************************************************/\r
284 const T_USBFS_LUT CYCODE USBFS_DEVICE0_CONFIGURATION0_INTERFACE0_ALTERNATE0_HID_TABLE[5u] = {\r
285     {0x00u,     &USBFS_DEVICE0_CONFIGURATION0_INTERFACE0_ALTERNATE0_HID_IN_RPT_TABLE},\r
286     {0x00u,     &USBFS_DEVICE0_CONFIGURATION0_INTERFACE0_ALTERNATE0_HID_OUT_RPT_TABLE},\r
287     {0x00u,    NULL},\r
288     {0x01u,     (const void *)&USBFS_HIDREPORT_DESCRIPTOR1[0]},\r
289     {0x01u,     (const void *)&USBFS_DEVICE0_CONFIGURATION0_DESCR[18]}\r
290 };\r
291 #endif /* USER_DEFINE_USBFS_DEVICE0_CONFIGURATION0_INTERFACE0_ALTERNATE0_HID_HID_RPT_STORAGE */\r
292 #if !defined(USER_DEFINE_USBFS_DEVICE0_CONFIGURATION0_INTERFACE1_ALTERNATE0_HID_HID_RPT_STORAGE)\r
293 /*********************************************************************\r
294 * HID Input Report Storage\r
295 *********************************************************************/\r
296 T_USBFS_XFER_STATUS_BLOCK USBFS_DEVICE0_CONFIGURATION0_INTERFACE1_ALTERNATE0_HID_IN_RPT_SCB;\r
297 uint8 USBFS_DEVICE0_CONFIGURATION0_INTERFACE1_ALTERNATE0_HID_IN_BUF[\r
298             USBFS_DEVICE0_CONFIGURATION0_INTERFACE1_ALTERNATE0_HID_IN_BUF_SIZE];\r
299 \r
300 /*********************************************************************\r
301 * HID Input Report TD Table\r
302 *********************************************************************/\r
303 const T_USBFS_TD CYCODE USBFS_DEVICE0_CONFIGURATION0_INTERFACE1_ALTERNATE0_HID_IN_RPT_TABLE[1u] = {\r
304     {USBFS_DEVICE0_CONFIGURATION0_INTERFACE1_ALTERNATE0_HID_IN_BUF_SIZE,\r
305     &USBFS_DEVICE0_CONFIGURATION0_INTERFACE1_ALTERNATE0_HID_IN_BUF[0u],\r
306     &USBFS_DEVICE0_CONFIGURATION0_INTERFACE1_ALTERNATE0_HID_IN_RPT_SCB},\r
307 };\r
308 /*********************************************************************\r
309 * HID Output Report Storage\r
310 *********************************************************************/\r
311 T_USBFS_XFER_STATUS_BLOCK USBFS_DEVICE0_CONFIGURATION0_INTERFACE1_ALTERNATE0_HID_OUT_RPT_SCB;\r
312 uint8 USBFS_DEVICE0_CONFIGURATION0_INTERFACE1_ALTERNATE0_HID_OUT_BUF[\r
313             USBFS_DEVICE0_CONFIGURATION0_INTERFACE1_ALTERNATE0_HID_OUT_BUF_SIZE];\r
314 \r
315 /*********************************************************************\r
316 * HID Output Report TD Table\r
317 *********************************************************************/\r
318 const T_USBFS_TD CYCODE USBFS_DEVICE0_CONFIGURATION0_INTERFACE1_ALTERNATE0_HID_OUT_RPT_TABLE[1u] = {\r
319     {USBFS_DEVICE0_CONFIGURATION0_INTERFACE1_ALTERNATE0_HID_OUT_BUF_SIZE,\r
320     &USBFS_DEVICE0_CONFIGURATION0_INTERFACE1_ALTERNATE0_HID_OUT_BUF[0u],\r
321     &USBFS_DEVICE0_CONFIGURATION0_INTERFACE1_ALTERNATE0_HID_OUT_RPT_SCB},\r
322 };\r
323 /*********************************************************************\r
324 * HID Report Look Up Table         This table has four entries:\r
325 *                                        IN Report Table\r
326 *                                        OUT Report Table\r
327 *                                        Feature Report Table\r
328 *                                        HID Report Descriptor\r
329 *                                        HID Class Descriptor\r
330 *********************************************************************/\r
331 const T_USBFS_LUT CYCODE USBFS_DEVICE0_CONFIGURATION0_INTERFACE1_ALTERNATE0_HID_TABLE[5u] = {\r
332     {0x00u,     &USBFS_DEVICE0_CONFIGURATION0_INTERFACE1_ALTERNATE0_HID_IN_RPT_TABLE},\r
333     {0x00u,     &USBFS_DEVICE0_CONFIGURATION0_INTERFACE1_ALTERNATE0_HID_OUT_RPT_TABLE},\r
334     {0x00u,    NULL},\r
335     {0x01u,     (const void *)&USBFS_HIDREPORT_DESCRIPTOR2[0]},\r
336     {0x01u,     (const void *)&USBFS_DEVICE0_CONFIGURATION0_DESCR[50]}\r
337 };\r
338 #endif /* USER_DEFINE_USBFS_DEVICE0_CONFIGURATION0_INTERFACE1_ALTERNATE0_HID_HID_RPT_STORAGE */\r
339 \r
340 /*********************************************************************\r
341 * Interface Dispatch Table -- Points to the Class Dispatch Tables\r
342 *********************************************************************/\r
343 const T_USBFS_LUT CYCODE USBFS_DEVICE0_CONFIGURATION0_INTERFACE0_TABLE[1u] = {\r
344     {USBFS_DEVICE0_CONFIGURATION0_INTERFACE0_ALTERNATE0_HID_COUNT, \r
345     &USBFS_DEVICE0_CONFIGURATION0_INTERFACE0_ALTERNATE0_HID_TABLE}\r
346 };\r
347 /*********************************************************************\r
348 * Interface Dispatch Table -- Points to the Class Dispatch Tables\r
349 *********************************************************************/\r
350 const T_USBFS_LUT CYCODE USBFS_DEVICE0_CONFIGURATION0_INTERFACE1_TABLE[1u] = {\r
351     {USBFS_DEVICE0_CONFIGURATION0_INTERFACE1_ALTERNATE0_HID_COUNT, \r
352     &USBFS_DEVICE0_CONFIGURATION0_INTERFACE1_ALTERNATE0_HID_TABLE}\r
353 };\r
354 /*********************************************************************\r
355 * Endpoint Setting Table -- This table contain the endpoint setting\r
356 *                           for each endpoint in the configuration. It\r
357 *                           contains the necessary information to\r
358 *                           configure the endpoint hardware for each\r
359 *                           interface and alternate setting.\r
360 *********************************************************************/\r
361 const T_USBFS_EP_SETTINGS_BLOCK CYCODE USBFS_DEVICE0_CONFIGURATION0_EP_SETTINGS_TABLE[4u] = {\r
362 /* IFC  ALT    EPAddr bmAttr MaxPktSize Class ********************/\r
363 {0x00u, 0x00u, 0x01u, 0x03u, 0x0040u,   0x03u},\r
364 {0x00u, 0x00u, 0x82u, 0x03u, 0x0040u,   0x03u},\r
365 {0x01u, 0x00u, 0x03u, 0x03u, 0x0040u,   0x03u},\r
366 {0x01u, 0x00u, 0x84u, 0x03u, 0x0040u,   0x03u}\r
367 };\r
368 const uint8 CYCODE USBFS_DEVICE0_CONFIGURATION0_INTERFACE_CLASS[2u] = {\r
369 0x03u, 0x03u\r
370 };\r
371 /*********************************************************************\r
372 * Config Dispatch Table -- Points to the Config Descriptor and each of\r
373 *                          and endpoint setup table and to each\r
374 *                          interface table if it specifies a USB Class\r
375 *********************************************************************/\r
376 const T_USBFS_LUT CYCODE USBFS_DEVICE0_CONFIGURATION0_TABLE[5u] = {\r
377     {0x01u,     &USBFS_DEVICE0_CONFIGURATION0_DESCR},\r
378     {0x04u,     &USBFS_DEVICE0_CONFIGURATION0_EP_SETTINGS_TABLE},\r
379     {0x01u,     &USBFS_DEVICE0_CONFIGURATION0_INTERFACE0_TABLE},\r
380     {0x01u,     &USBFS_DEVICE0_CONFIGURATION0_INTERFACE1_TABLE},\r
381     {0x00u,     &USBFS_DEVICE0_CONFIGURATION0_INTERFACE_CLASS}\r
382 };\r
383 /*********************************************************************\r
384 * Device Dispatch Table -- Points to the Device Descriptor and each of\r
385 *                          and Configuration Tables for this Device \r
386 *********************************************************************/\r
387 const T_USBFS_LUT CYCODE USBFS_DEVICE0_TABLE[2u] = {\r
388     {0x01u,     &USBFS_DEVICE0_DESCR},\r
389     {0x01u,     &USBFS_DEVICE0_CONFIGURATION0_TABLE}\r
390 };\r
391 /*********************************************************************\r
392 * Device Table -- Indexed by the device number.\r
393 *********************************************************************/\r
394 const T_USBFS_LUT CYCODE USBFS_TABLE[1u] = {\r
395     {0x01u,     &USBFS_DEVICE0_TABLE}\r
396 };\r
397 \r
398 #endif /* USER_SUPPLIED_DESCRIPTORS */\r
399 \r
400 #if defined(USBFS_ENABLE_MSOS_STRING)\r
401 \r
402     /******************************************************************************\r
403     *  USB Microsoft OS String Descriptor\r
404     *  "MSFT" identifies a Microsoft host\r
405     *  "100" specifies version 1.00\r
406     *  USBFS_GET_EXTENDED_CONFIG_DESCRIPTOR becomes the bRequest value\r
407     *  in a host vendor device/class request\r
408     ******************************************************************************/\r
409 \r
410     const uint8 CYCODE USBFS_MSOS_DESCRIPTOR[USBFS_MSOS_DESCRIPTOR_LENGTH] = {\r
411     /* Descriptor Length                       */   0x12u,\r
412     /* DescriptorType: STRING                  */   0x03u,\r
413     /* qwSignature - "MSFT100"                 */   (uint8)'M', 0u, (uint8)'S', 0u, (uint8)'F', 0u, (uint8)'T', 0u,\r
414                                                     (uint8)'1', 0u, (uint8)'0', 0u, (uint8)'0', 0u,\r
415     /* bMS_VendorCode:                         */   USBFS_GET_EXTENDED_CONFIG_DESCRIPTOR,\r
416     /* bPad                                    */   0x00u\r
417     };\r
418 \r
419     /* Extended Configuration Descriptor */\r
420 \r
421     const uint8 CYCODE USBFS_MSOS_CONFIGURATION_DESCR[USBFS_MSOS_CONF_DESCR_LENGTH] = {\r
422     /*  Length of the descriptor 4 bytes       */   0x28u, 0x00u, 0x00u, 0x00u,\r
423     /*  Version of the descriptor 2 bytes      */   0x00u, 0x01u,\r
424     /*  wIndex - Fixed:INDEX_CONFIG_DESCRIPTOR */   0x04u, 0x00u,\r
425     /*  bCount - Count of device functions.    */   0x01u,\r
426     /*  Reserved : 7 bytes                     */   0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u,\r
427     /*  bFirstInterfaceNumber                  */   0x00u,\r
428     /*  Reserved                               */   0x01u,\r
429     /*  compatibleID    - "CYUSB\0\0"          */   (uint8)'C', (uint8)'Y', (uint8)'U', (uint8)'S', (uint8)'B',\r
430                                                     0x00u, 0x00u, 0x00u,\r
431     /*  subcompatibleID - "00001\0\0"          */   (uint8)'0', (uint8)'0', (uint8)'0', (uint8)'0', (uint8)'1',\r
432                                                     0x00u, 0x00u, 0x00u,\r
433     /*  Reserved : 6 bytes                     */   0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u\r
434     };\r
435 \r
436 #endif /* USBFS_ENABLE_MSOS_STRING */\r
437 \r
438 /* DIE ID string descriptor for 8 bytes ID */\r
439 #if defined(USBFS_ENABLE_IDSN_STRING)\r
440     uint8 USBFS_idSerialNumberStringDescriptor[USBFS_IDSN_DESCR_LENGTH];\r
441 #endif /* USBFS_ENABLE_IDSN_STRING */\r
442 \r
443 \r
444 /* [] END OF FILE */\r