2 FreeRTOS V7.5.0 - Copyright (C) 2013 Real Time Engineers Ltd.
\r
4 VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.
\r
6 ***************************************************************************
\r
8 * FreeRTOS provides completely free yet professionally developed, *
\r
9 * robust, strictly quality controlled, supported, and cross *
\r
10 * platform software that has become a de facto standard. *
\r
12 * Help yourself get started quickly and support the FreeRTOS *
\r
13 * project by purchasing a FreeRTOS tutorial book, reference *
\r
14 * manual, or both from: http://www.FreeRTOS.org/Documentation *
\r
18 ***************************************************************************
\r
20 This file is part of the FreeRTOS distribution.
\r
22 FreeRTOS is free software; you can redistribute it and/or modify it under
\r
23 the terms of the GNU General Public License (version 2) as published by the
\r
24 Free Software Foundation >>!AND MODIFIED BY!<< the FreeRTOS exception.
\r
26 >>! NOTE: The modification to the GPL is included to allow you to distribute
\r
27 >>! a combined work that includes FreeRTOS without being obliged to provide
\r
28 >>! the source code for proprietary components outside of the FreeRTOS
\r
31 FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY
\r
32 WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
\r
33 FOR A PARTICULAR PURPOSE. Full license text is available from the following
\r
34 link: http://www.freertos.org/a00114.html
\r
38 ***************************************************************************
\r
40 * Having a problem? Start by reading the FAQ "My application does *
\r
41 * not run, what could be wrong?" *
\r
43 * http://www.FreeRTOS.org/FAQHelp.html *
\r
45 ***************************************************************************
\r
47 http://www.FreeRTOS.org - Documentation, books, training, latest versions,
\r
48 license and Real Time Engineers Ltd. contact details.
\r
50 http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,
\r
51 including FreeRTOS+Trace - an indispensable productivity tool, a DOS
\r
52 compatible FAT file system, and our tiny thread aware UDP/IP stack.
\r
54 http://www.OpenRTOS.com - Real Time Engineers ltd license FreeRTOS to High
\r
55 Integrity Systems to sell under the OpenRTOS brand. Low cost OpenRTOS
\r
56 licenses offer ticketed support, indemnification and middleware.
\r
58 http://www.SafeRTOS.com - High Integrity Systems also provide a safety
\r
59 engineered and independently SIL3 certified version for use in safety and
\r
60 mission critical applications that require provable dependability.
\r
66 - DESCRIPTOR DEFINITIONS -
\r
69 /* String descriptors used during the enumeration process.
\r
70 These take the form:
\r
73 Length of descriptor,
\r
79 const char pxLanguageStringDescriptor[] =
\r
82 usbDESCRIPTOR_TYPE_STRING,
\r
86 const char pxManufacturerStringDescriptor[] =
\r
89 usbDESCRIPTOR_TYPE_STRING,
\r
91 'F', 0x00, 'r', 0x00, 'e', 0x00, 'e', 0x00, 'R', 0x00, 'T', 0x00, 'O', 0x00, 'S', 0x00
\r
94 const char pxProductStringDescriptor[] =
\r
97 usbDESCRIPTOR_TYPE_STRING,
\r
99 'F', 0x00, 'r', 0x00, 'e', 0x00, 'e', 0x00, 'R', 0x00, 'T', 0x00, 'O', 0x00, 'S', 0x00, ' ', 0x00, 'C', 0x00, 'D', 0x00,
\r
100 'C', 0x00, ' ', 0x00, 'D', 0x00, 'E', 0x00, 'M', 0x00, 'O', 0x00
\r
103 const char pxConfigurationStringDescriptor[] =
\r
106 usbDESCRIPTOR_TYPE_STRING,
\r
108 'C', 0x00, 'o', 0x00, 'n', 0x00, 'f', 0x00, 'i', 0x00, 'g', 0x00, 'u', 0x00, 'r', 0x00, 'a', 0x00, 't', 0x00, 'i', 0x00,
\r
109 'o', 0x00, 'n', 0x00, ' ', 0x00, 'N', 0x00, 'a', 0x00, 'm', 0x00, 'e', 0x00
\r
112 const char pxInterfaceStringDescriptor[] =
\r
115 usbDESCRIPTOR_TYPE_STRING,
\r
117 'I', 0x00, 'n', 0x00, 't', 0x00, 'e', 0x00, 'r', 0x00, 'f', 0x00, 'a', 0x00, 'c', 0x00, 'e', 0x00, ' ', 0x00, 'N', 0x00,
\r
118 'a', 0x00, 'm', 0x00, 'e', 0x00
\r
121 /* Device should properly be 0x134A:0x9001, using 0x05F9:0xFFFF for Linux testing */
\r
122 const char pxDeviceDescriptor[] =
\r
124 /* Device descriptor */
\r
125 0x12, /* bLength */
\r
126 0x01, /* bDescriptorType */
\r
127 0x10, 0x01, /* bcdUSBL */
\r
128 0x02, /* bDeviceClass: */
\r
129 0x00, /* bDeviceSubclass: */
\r
130 0x00, /* bDeviceProtocol: */
\r
131 0x08, /* bMaxPacketSize0 */
\r
132 0x03, 0xEB, /* idVendorL */
\r
133 0x20, 0x09, /* idProductL */
\r
134 0x10, 0x01, /* bcdDeviceL */
\r
135 usbMANUFACTURER_STRING, /* iManufacturer */
\r
136 usbPRODUCT_STRING, /* iProduct */
\r
137 0x00, /* SerialNumber */
\r
138 0x01 /* bNumConfigs */
\r
141 const char pxConfigDescriptor[] = {
\r
143 /* Configuration 1 descriptor
\r
144 Here we define two interfaces (0 and 1) and a total of 3 endpoints.
\r
145 Interface 0 is a CDC Abstract Control Model interface with one interrupt-in endpoint.
\r
146 Interface 1 is a CDC Data Interface class, with a bulk-in and bulk-out endpoint.
\r
147 Endpoint 0 gets used as the CDC management element.
\r
149 0x09, /* CbLength */
\r
150 0x02, /* CbDescriptorType */
\r
151 0x43, 0x00, /* CwTotalLength 2 EP + Control ? */
\r
152 0x02, /* CbNumInterfaces */
\r
153 0x01, /* CbConfigurationValue */
\r
154 usbCONFIGURATION_STRING,/* CiConfiguration */
\r
155 usbBUS_POWERED, /* CbmAttributes Bus powered + Remote Wakeup*/
\r
156 0x32, /* CMaxPower: 100mA */
\r
158 /* Communication Class Interface Descriptor Requirement */
\r
159 0x09, /* bLength */
\r
160 0x04, /* bDescriptorType */
\r
161 0x00, /* bInterfaceNumber */
\r
162 0x00, /* bAlternateSetting */
\r
163 0x01, /* bNumEndpoints */
\r
164 0x02, /* bInterfaceClass: Comm Interface Class */
\r
165 0x02, /* bInterfaceSubclass: Abstract Control Model*/
\r
166 0x00, /* bInterfaceProtocol */
\r
167 usbINTERFACE_STRING,/* iInterface */
\r
169 /* Header Functional Descriptor */
\r
170 0x05, /* bLength */
\r
171 0x24, /* bDescriptor type: CS_INTERFACE */
\r
172 0x00, /* bDescriptor subtype: Header Func Desc*/
\r
173 0x10, 0x01, /* bcdCDC:1.1 */
\r
175 /* ACM Functional Descriptor */
\r
176 0x04, /* bFunctionLength */
\r
177 0x24, /* bDescriptor type: CS_INTERFACE */
\r
178 0x02, /* bDescriptor subtype: ACM Func Desc */
\r
179 0x00, /* bmCapabilities: We don't support squat*/
\r
181 /* Union Functional Descriptor */
\r
182 0x05, /* bFunctionLength */
\r
183 0x24, /* bDescriptor type: CS_INTERFACE */
\r
184 0x06, /* bDescriptor subtype: Union Func Desc */
\r
185 0x00, /* bMasterInterface: CDC Interface */
\r
186 0x01, /* bSlaveInterface0: Data Class Interface*/
\r
188 /* Call Management Functional Descriptor
\r
189 0 in D1 and D0 indicates that device does not handle call management*/
\r
190 0x05, /* bFunctionLength */
\r
191 0x24, /* bDescriptor type: CS_INTERFACE */
\r
192 0x01, /* bDescriptor subtype: Call Management Func*/
\r
193 0x01, /* bmCapabilities: D1 + D0 */
\r
194 0x01, /* bDataInterface: Data Class Interface 1*/
\r
196 /* CDC Control - Endpoint 3 descriptor
\r
197 This endpoint serves as a notification element. */
\r
199 0x07, /* bLength */
\r
200 0x05, /* bDescriptorType */
\r
201 0x83, /* bEndpointAddress, Endpoint 03 - IN */
\r
202 0x03, /* bmAttributes INT */
\r
203 0x08, 0x00, /* wMaxPacketSize: 8 bytes */
\r
204 0xFF, /* bInterval */
\r
206 /* Data Class Interface Descriptor Requirement */
\r
207 0x09, /* bLength */
\r
208 0x04, /* bDescriptorType */
\r
209 0x01, /* bInterfaceNumber */
\r
210 0x00, /* bAlternateSetting */
\r
211 0x02, /* bNumEndPoints */
\r
212 0x0A, /* bInterfaceClass */
\r
213 0x00, /* bInterfaceSubclass */
\r
214 0x00, /* bInterfaceProtocol */
\r
215 0x00, /* iInterface */
\r
217 /* CDC Data - Endpoint 1 descriptor */
\r
218 0x07, /* bLenght */
\r
219 0x05, /* bDescriptorType */
\r
220 0x01, /* bEndPointAddress, Endpoint 01 - OUT */
\r
221 0x02, /* bmAttributes BULK */
\r
222 64, /* wMaxPacketSize */
\r
224 0x00, /* bInterval */
\r
226 /* CDC Data - Endpoint 2 descriptor */
\r
227 0x07, /* bLength */
\r
228 0x05, /* bDescriptorType */
\r
229 0x82, /* bEndPointAddress, Endpoint 02 - IN */
\r
230 0x02, /* bmAttributes BULK */
\r
231 64, /* wMaxPacketSize */
\r
233 0x00 /* bInterval */
\r