2 FreeRTOS V9.0.0rc1 - Copyright (C) 2016 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 ***************************************************************************
\r
14 >>! NOTE: The modification to the GPL is included to allow you to !<<
\r
15 >>! distribute a combined work that includes FreeRTOS without being !<<
\r
16 >>! obliged to provide the source code for proprietary components !<<
\r
17 >>! outside of the FreeRTOS kernel. !<<
\r
18 ***************************************************************************
\r
20 FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY
\r
21 WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
\r
22 FOR A PARTICULAR PURPOSE. Full license text is available on the following
\r
23 link: http://www.freertos.org/a00114.html
\r
25 ***************************************************************************
\r
27 * FreeRTOS provides completely free yet professionally developed, *
\r
28 * robust, strictly quality controlled, supported, and cross *
\r
29 * platform software that is more than just the market leader, it *
\r
30 * is the industry's de facto standard. *
\r
32 * Help yourself get started quickly while simultaneously helping *
\r
33 * to support the FreeRTOS project by purchasing a FreeRTOS *
\r
34 * tutorial book, reference manual, or both: *
\r
35 * http://www.FreeRTOS.org/Documentation *
\r
37 ***************************************************************************
\r
39 http://www.FreeRTOS.org/FAQHelp.html - Having a problem? Start by reading
\r
40 the FAQ page "My application does not run, what could be wrong?". Have you
\r
41 defined configASSERT()?
\r
43 http://www.FreeRTOS.org/support - In return for receiving this top quality
\r
44 embedded software for free we request you assist our global community by
\r
45 participating in the support forum.
\r
47 http://www.FreeRTOS.org/training - Investing in training allows your team to
\r
48 be as productive as possible as early as possible. Now you can receive
\r
49 FreeRTOS training directly from Richard Barry, CEO of Real Time Engineers
\r
50 Ltd, and the world's leading authority on the world's leading RTOS.
\r
52 http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,
\r
53 including FreeRTOS+Trace - an indispensable productivity tool, a DOS
\r
54 compatible FAT file system, and our tiny thread aware UDP/IP stack.
\r
56 http://www.FreeRTOS.org/labs - Where new FreeRTOS products go to incubate.
\r
57 Come and try FreeRTOS+TCP, our new open source TCP/IP stack for FreeRTOS.
\r
59 http://www.OpenRTOS.com - Real Time Engineers ltd. license FreeRTOS to High
\r
60 Integrity Systems ltd. to sell under the OpenRTOS brand. Low cost OpenRTOS
\r
61 licenses offer ticketed support, indemnification and commercial middleware.
\r
63 http://www.SafeRTOS.com - High Integrity Systems also provide a safety
\r
64 engineered and independently SIL3 certified version for use in safety and
\r
65 mission critical applications that require provable dependability.
\r
71 - DESCRIPTOR DEFINITIONS -
\r
74 /* String descriptors used during the enumeration process.
\r
75 These take the form:
\r
78 Length of descriptor,
\r
84 const char pxLanguageStringDescriptor[] =
\r
87 usbDESCRIPTOR_TYPE_STRING,
\r
91 const char pxManufacturerStringDescriptor[] =
\r
94 usbDESCRIPTOR_TYPE_STRING,
\r
96 'F', 0x00, 'r', 0x00, 'e', 0x00, 'e', 0x00, 'R', 0x00, 'T', 0x00, 'O', 0x00, 'S', 0x00
\r
99 const char pxProductStringDescriptor[] =
\r
102 usbDESCRIPTOR_TYPE_STRING,
\r
104 'F', 0x00, 'r', 0x00, 'e', 0x00, 'e', 0x00, 'R', 0x00, 'T', 0x00, 'O', 0x00, 'S', 0x00, ' ', 0x00, 'C', 0x00, 'D', 0x00,
\r
105 'C', 0x00, ' ', 0x00, 'D', 0x00, 'E', 0x00, 'M', 0x00, 'O', 0x00
\r
108 const char pxConfigurationStringDescriptor[] =
\r
111 usbDESCRIPTOR_TYPE_STRING,
\r
113 'C', 0x00, 'o', 0x00, 'n', 0x00, 'f', 0x00, 'i', 0x00, 'g', 0x00, 'u', 0x00, 'r', 0x00, 'a', 0x00, 't', 0x00, 'i', 0x00,
\r
114 'o', 0x00, 'n', 0x00, ' ', 0x00, 'N', 0x00, 'a', 0x00, 'm', 0x00, 'e', 0x00
\r
117 const char pxInterfaceStringDescriptor[] =
\r
120 usbDESCRIPTOR_TYPE_STRING,
\r
122 'I', 0x00, 'n', 0x00, 't', 0x00, 'e', 0x00, 'r', 0x00, 'f', 0x00, 'a', 0x00, 'c', 0x00, 'e', 0x00, ' ', 0x00, 'N', 0x00,
\r
123 'a', 0x00, 'm', 0x00, 'e', 0x00
\r
126 /* Device should properly be 0x134A:0x9001, using 0x05F9:0xFFFF for Linux testing */
\r
127 const char pxDeviceDescriptor[] =
\r
129 /* Device descriptor */
\r
130 0x12, /* bLength */
\r
131 0x01, /* bDescriptorType */
\r
132 0x10, 0x01, /* bcdUSBL */
\r
133 0x02, /* bDeviceClass: */
\r
134 0x00, /* bDeviceSubclass: */
\r
135 0x00, /* bDeviceProtocol: */
\r
136 0x08, /* bMaxPacketSize0 */
\r
137 0x03, 0xEB, /* idVendorL */
\r
138 0x20, 0x09, /* idProductL */
\r
139 0x10, 0x01, /* bcdDeviceL */
\r
140 usbMANUFACTURER_STRING, /* iManufacturer */
\r
141 usbPRODUCT_STRING, /* iProduct */
\r
142 0x00, /* SerialNumber */
\r
143 0x01 /* bNumConfigs */
\r
146 const char pxConfigDescriptor[] = {
\r
148 /* Configuration 1 descriptor
\r
149 Here we define two interfaces (0 and 1) and a total of 3 endpoints.
\r
150 Interface 0 is a CDC Abstract Control Model interface with one interrupt-in endpoint.
\r
151 Interface 1 is a CDC Data Interface class, with a bulk-in and bulk-out endpoint.
\r
152 Endpoint 0 gets used as the CDC management element.
\r
154 0x09, /* CbLength */
\r
155 0x02, /* CbDescriptorType */
\r
156 0x43, 0x00, /* CwTotalLength 2 EP + Control ? */
\r
157 0x02, /* CbNumInterfaces */
\r
158 0x01, /* CbConfigurationValue */
\r
159 usbCONFIGURATION_STRING,/* CiConfiguration */
\r
160 usbBUS_POWERED, /* CbmAttributes Bus powered + Remote Wakeup*/
\r
161 0x32, /* CMaxPower: 100mA */
\r
163 /* Communication Class Interface Descriptor Requirement */
\r
164 0x09, /* bLength */
\r
165 0x04, /* bDescriptorType */
\r
166 0x00, /* bInterfaceNumber */
\r
167 0x00, /* bAlternateSetting */
\r
168 0x01, /* bNumEndpoints */
\r
169 0x02, /* bInterfaceClass: Comm Interface Class */
\r
170 0x02, /* bInterfaceSubclass: Abstract Control Model*/
\r
171 0x00, /* bInterfaceProtocol */
\r
172 usbINTERFACE_STRING,/* iInterface */
\r
174 /* Header Functional Descriptor */
\r
175 0x05, /* bLength */
\r
176 0x24, /* bDescriptor type: CS_INTERFACE */
\r
177 0x00, /* bDescriptor subtype: Header Func Desc*/
\r
178 0x10, 0x01, /* bcdCDC:1.1 */
\r
180 /* ACM Functional Descriptor */
\r
181 0x04, /* bFunctionLength */
\r
182 0x24, /* bDescriptor type: CS_INTERFACE */
\r
183 0x02, /* bDescriptor subtype: ACM Func Desc */
\r
184 0x00, /* bmCapabilities: We don't support squat*/
\r
186 /* Union Functional Descriptor */
\r
187 0x05, /* bFunctionLength */
\r
188 0x24, /* bDescriptor type: CS_INTERFACE */
\r
189 0x06, /* bDescriptor subtype: Union Func Desc */
\r
190 0x00, /* bMasterInterface: CDC Interface */
\r
191 0x01, /* bSlaveInterface0: Data Class Interface*/
\r
193 /* Call Management Functional Descriptor
\r
194 0 in D1 and D0 indicates that device does not handle call management*/
\r
195 0x05, /* bFunctionLength */
\r
196 0x24, /* bDescriptor type: CS_INTERFACE */
\r
197 0x01, /* bDescriptor subtype: Call Management Func*/
\r
198 0x01, /* bmCapabilities: D1 + D0 */
\r
199 0x01, /* bDataInterface: Data Class Interface 1*/
\r
201 /* CDC Control - Endpoint 3 descriptor
\r
202 This endpoint serves as a notification element. */
\r
204 0x07, /* bLength */
\r
205 0x05, /* bDescriptorType */
\r
206 0x83, /* bEndpointAddress, Endpoint 03 - IN */
\r
207 0x03, /* bmAttributes INT */
\r
208 0x08, 0x00, /* wMaxPacketSize: 8 bytes */
\r
209 0xFF, /* bInterval */
\r
211 /* Data Class Interface Descriptor Requirement */
\r
212 0x09, /* bLength */
\r
213 0x04, /* bDescriptorType */
\r
214 0x01, /* bInterfaceNumber */
\r
215 0x00, /* bAlternateSetting */
\r
216 0x02, /* bNumEndPoints */
\r
217 0x0A, /* bInterfaceClass */
\r
218 0x00, /* bInterfaceSubclass */
\r
219 0x00, /* bInterfaceProtocol */
\r
220 0x00, /* iInterface */
\r
222 /* CDC Data - Endpoint 1 descriptor */
\r
223 0x07, /* bLenght */
\r
224 0x05, /* bDescriptorType */
\r
225 0x01, /* bEndPointAddress, Endpoint 01 - OUT */
\r
226 0x02, /* bmAttributes BULK */
\r
227 64, /* wMaxPacketSize */
\r
229 0x00, /* bInterval */
\r
231 /* CDC Data - Endpoint 2 descriptor */
\r
232 0x07, /* bLength */
\r
233 0x05, /* bDescriptorType */
\r
234 0x82, /* bEndPointAddress, Endpoint 02 - IN */
\r
235 0x02, /* bmAttributes BULK */
\r
236 64, /* wMaxPacketSize */
\r
238 0x00 /* bInterval */
\r