2 FreeRTOS V7.3.0 - Copyright (C) 2012 Real Time Engineers Ltd.
\r
4 FEATURES AND PORTS ARE ADDED TO FREERTOS ALL THE TIME. PLEASE VISIT
\r
5 http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.
\r
7 ***************************************************************************
\r
9 * FreeRTOS tutorial books are available in pdf and paperback. *
\r
10 * Complete, revised, and edited pdf reference manuals are also *
\r
13 * Purchasing FreeRTOS documentation will not only help you, by *
\r
14 * ensuring you get running as quickly as possible and with an *
\r
15 * in-depth knowledge of how to use FreeRTOS, it will also help *
\r
16 * the FreeRTOS project to continue with its mission of providing *
\r
17 * professional grade, cross platform, de facto standard solutions *
\r
18 * for microcontrollers - completely free of charge! *
\r
20 * >>> See http://www.FreeRTOS.org/Documentation for details. <<< *
\r
22 * Thank you for using FreeRTOS, and thank you for your support! *
\r
24 ***************************************************************************
\r
27 This file is part of the FreeRTOS distribution.
\r
29 FreeRTOS is free software; you can redistribute it and/or modify it under
\r
30 the terms of the GNU General Public License (version 2) as published by the
\r
31 Free Software Foundation AND MODIFIED BY the FreeRTOS exception.
\r
32 >>>NOTE<<< The modification to the GPL is included to allow you to
\r
33 distribute a combined work that includes FreeRTOS without being obliged to
\r
34 provide the source code for proprietary components outside of the FreeRTOS
\r
35 kernel. FreeRTOS is distributed in the hope that it will be useful, but
\r
36 WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
\r
37 or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
\r
38 more details. You should have received a copy of the GNU General Public
\r
39 License and the FreeRTOS license exception along with FreeRTOS; if not it
\r
40 can be viewed here: http://www.freertos.org/a00114.html and also obtained
\r
41 by writing to Richard Barry, contact details for whom are available on the
\r
46 ***************************************************************************
\r
48 * Having a problem? Start by reading the FAQ "My application does *
\r
49 * not run, what could be wrong?" *
\r
51 * http://www.FreeRTOS.org/FAQHelp.html *
\r
53 ***************************************************************************
\r
56 http://www.FreeRTOS.org - Documentation, training, latest versions, license
\r
57 and contact details.
\r
59 http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,
\r
60 including FreeRTOS+Trace - an indispensable productivity tool.
\r
62 Real Time Engineers ltd license FreeRTOS to High Integrity Systems, who sell
\r
63 the code with commercial support, indemnification, and middleware, under
\r
64 the OpenRTOS brand: http://www.OpenRTOS.com. High Integrity Systems also
\r
65 provide a safety engineered and independently SIL3 certified version under
\r
66 the SafeRTOS brand: http://www.SafeRTOS.com.
\r
70 - DESCRIPTOR DEFINITIONS -
\r
73 /* String descriptors used during the enumeration process.
\r
74 These take the form:
\r
77 Length of descriptor,
\r
83 const char pxLanguageStringDescriptor[] =
\r
86 usbDESCRIPTOR_TYPE_STRING,
\r
90 const char pxManufacturerStringDescriptor[] =
\r
93 usbDESCRIPTOR_TYPE_STRING,
\r
95 'F', 0x00, 'r', 0x00, 'e', 0x00, 'e', 0x00, 'R', 0x00, 'T', 0x00, 'O', 0x00, 'S', 0x00
\r
98 const char pxProductStringDescriptor[] =
\r
101 usbDESCRIPTOR_TYPE_STRING,
\r
103 'F', 0x00, 'r', 0x00, 'e', 0x00, 'e', 0x00, 'R', 0x00, 'T', 0x00, 'O', 0x00, 'S', 0x00, ' ', 0x00, 'C', 0x00, 'D', 0x00,
\r
104 'C', 0x00, ' ', 0x00, 'D', 0x00, 'E', 0x00, 'M', 0x00, 'O', 0x00
\r
107 const char pxConfigurationStringDescriptor[] =
\r
110 usbDESCRIPTOR_TYPE_STRING,
\r
112 'C', 0x00, 'o', 0x00, 'n', 0x00, 'f', 0x00, 'i', 0x00, 'g', 0x00, 'u', 0x00, 'r', 0x00, 'a', 0x00, 't', 0x00, 'i', 0x00,
\r
113 'o', 0x00, 'n', 0x00, ' ', 0x00, 'N', 0x00, 'a', 0x00, 'm', 0x00, 'e', 0x00
\r
116 const char pxInterfaceStringDescriptor[] =
\r
119 usbDESCRIPTOR_TYPE_STRING,
\r
121 'I', 0x00, 'n', 0x00, 't', 0x00, 'e', 0x00, 'r', 0x00, 'f', 0x00, 'a', 0x00, 'c', 0x00, 'e', 0x00, ' ', 0x00, 'N', 0x00,
\r
122 'a', 0x00, 'm', 0x00, 'e', 0x00
\r
125 /* Device should properly be 0x134A:0x9001, using 0x05F9:0xFFFF for Linux testing */
\r
126 const char pxDeviceDescriptor[] =
\r
128 /* Device descriptor */
\r
129 0x12, /* bLength */
\r
130 0x01, /* bDescriptorType */
\r
131 0x10, 0x01, /* bcdUSBL */
\r
132 0x02, /* bDeviceClass: */
\r
133 0x00, /* bDeviceSubclass: */
\r
134 0x00, /* bDeviceProtocol: */
\r
135 0x08, /* bMaxPacketSize0 */
\r
136 0x03, 0xEB, /* idVendorL */
\r
137 0x20, 0x09, /* idProductL */
\r
138 0x10, 0x01, /* bcdDeviceL */
\r
139 usbMANUFACTURER_STRING, /* iManufacturer */
\r
140 usbPRODUCT_STRING, /* iProduct */
\r
141 0x00, /* SerialNumber */
\r
142 0x01 /* bNumConfigs */
\r
145 const char pxConfigDescriptor[] = {
\r
147 /* Configuration 1 descriptor
\r
148 Here we define two interfaces (0 and 1) and a total of 3 endpoints.
\r
149 Interface 0 is a CDC Abstract Control Model interface with one interrupt-in endpoint.
\r
150 Interface 1 is a CDC Data Interface class, with a bulk-in and bulk-out endpoint.
\r
151 Endpoint 0 gets used as the CDC management element.
\r
153 0x09, /* CbLength */
\r
154 0x02, /* CbDescriptorType */
\r
155 0x43, 0x00, /* CwTotalLength 2 EP + Control ? */
\r
156 0x02, /* CbNumInterfaces */
\r
157 0x01, /* CbConfigurationValue */
\r
158 usbCONFIGURATION_STRING,/* CiConfiguration */
\r
159 usbBUS_POWERED, /* CbmAttributes Bus powered + Remote Wakeup*/
\r
160 0x32, /* CMaxPower: 100mA */
\r
162 /* Communication Class Interface Descriptor Requirement */
\r
163 0x09, /* bLength */
\r
164 0x04, /* bDescriptorType */
\r
165 0x00, /* bInterfaceNumber */
\r
166 0x00, /* bAlternateSetting */
\r
167 0x01, /* bNumEndpoints */
\r
168 0x02, /* bInterfaceClass: Comm Interface Class */
\r
169 0x02, /* bInterfaceSubclass: Abstract Control Model*/
\r
170 0x00, /* bInterfaceProtocol */
\r
171 usbINTERFACE_STRING,/* iInterface */
\r
173 /* Header Functional Descriptor */
\r
174 0x05, /* bLength */
\r
175 0x24, /* bDescriptor type: CS_INTERFACE */
\r
176 0x00, /* bDescriptor subtype: Header Func Desc*/
\r
177 0x10, 0x01, /* bcdCDC:1.1 */
\r
179 /* ACM Functional Descriptor */
\r
180 0x04, /* bFunctionLength */
\r
181 0x24, /* bDescriptor type: CS_INTERFACE */
\r
182 0x02, /* bDescriptor subtype: ACM Func Desc */
\r
183 0x00, /* bmCapabilities: We don't support squat*/
\r
185 /* Union Functional Descriptor */
\r
186 0x05, /* bFunctionLength */
\r
187 0x24, /* bDescriptor type: CS_INTERFACE */
\r
188 0x06, /* bDescriptor subtype: Union Func Desc */
\r
189 0x00, /* bMasterInterface: CDC Interface */
\r
190 0x01, /* bSlaveInterface0: Data Class Interface*/
\r
192 /* Call Management Functional Descriptor
\r
193 0 in D1 and D0 indicates that device does not handle call management*/
\r
194 0x05, /* bFunctionLength */
\r
195 0x24, /* bDescriptor type: CS_INTERFACE */
\r
196 0x01, /* bDescriptor subtype: Call Management Func*/
\r
197 0x01, /* bmCapabilities: D1 + D0 */
\r
198 0x01, /* bDataInterface: Data Class Interface 1*/
\r
200 /* CDC Control - Endpoint 3 descriptor
\r
201 This endpoint serves as a notification element. */
\r
203 0x07, /* bLength */
\r
204 0x05, /* bDescriptorType */
\r
205 0x83, /* bEndpointAddress, Endpoint 03 - IN */
\r
206 0x03, /* bmAttributes INT */
\r
207 0x08, 0x00, /* wMaxPacketSize: 8 bytes */
\r
208 0xFF, /* bInterval */
\r
210 /* Data Class Interface Descriptor Requirement */
\r
211 0x09, /* bLength */
\r
212 0x04, /* bDescriptorType */
\r
213 0x01, /* bInterfaceNumber */
\r
214 0x00, /* bAlternateSetting */
\r
215 0x02, /* bNumEndPoints */
\r
216 0x0A, /* bInterfaceClass */
\r
217 0x00, /* bInterfaceSubclass */
\r
218 0x00, /* bInterfaceProtocol */
\r
219 0x00, /* iInterface */
\r
221 /* CDC Data - Endpoint 1 descriptor */
\r
222 0x07, /* bLenght */
\r
223 0x05, /* bDescriptorType */
\r
224 0x01, /* bEndPointAddress, Endpoint 01 - OUT */
\r
225 0x02, /* bmAttributes BULK */
\r
226 64, /* wMaxPacketSize */
\r
228 0x00, /* bInterval */
\r
230 /* CDC Data - Endpoint 2 descriptor */
\r
231 0x07, /* bLength */
\r
232 0x05, /* bDescriptorType */
\r
233 0x82, /* bEndPointAddress, Endpoint 02 - IN */
\r
234 0x02, /* bmAttributes BULK */
\r
235 64, /* wMaxPacketSize */
\r
237 0x00 /* bInterval */
\r