2 FreeRTOS V8.2.0rc1 - Copyright (C) 2014 Real Time Engineers Ltd.
\r
5 VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.
\r
7 This file is part of the FreeRTOS distribution.
\r
9 FreeRTOS is free software; you can redistribute it and/or modify it under
\r
10 the terms of the GNU General Public License (version 2) as published by the
\r
11 Free Software Foundation >>!AND MODIFIED BY!<< the FreeRTOS exception.
\r
13 >>! NOTE: The modification to the GPL is included to allow you to !<<
\r
14 >>! distribute a combined work that includes FreeRTOS without being !<<
\r
15 >>! obliged to provide the source code for proprietary components !<<
\r
16 >>! outside of the FreeRTOS kernel. !<<
\r
18 FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY
\r
19 WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
\r
20 FOR A PARTICULAR PURPOSE. Full license text is available on the following
\r
21 link: http://www.freertos.org/a00114.html
\r
25 ***************************************************************************
\r
27 * Having a problem? Start by reading the FAQ "My application does *
\r
28 * not run, what could be wrong?". Have you defined configASSERT()? *
\r
30 * http://www.FreeRTOS.org/FAQHelp.html *
\r
32 ***************************************************************************
\r
34 ***************************************************************************
\r
36 * FreeRTOS provides completely free yet professionally developed, *
\r
37 * robust, strictly quality controlled, supported, and cross *
\r
38 * platform software that is more than just the market leader, it *
\r
39 * is the industry's de facto standard. *
\r
41 * Help yourself get started quickly while simultaneously helping *
\r
42 * to support the FreeRTOS project by purchasing a FreeRTOS *
\r
43 * tutorial book, reference manual, or both: *
\r
44 * http://www.FreeRTOS.org/Documentation *
\r
46 ***************************************************************************
\r
48 ***************************************************************************
\r
50 * Investing in training allows your team to be as productive as *
\r
51 * possible as early as possible, lowering your overall development *
\r
52 * cost, and enabling you to bring a more robust product to market *
\r
53 * earlier than would otherwise be possible. Richard Barry is both *
\r
54 * the architect and key author of FreeRTOS, and so also the world's *
\r
55 * leading authority on what is the world's most popular real time *
\r
56 * kernel for deeply embedded MCU designs. Obtaining your training *
\r
57 * from Richard ensures your team will gain directly from his in-depth *
\r
58 * product knowledge and years of usage experience. Contact Real Time *
\r
59 * Engineers Ltd to enquire about the FreeRTOS Masterclass, presented *
\r
60 * by Richard Barry: http://www.FreeRTOS.org/contact
\r
62 ***************************************************************************
\r
64 ***************************************************************************
\r
66 * You are receiving this top quality software for free. Please play *
\r
67 * fair and reciprocate by reporting any suspected issues and *
\r
68 * participating in the community forum: *
\r
69 * http://www.FreeRTOS.org/support *
\r
73 ***************************************************************************
\r
75 http://www.FreeRTOS.org - Documentation, books, training, latest versions,
\r
76 license and Real Time Engineers Ltd. contact details.
\r
78 http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,
\r
79 including FreeRTOS+Trace - an indispensable productivity tool, a DOS
\r
80 compatible FAT file system, and our tiny thread aware UDP/IP stack.
\r
82 http://www.FreeRTOS.org/labs - Where new FreeRTOS products go to incubate.
\r
83 Come and try FreeRTOS+TCP, our new open source TCP/IP stack for FreeRTOS.
\r
85 http://www.OpenRTOS.com - Real Time Engineers ltd license FreeRTOS to High
\r
86 Integrity Systems ltd. to sell under the OpenRTOS brand. Low cost OpenRTOS
\r
87 licenses offer ticketed support, indemnification and commercial middleware.
\r
89 http://www.SafeRTOS.com - High Integrity Systems also provide a safety
\r
90 engineered and independently SIL3 certified version for use in safety and
\r
91 mission critical applications that require provable dependability.
\r
97 - DESCRIPTOR DEFINITIONS -
\r
100 /* String descriptors used during the enumeration process.
\r
101 These take the form:
\r
104 Length of descriptor,
\r
110 const char pxLanguageStringDescriptor[] =
\r
113 usbDESCRIPTOR_TYPE_STRING,
\r
117 const char pxManufacturerStringDescriptor[] =
\r
120 usbDESCRIPTOR_TYPE_STRING,
\r
122 'F', 0x00, 'r', 0x00, 'e', 0x00, 'e', 0x00, 'R', 0x00, 'T', 0x00, 'O', 0x00, 'S', 0x00
\r
125 const char pxProductStringDescriptor[] =
\r
128 usbDESCRIPTOR_TYPE_STRING,
\r
130 'F', 0x00, 'r', 0x00, 'e', 0x00, 'e', 0x00, 'R', 0x00, 'T', 0x00, 'O', 0x00, 'S', 0x00, ' ', 0x00, 'C', 0x00, 'D', 0x00,
\r
131 'C', 0x00, ' ', 0x00, 'D', 0x00, 'E', 0x00, 'M', 0x00, 'O', 0x00
\r
134 const char pxConfigurationStringDescriptor[] =
\r
137 usbDESCRIPTOR_TYPE_STRING,
\r
139 'C', 0x00, 'o', 0x00, 'n', 0x00, 'f', 0x00, 'i', 0x00, 'g', 0x00, 'u', 0x00, 'r', 0x00, 'a', 0x00, 't', 0x00, 'i', 0x00,
\r
140 'o', 0x00, 'n', 0x00, ' ', 0x00, 'N', 0x00, 'a', 0x00, 'm', 0x00, 'e', 0x00
\r
143 const char pxInterfaceStringDescriptor[] =
\r
146 usbDESCRIPTOR_TYPE_STRING,
\r
148 'I', 0x00, 'n', 0x00, 't', 0x00, 'e', 0x00, 'r', 0x00, 'f', 0x00, 'a', 0x00, 'c', 0x00, 'e', 0x00, ' ', 0x00, 'N', 0x00,
\r
149 'a', 0x00, 'm', 0x00, 'e', 0x00
\r
152 /* Device should properly be 0x134A:0x9001, using 0x05F9:0xFFFF for Linux testing */
\r
153 const char pxDeviceDescriptor[] =
\r
155 /* Device descriptor */
\r
156 0x12, /* bLength */
\r
157 0x01, /* bDescriptorType */
\r
158 0x10, 0x01, /* bcdUSBL */
\r
159 0x02, /* bDeviceClass: */
\r
160 0x00, /* bDeviceSubclass: */
\r
161 0x00, /* bDeviceProtocol: */
\r
162 0x08, /* bMaxPacketSize0 */
\r
163 0x03, 0xEB, /* idVendorL */
\r
164 0x20, 0x09, /* idProductL */
\r
165 0x10, 0x01, /* bcdDeviceL */
\r
166 usbMANUFACTURER_STRING, /* iManufacturer */
\r
167 usbPRODUCT_STRING, /* iProduct */
\r
168 0x00, /* SerialNumber */
\r
169 0x01 /* bNumConfigs */
\r
172 const char pxConfigDescriptor[] = {
\r
174 /* Configuration 1 descriptor
\r
175 Here we define two interfaces (0 and 1) and a total of 3 endpoints.
\r
176 Interface 0 is a CDC Abstract Control Model interface with one interrupt-in endpoint.
\r
177 Interface 1 is a CDC Data Interface class, with a bulk-in and bulk-out endpoint.
\r
178 Endpoint 0 gets used as the CDC management element.
\r
180 0x09, /* CbLength */
\r
181 0x02, /* CbDescriptorType */
\r
182 0x43, 0x00, /* CwTotalLength 2 EP + Control ? */
\r
183 0x02, /* CbNumInterfaces */
\r
184 0x01, /* CbConfigurationValue */
\r
185 usbCONFIGURATION_STRING,/* CiConfiguration */
\r
186 usbBUS_POWERED, /* CbmAttributes Bus powered + Remote Wakeup*/
\r
187 0x32, /* CMaxPower: 100mA */
\r
189 /* Communication Class Interface Descriptor Requirement */
\r
190 0x09, /* bLength */
\r
191 0x04, /* bDescriptorType */
\r
192 0x00, /* bInterfaceNumber */
\r
193 0x00, /* bAlternateSetting */
\r
194 0x01, /* bNumEndpoints */
\r
195 0x02, /* bInterfaceClass: Comm Interface Class */
\r
196 0x02, /* bInterfaceSubclass: Abstract Control Model*/
\r
197 0x00, /* bInterfaceProtocol */
\r
198 usbINTERFACE_STRING,/* iInterface */
\r
200 /* Header Functional Descriptor */
\r
201 0x05, /* bLength */
\r
202 0x24, /* bDescriptor type: CS_INTERFACE */
\r
203 0x00, /* bDescriptor subtype: Header Func Desc*/
\r
204 0x10, 0x01, /* bcdCDC:1.1 */
\r
206 /* ACM Functional Descriptor */
\r
207 0x04, /* bFunctionLength */
\r
208 0x24, /* bDescriptor type: CS_INTERFACE */
\r
209 0x02, /* bDescriptor subtype: ACM Func Desc */
\r
210 0x00, /* bmCapabilities: We don't support squat*/
\r
212 /* Union Functional Descriptor */
\r
213 0x05, /* bFunctionLength */
\r
214 0x24, /* bDescriptor type: CS_INTERFACE */
\r
215 0x06, /* bDescriptor subtype: Union Func Desc */
\r
216 0x00, /* bMasterInterface: CDC Interface */
\r
217 0x01, /* bSlaveInterface0: Data Class Interface*/
\r
219 /* Call Management Functional Descriptor
\r
220 0 in D1 and D0 indicates that device does not handle call management*/
\r
221 0x05, /* bFunctionLength */
\r
222 0x24, /* bDescriptor type: CS_INTERFACE */
\r
223 0x01, /* bDescriptor subtype: Call Management Func*/
\r
224 0x01, /* bmCapabilities: D1 + D0 */
\r
225 0x01, /* bDataInterface: Data Class Interface 1*/
\r
227 /* CDC Control - Endpoint 3 descriptor
\r
228 This endpoint serves as a notification element. */
\r
230 0x07, /* bLength */
\r
231 0x05, /* bDescriptorType */
\r
232 0x83, /* bEndpointAddress, Endpoint 03 - IN */
\r
233 0x03, /* bmAttributes INT */
\r
234 0x08, 0x00, /* wMaxPacketSize: 8 bytes */
\r
235 0xFF, /* bInterval */
\r
237 /* Data Class Interface Descriptor Requirement */
\r
238 0x09, /* bLength */
\r
239 0x04, /* bDescriptorType */
\r
240 0x01, /* bInterfaceNumber */
\r
241 0x00, /* bAlternateSetting */
\r
242 0x02, /* bNumEndPoints */
\r
243 0x0A, /* bInterfaceClass */
\r
244 0x00, /* bInterfaceSubclass */
\r
245 0x00, /* bInterfaceProtocol */
\r
246 0x00, /* iInterface */
\r
248 /* CDC Data - Endpoint 1 descriptor */
\r
249 0x07, /* bLenght */
\r
250 0x05, /* bDescriptorType */
\r
251 0x01, /* bEndPointAddress, Endpoint 01 - OUT */
\r
252 0x02, /* bmAttributes BULK */
\r
253 64, /* wMaxPacketSize */
\r
255 0x00, /* bInterval */
\r
257 /* CDC Data - Endpoint 2 descriptor */
\r
258 0x07, /* bLength */
\r
259 0x05, /* bDescriptorType */
\r
260 0x82, /* bEndPointAddress, Endpoint 02 - IN */
\r
261 0x02, /* bmAttributes BULK */
\r
262 64, /* wMaxPacketSize */
\r
264 0x00 /* bInterval */
\r