[4.4.2] Remove 15 m/s limit on estimated vario (#12788)
[betaflight.git] / src / main / vcp / usb_desc.c
blobc866eb757e6fb915dcfd7fe6757bd2d1de4bc564
1 /**
2 ******************************************************************************
3 * @file usb_desc.c
4 * @author MCD Application Team
5 * @version V4.0.0
6 * @date 21-January-2013
7 * @brief Descriptors for Virtual Com Port Demo
8 ******************************************************************************
9 * @attention
11 * <h2><center>&copy; COPYRIGHT 2013 STMicroelectronics</center></h2>
13 * Licensed under MCD-ST Liberty SW License Agreement V2, (the "License");
14 * You may not use this file except in compliance with the License.
15 * You may obtain a copy of the License at:
17 * http://www.st.com/software_license_agreement_liberty_v2
19 * Unless required by applicable law or agreed to in writing, software
20 * distributed under the License is distributed on an "AS IS" BASIS,
21 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
22 * See the License for the specific language governing permissions and
23 * limitations under the License.
25 ******************************************************************************
28 /* Includes ------------------------------------------------------------------*/
30 #include "platform.h"
32 #include "usb_lib.h"
33 #include "usb_desc.h"
35 /* USB Standard Device Descriptor */
36 const uint8_t Virtual_Com_Port_DeviceDescriptor[] = {
37 0x12, /* bLength */
38 USB_DEVICE_DESCRIPTOR_TYPE, /* bDescriptorType */
39 0x00, 0x02, /* bcdUSB = 2.00 */
40 0x02, /* bDeviceClass: CDC */
41 0x00, /* bDeviceSubClass */
42 0x00, /* bDeviceProtocol */
43 0x40, /* bMaxPacketSize0 */
44 0x83, 0x04, /* idVendor = 0x0483 */
45 0x40, 0x57, /* idProduct = 0x5740 */
46 0x00, 0x02, /* bcdDevice = 2.00 */
47 1, /* Index of string descriptor describing manufacturer */
48 2, /* Index of string descriptor describing product */
49 3, /* Index of string descriptor describing the device's serial number */
50 0x01 /* bNumConfigurations */
53 const uint8_t Virtual_Com_Port_ConfigDescriptor[] = {
54 /*Configuration Descriptor*/
55 0x09, /* bLength: Configuration Descriptor size */
56 USB_CONFIGURATION_DESCRIPTOR_TYPE, /* bDescriptorType: Configuration */
57 VIRTUAL_COM_PORT_SIZ_CONFIG_DESC, /* wTotalLength:no of returned bytes */
58 0x00, 0x02, /* bNumInterfaces: 2 interface */
59 0x01, /* bConfigurationValue: Configuration value */
60 0x00, /* iConfiguration: Index of string descriptor describing the configuration */
61 0xC0, /* bmAttributes: self powered */
62 0x32, /* MaxPower 0 mA */
63 /*Interface Descriptor*/
64 0x09, /* bLength: Interface Descriptor size */
65 USB_INTERFACE_DESCRIPTOR_TYPE, /* bDescriptorType: Interface */
66 /* Interface descriptor type */
67 0x00, /* bInterfaceNumber: Number of Interface */
68 0x00, /* bAlternateSetting: Alternate setting */
69 0x01, /* bNumEndpoints: One endpoints used */
70 0x02, /* bInterfaceClass: Communication Interface Class */
71 0x02, /* bInterfaceSubClass: Abstract Control Model */
72 0x01, /* bInterfaceProtocol: Common AT commands */
73 0x00, /* iInterface: */
74 /*Header Functional Descriptor*/
75 0x05, /* bLength: Endpoint Descriptor size */
76 0x24, /* bDescriptorType: CS_INTERFACE */
77 0x00, /* bDescriptorSubtype: Header Func Desc */
78 0x10, /* bcdCDC: spec release number */
79 0x01,
80 /*Call Management Functional Descriptor*/
81 0x05, /* bFunctionLength */
82 0x24, /* bDescriptorType: CS_INTERFACE */
83 0x01, /* bDescriptorSubtype: Call Management Func Desc */
84 0x00, /* bmCapabilities: D0+D1 */
85 0x01, /* bDataInterface: 1 */
86 /*ACM Functional Descriptor*/
87 0x04, /* bFunctionLength */
88 0x24, /* bDescriptorType: CS_INTERFACE */
89 0x02, /* bDescriptorSubtype: Abstract Control Management desc */
90 0x02, /* bmCapabilities */
91 /*Union Functional Descriptor*/
92 0x05, /* bFunctionLength */
93 0x24, /* bDescriptorType: CS_INTERFACE */
94 0x06, /* bDescriptorSubtype: Union func desc */
95 0x00, /* bMasterInterface: Communication class interface */
96 0x01, /* bSlaveInterface0: Data Class Interface */
97 /*Endpoint 2 Descriptor*/
98 0x07, /* bLength: Endpoint Descriptor size */
99 USB_ENDPOINT_DESCRIPTOR_TYPE, /* bDescriptorType: Endpoint */
100 0x82, /* bEndpointAddress: (IN2) */
101 0x03, /* bmAttributes: Interrupt */
102 VIRTUAL_COM_PORT_INT_SIZE, /* wMaxPacketSize: */
103 0x00, 0xFF, /* bInterval: */
104 /*Data class interface descriptor*/
105 0x09, /* bLength: Endpoint Descriptor size */
106 USB_INTERFACE_DESCRIPTOR_TYPE, /* bDescriptorType: */
107 0x01, /* bInterfaceNumber: Number of Interface */
108 0x00, /* bAlternateSetting: Alternate setting */
109 0x02, /* bNumEndpoints: Two endpoints used */
110 0x0A, /* bInterfaceClass: CDC */
111 0x00, /* bInterfaceSubClass: */
112 0x00, /* bInterfaceProtocol: */
113 0x00, /* iInterface: */
114 /*Endpoint 3 Descriptor*/
115 0x07, /* bLength: Endpoint Descriptor size */
116 USB_ENDPOINT_DESCRIPTOR_TYPE, /* bDescriptorType: Endpoint */
117 0x03, /* bEndpointAddress: (OUT3) */
118 0x02, /* bmAttributes: Bulk */
119 VIRTUAL_COM_PORT_DATA_SIZE, /* wMaxPacketSize: */
120 0x00, 0x00, /* bInterval: ignore for Bulk transfer */
121 /*Endpoint 1 Descriptor*/
122 0x07, /* bLength: Endpoint Descriptor size */
123 USB_ENDPOINT_DESCRIPTOR_TYPE, /* bDescriptorType: Endpoint */
124 0x81, /* bEndpointAddress: (IN1) */
125 0x02, /* bmAttributes: Bulk */
126 VIRTUAL_COM_PORT_DATA_SIZE, /* wMaxPacketSize: */
127 0x00, 0x00 /* bInterval */
130 /* USB String Descriptors */
131 const uint8_t Virtual_Com_Port_StringLangID[VIRTUAL_COM_PORT_SIZ_STRING_LANGID] = {
132 VIRTUAL_COM_PORT_SIZ_STRING_LANGID,
133 USB_STRING_DESCRIPTOR_TYPE, 0x09, 0x04 /* LangID = 0x0409: U.S. English */
136 const uint8_t Virtual_Com_Port_StringVendor[VIRTUAL_COM_PORT_SIZ_STRING_VENDOR] = {
137 VIRTUAL_COM_PORT_SIZ_STRING_VENDOR, /* Size of Vendor string */
138 USB_STRING_DESCRIPTOR_TYPE, /* bDescriptorType*/
139 /* Manufacturer: "STMicroelectronics" */
140 'S', 0, 'T', 0, 'M', 0, 'i', 0, 'c', 0, 'r', 0, 'o', 0, 'e', 0, 'l', 0, 'e', 0, 'c', 0, 't', 0, 'r', 0, 'o', 0, 'n', 0, 'i', 0, 'c', 0, 's', 0 };
142 const uint8_t Virtual_Com_Port_StringProduct[VIRTUAL_COM_PORT_SIZ_STRING_PRODUCT] = {
143 VIRTUAL_COM_PORT_SIZ_STRING_PRODUCT, /* bLength */
144 USB_STRING_DESCRIPTOR_TYPE, /* bDescriptorType */
145 /* Product name: "STM32 Virtual COM Port" */
146 'S', 0, 'T', 0, 'M', 0, '3', 0, '2', 0, ' ', 0, 'V', 0, 'i', 0, 'r', 0, 't', 0, 'u', 0, 'a', 0, 'l', 0, ' ', 0, 'C', 0, 'O', 0, 'M', 0, ' ', 0, 'P', 0, 'o', 0, 'r', 0, 't', 0, ' ', 0, ' ', 0 };
148 uint8_t Virtual_Com_Port_StringSerial[VIRTUAL_COM_PORT_SIZ_STRING_SERIAL] = {
149 VIRTUAL_COM_PORT_SIZ_STRING_SERIAL, /* bLength */
150 USB_STRING_DESCRIPTOR_TYPE, /* bDescriptorType */
151 'S', 0, 'T', 0, 'M', 0, '3', 0, '2', 0 };
153 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/