2 FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry.
\r
4 This file is part of the FreeRTOS.org distribution.
\r
6 FreeRTOS.org is free software; you can redistribute it and/or modify
\r
7 it under the terms of the GNU General Public License as published by
\r
8 the Free Software Foundation; either version 2 of the License, or
\r
9 (at your option) any later version.
\r
11 FreeRTOS.org is distributed in the hope that it will be useful,
\r
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
\r
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
\r
14 GNU General Public License for more details.
\r
16 You should have received a copy of the GNU General Public License
\r
17 along with FreeRTOS.org; if not, write to the Free Software
\r
18 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
\r
20 A special exception to the GPL can be applied should you wish to distribute
\r
21 a combined work that includes FreeRTOS.org, without being obliged to provide
\r
22 the source code for any proprietary components. See the licensing section
\r
23 of http://www.FreeRTOS.org for full details of how and when the exception
\r
26 ***************************************************************************
\r
27 ***************************************************************************
\r
29 * SAVE TIME AND MONEY! We can port FreeRTOS.org to your own hardware, *
\r
30 * and even write all or part of your application on your behalf. *
\r
31 * See http://www.OpenRTOS.com for details of the services we provide to *
\r
32 * expedite your project. *
\r
34 ***************************************************************************
\r
35 ***************************************************************************
\r
37 Please ensure to read the configuration and relevant port sections of the
\r
38 online documentation.
\r
40 http://www.FreeRTOS.org - Documentation, latest information, license and
\r
43 http://www.SafeRTOS.com - A version that is certified for use in safety
\r
46 http://www.OpenRTOS.com - Commercial support, development, porting,
\r
47 licensing and training services.
\r
51 - DESCRIPTOR DEFINITIONS -
\r
54 /* String descriptors used during the enumeration process.
\r
55 These take the form:
\r
58 Length of descriptor,
\r
64 const portCHAR pxLanguageStringDescriptor[] =
\r
67 usbDESCRIPTOR_TYPE_STRING,
\r
71 const portCHAR pxManufacturerStringDescriptor[] =
\r
74 usbDESCRIPTOR_TYPE_STRING,
\r
76 'F', 0x00, 'r', 0x00, 'e', 0x00, 'e', 0x00, 'R', 0x00, 'T', 0x00, 'O', 0x00, 'S', 0x00
\r
79 const portCHAR pxProductStringDescriptor[] =
\r
82 usbDESCRIPTOR_TYPE_STRING,
\r
84 'F', 0x00, 'r', 0x00, 'e', 0x00, 'e', 0x00, 'R', 0x00, 'T', 0x00, 'O', 0x00, 'S', 0x00, ' ', 0x00, 'C', 0x00, 'D', 0x00,
\r
85 'C', 0x00, ' ', 0x00, 'D', 0x00, 'E', 0x00, 'M', 0x00, 'O', 0x00
\r
88 const portCHAR pxConfigurationStringDescriptor[] =
\r
91 usbDESCRIPTOR_TYPE_STRING,
\r
93 'C', 0x00, 'o', 0x00, 'n', 0x00, 'f', 0x00, 'i', 0x00, 'g', 0x00, 'u', 0x00, 'r', 0x00, 'a', 0x00, 't', 0x00, 'i', 0x00,
\r
94 'o', 0x00, 'n', 0x00, ' ', 0x00, 'N', 0x00, 'a', 0x00, 'm', 0x00, 'e', 0x00
\r
97 const portCHAR pxInterfaceStringDescriptor[] =
\r
100 usbDESCRIPTOR_TYPE_STRING,
\r
102 'I', 0x00, 'n', 0x00, 't', 0x00, 'e', 0x00, 'r', 0x00, 'f', 0x00, 'a', 0x00, 'c', 0x00, 'e', 0x00, ' ', 0x00, 'N', 0x00,
\r
103 'a', 0x00, 'm', 0x00, 'e', 0x00
\r
106 /* Device should properly be 0x134A:0x9001, using 0x05F9:0xFFFF for Linux testing */
\r
107 const char pxDeviceDescriptor[] =
\r
109 /* Device descriptor */
\r
110 0x12, /* bLength */
\r
111 0x01, /* bDescriptorType */
\r
112 0x10, 0x01, /* bcdUSBL */
\r
113 0x02, /* bDeviceClass: */
\r
114 0x00, /* bDeviceSubclass: */
\r
115 0x00, /* bDeviceProtocol: */
\r
116 0x08, /* bMaxPacketSize0 */
\r
117 0x03, 0xEB, /* idVendorL */
\r
118 0x20, 0x09, /* idProductL */
\r
119 0x10, 0x01, /* bcdDeviceL */
\r
120 usbMANUFACTURER_STRING, /* iManufacturer */
\r
121 usbPRODUCT_STRING, /* iProduct */
\r
122 0x00, /* SerialNumber */
\r
123 0x01 /* bNumConfigs */
\r
126 const char pxConfigDescriptor[] = {
\r
128 /* Configuration 1 descriptor
\r
129 Here we define two interfaces (0 and 1) and a total of 3 endpoints.
\r
130 Interface 0 is a CDC Abstract Control Model interface with one interrupt-in endpoint.
\r
131 Interface 1 is a CDC Data Interface class, with a bulk-in and bulk-out endpoint.
\r
132 Endpoint 0 gets used as the CDC management element.
\r
134 0x09, /* CbLength */
\r
135 0x02, /* CbDescriptorType */
\r
136 0x43, 0x00, /* CwTotalLength 2 EP + Control ? */
\r
137 0x02, /* CbNumInterfaces */
\r
138 0x01, /* CbConfigurationValue */
\r
139 usbCONFIGURATION_STRING,/* CiConfiguration */
\r
140 usbBUS_POWERED, /* CbmAttributes Bus powered + Remote Wakeup*/
\r
141 0x32, /* CMaxPower: 100mA */
\r
143 /* Communication Class Interface Descriptor Requirement */
\r
144 0x09, /* bLength */
\r
145 0x04, /* bDescriptorType */
\r
146 0x00, /* bInterfaceNumber */
\r
147 0x00, /* bAlternateSetting */
\r
148 0x01, /* bNumEndpoints */
\r
149 0x02, /* bInterfaceClass: Comm Interface Class */
\r
150 0x02, /* bInterfaceSubclass: Abstract Control Model*/
\r
151 0x00, /* bInterfaceProtocol */
\r
152 usbINTERFACE_STRING,/* iInterface */
\r
154 /* Header Functional Descriptor */
\r
155 0x05, /* bLength */
\r
156 0x24, /* bDescriptor type: CS_INTERFACE */
\r
157 0x00, /* bDescriptor subtype: Header Func Desc*/
\r
158 0x10, 0x01, /* bcdCDC:1.1 */
\r
160 /* ACM Functional Descriptor */
\r
161 0x04, /* bFunctionLength */
\r
162 0x24, /* bDescriptor type: CS_INTERFACE */
\r
163 0x02, /* bDescriptor subtype: ACM Func Desc */
\r
164 0x00, /* bmCapabilities: We don't support squat*/
\r
166 /* Union Functional Descriptor */
\r
167 0x05, /* bFunctionLength */
\r
168 0x24, /* bDescriptor type: CS_INTERFACE */
\r
169 0x06, /* bDescriptor subtype: Union Func Desc */
\r
170 0x00, /* bMasterInterface: CDC Interface */
\r
171 0x01, /* bSlaveInterface0: Data Class Interface*/
\r
173 /* Call Management Functional Descriptor
\r
174 0 in D1 and D0 indicates that device does not handle call management*/
\r
175 0x05, /* bFunctionLength */
\r
176 0x24, /* bDescriptor type: CS_INTERFACE */
\r
177 0x01, /* bDescriptor subtype: Call Management Func*/
\r
178 0x00, /* bmCapabilities: D1 + D0 */
\r
179 0x01, /* bDataInterface: Data Class Interface 1*/
\r
181 /* CDC Control - Endpoint 3 descriptor
\r
182 This endpoint serves as a notification element. */
\r
184 0x07, /* bLength */
\r
185 0x05, /* bDescriptorType */
\r
186 0x83, /* bEndpointAddress, Endpoint 03 - IN */
\r
187 0x03, /* bmAttributes INT */
\r
188 0x08, 0x00, /* wMaxPacketSize: 8 bytes */
\r
189 0xFF, /* bInterval */
\r
191 /* Data Class Interface Descriptor Requirement */
\r
192 0x09, /* bLength */
\r
193 0x04, /* bDescriptorType */
\r
194 0x01, /* bInterfaceNumber */
\r
195 0x00, /* bAlternateSetting */
\r
196 0x02, /* bNumEndPoints */
\r
197 0x0A, /* bInterfaceClass */
\r
198 0x00, /* bInterfaceSubclass */
\r
199 0x00, /* bInterfaceProtocol */
\r
200 0x00, /* iInterface */
\r
202 /* CDC Data - Endpoint 1 descriptor */
\r
203 0x07, /* bLenght */
\r
204 0x05, /* bDescriptorType */
\r
205 0x01, /* bEndPointAddress, Endpoint 01 - OUT */
\r
206 0x02, /* bmAttributes BULK */
\r
207 64, /* wMaxPacketSize */
\r
209 0x00, /* bInterval */
\r
211 /* CDC Data - Endpoint 2 descriptor */
\r
212 0x07, /* bLength */
\r
213 0x05, /* bDescriptorType */
\r
214 0x82, /* bEndPointAddress, Endpoint 02 - IN */
\r
215 0x02, /* bmAttributes BULK */
\r
216 64, /* wMaxPacketSize */
\r
218 0x00 /* bInterval */
\r