CDCDescriptors.h
Go to the documentation of this file.
1 /* ---------------------------------------------------------------------------- */
2 /* Atmel Microcontroller Software Support */
3 /* SAM Software Package License */
4 /* ---------------------------------------------------------------------------- */
5 /* Copyright (c) 2015, Atmel Corporation */
6 /* */
7 /* All rights reserved. */
8 /* */
9 /* Redistribution and use in source and binary forms, with or without */
10 /* modification, are permitted provided that the following condition is met: */
11 /* */
12 /* - Redistributions of source code must retain the above copyright notice, */
13 /* this list of conditions and the disclaimer below. */
14 /* */
15 /* Atmel's name may not be used to endorse or promote products derived from */
16 /* this software without specific prior written permission. */
17 /* */
18 /* DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR */
19 /* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */
20 /* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE */
21 /* DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT, */
22 /* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT */
23 /* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, */
24 /* OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */
25 /* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING */
26 /* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, */
27 /* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
28 /* ---------------------------------------------------------------------------- */
29 
35 #ifndef _CDCDESCRIPTORS_H_
36 #define _CDCDESCRIPTORS_H_
37 
41 /*----------------------------------------------------------------------------
42  * Includes
43  *----------------------------------------------------------------------------*/
44 
45 #include <stdint.h>
46 
47 /*----------------------------------------------------------------------------
48  * Definitions
49  *----------------------------------------------------------------------------*/
50 
58 #define CDCGenericDescriptor_CDC1_10 0x0110
59 
68 #define CDCGenericDescriptor_INTERFACE 0x24
69 
70 #define CDCGenericDescriptor_ENDPOINT 0x25
71 
83 #define CDCGenericDescriptor_HEADER 0x00
84 
85 #define CDCGenericDescriptor_CALLMANAGEMENT 0x01
86 
87 #define CDCGenericDescriptor_ABSTRACTCONTROLMANAGEMENT 0x02
88 
89 #define CDCGenericDescriptor_UNION 0x06
90 
100 #define CDCDeviceDescriptor_CLASS 0x02
101 
102 #define CDCDeviceDescriptor_SUBCLASS 0x00
103 
104 #define CDCDeviceDescriptor_PROTOCOL 0x00
105 
117 #define CDCCommunicationInterfaceDescriptor_CLASS 0x02
118 
120 #define CDCCommunicationInterfaceDescriptor_ABSTRACTCONTROLMODEL 0x02
121 
123 #define CDCCommunicationInterfaceDescriptor_ETHERNETEMULATIONMODEL 0x0C
124 
126 #define CDCCommunicationInterfaceDescriptor_NOPROTOCOL 0x00
127 
129 #define CDCCommunicationInterfaceDescriptor_EEMPROTOCOL 0x07
130 
141 #define CDCDataInterfaceDescriptor_CLASS 0x0A
142 
143 #define CDCDataInterfaceDescriptor_SUBCLASS 0x00
144 
146 #define CDCDataInterfaceDescriptor_NOPROTOCOL 0x00
147 
156 #define CDCCallManagementDescriptor_SELFCALLMANAGEMENT (1 << 0)
157 
159 #define CDCCallManagementDescriptor_DATACALLMANAGEMENT (1 << 1)
160 
174 #define CDCAbstractControlManagementDescriptor_COMMFEATURE (1 << 0)
175 
177 #define CDCAbstractControlManagementDescriptor_LINE (1 << 1)
178 
179 #define CDCAbstractControlManagementDescriptor_SENDBREAK (1 << 2)
180 
181 #define CDCAbstractControlManagementDescriptor_NETWORKCONNECTION (1 << 3)
182 
185 
187 #define CDC_SUBCLASS_DLCM 0x01
188 #define CDC_SUBCLASS_ACM 0x02
189 #define CDC_SUBCLASS_TCM 0x03
190 #define CDC_SUBCLASS_MCCM 0x04
191 #define CDC_SUBCLASS_CCM 0x05
192 #define CDC_SUBCLASS_ETH 0x06
193 #define CDC_SUBCLASS_ATM 0x07
194 
195 
196 
198 #define CDC_PROTOCOL_V25TER 0x01
199 
200 
201 
203 #define CDC_PROTOCOL_I430 0x30
204 #define CDC_PROTOCOL_HDLC 0x31
205 #define CDC_PROTOCOL_TRANS 0x32
206 #define CDC_PROTOCOL_Q921M 0x50
207 #define CDC_PROTOCOL_Q921 0x51
208 #define CDC_PROTOCOL_Q921TM 0x52
209 #define CDC_PROTOCOL_V42BIS 0x90
210 #define CDC_PROTOCOL_Q931 0x91
211 #define CDC_PROTOCOL_V120 0x92
212 #define CDC_PROTOCOL_CAPI20 0x93
213 #define CDC_PROTOCOL_HOST 0xFD
214 
218 #define CDC_PROTOCOL_PUFD 0xFE
219 
220 /*----------------------------------------------------------------------------
221  * Types
222  *----------------------------------------------------------------------------*/
223 #pragma pack(1)
224 #if defined ( __CC_ARM ) /* Keil ¦̀Vision 4 */
225 #elif defined ( __ICCARM__ ) /* IAR Ewarm */
226 #define __attribute__(...)
227 #define __packed__ packed
228 #elif defined ( __GNUC__ ) /* GCC CS3 */
229 #define __packed__ aligned(1)
230 #endif
231 
236 typedef struct _CDCHeaderDescriptor {
237 
245  uint16_t bcdCDC;
246 
247 } __attribute__ ((__packed__)) CDCHeaderDescriptor; /* GCC */
248 
254 typedef struct _CDCUnionDescriptor {
255 
266 
267 } __attribute__ ((__packed__)) CDCUnionDescriptor; /* GCC */
268 
275 
284  uint8_t bmCapabilities;
287  uint8_t bDataInterface;
288 
289 } __attribute__ ((__packed__)) CDCCallManagementDescriptor; /* GCC */
290 
297 
306  uint8_t bmCapabilities;
307 
308 } __attribute__ ((__packed__)) CDCAbstractControlManagementDescriptor; /* GCC */
309 
310 #pragma pack()
311 
312 /*----------------------------------------------------------------------------
313  * Functions
314  *----------------------------------------------------------------------------*/
315 
316 
318 #endif /* #ifndef _CDCDESCRIPTORS_H_ */
319 
struct _CDCHeaderDescriptor __attribute__((__packed__)) CDCHeaderDescriptor


inertial_sense_ros
Author(s):
autogenerated on Sat Sep 19 2020 03:19:04