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