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