Lightweight USB stack  1.0
usb_cdcw.h
1 /* This file is the part of the Lightweight USB device Stack for STM32 microcontrollers
2  *
3  * Copyright ©2016 Dmitry Filimonchuk <dmitrystu[at]gmail[dot]com>
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  * http://www.apache.org/licenses/LICENSE-2.0
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
28 #ifndef _USB_CDC_WCM_H_
29 #define _USB_CDC_WCM_H_
30 
31 #ifdef __cplusplus
32  extern "C" {
33 #endif
34 
35 
38 #define USB_CDC_SUBCLASS_WHCM 0x08
39 #define USB_CDC_SUBCLASS_DMM 0x09
40 #define USB_CDC_SUBCLASS_MDLM 0x0A
41 #define USB_CDC_SUBCLASS_OBEX 0x0B
42  /* @} */
43 
46 #define USB_CDC_PROTO_PCCA101 0x02
47 #define USB_CDC_PROTO_PCCA101O 0x03
48 #define USB_CDC_PROTO_GSM 0x04
49 #define USB_CDC_PROTO_3G 0x05
50 #define USB_CDC_PROTO_CDMA 0x06
55 #define USB_DTYPE_CDC_WHCM 0x11
56 #define USB_DTYPE_CDC_MDLM 0x12
57 #define USB_DTYPE_CDC_MDLM_DETAIL 0x13
58 #define USB_DTYPE_CDC_DMM 0x14
59 #define USB_DTYPE_CDC_OBEX 0x15
60 #define USB_DTYPE_CDC_CMDSET 0x16
61 #define USB_DTYPE_CDC_CMDSET_DETAIL 0x17
62 #define USB_DTYPE_CDC_TEL_CONRTOL 0x18
63 #define USB_DTYPE_CDC_OBEX_SERVICE 0x19
72 struct usb_cdc_whcm_desc {
73  uint8_t bFunctionLength;
74  uint8_t bDescriptorType;
76  uint16_t bcdVersion;
77 } __attribute__ ((packed));
78 
84  uint8_t bFunctionLength;
85  uint8_t bDescriptorType;
87  uint16_t bcdVersion;
88  uint8_t bGUID[16];
90 } __attribute__ ((packed));
91 
97  uint8_t bFunctionLength;
98  uint8_t bDescriptorType;
102  uint8_t bDetailData[0];
105 } __attribute__ ((packed));
106 
109  uint8_t bFunctionLength;
110  uint8_t bDescriptorType;
112  uint16_t bcdVersion;
113  uint16_t wMaxCommand;
115 } __attribute__ ((packed));
116 
122  uint8_t bFunctionLength;
123  uint8_t bDescriptorType;
125  uint8_t bmOBEXRole;
126  uint8_t bOBEXServiceUUID[16];
130 } __attribute__ ((packed));
131 
134 #ifdef __cplusplus
135  }
136 #endif
137 
138 #endif /* _USB_CDC_WCM_H_ */
uint16_t bcdVersion
BCD version number for this subclass specification.
Definition: usb_cdcw.h:76
uint16_t bcdVersion
Version number for this subclass specification.
Definition: usb_cdcw.h:87
uint8_t bDescriptorSubType
Mobile Direct Line Model Functional Descriptor.
Definition: usb_cdcw.h:86
Mobile Direct Line Model Functional Descriptor.
Definition: usb_cdcw.h:83
uint8_t bDescriptorSubType
OBEX Service Identifier Functional Descriptor.
Definition: usb_cdcw.h:124
uint8_t bDescriptorSubType
Mobile Direct Line Model Details Functional Descriptor.
Definition: usb_cdcw.h:99
Device Management Functional Descriptor.
Definition: usb_cdcw.h:108
uint16_t wOBEXServiceVersion
A 16 bit value indicating the version of the OBEX service associated with this function.
Definition: usb_cdcw.h:128
uint8_t bDescriptorType
CS_INTERFACE descriptor type.
Definition: usb_cdcw.h:110
uint8_t bDescriptorType
CS_INTERFACE descriptor type.
Definition: usb_cdcw.h:123
uint8_t bDescriptorSubType
Wireless Handset Control Model Functional Descriptor.
Definition: usb_cdcw.h:111
uint8_t bDescriptorType
CS_INTERFACE descriptor type.
Definition: usb_cdcw.h:85
OBEX Service Identification Functional Descriptor.
Definition: usb_cdcw.h:121
uint8_t bDescriptorType
CS_INTERFACE descriptor type.
Definition: usb_cdcw.h:74
uint8_t bFunctionLength
Size of this functional descriptor, in bytes.
Definition: usb_cdcw.h:97
uint8_t bDescriptorSubType
Wireless Handset Control Model Functional Descriptor.
Definition: usb_cdcw.h:75
uint16_t wMaxCommand
The buffer size allocated in the device for data sent from the host using SEND_ENCAPSULATED_CMD.
Definition: usb_cdcw.h:113
uint8_t bFunctionLength
Size of this functional descriptor, in bytes.
Definition: usb_cdcw.h:73
uint8_t bFunctionLength
Size of this functional descriptor, in bytes.
Definition: usb_cdcw.h:84
uint8_t bFunctionLength
Size of this functional descriptor, in bytes.
Definition: usb_cdcw.h:122
uint8_t bFunctionLength
Size of this functional descriptor, in bytes.
Definition: usb_cdcw.h:109
uint16_t bcdVersion
Version number for this subclass specification.
Definition: usb_cdcw.h:112
uint8_t bGUID[16]
Uniquely identifies the detailed transport protocol provided by this MDLM interface.
Definition: usb_cdcw.h:88
Mobile Direct Line Model Detail Functional Descriptor.
Definition: usb_cdcw.h:96
uint8_t bDescriptorType
CS_INTERFACE descriptor type.
Definition: usb_cdcw.h:98
uint8_t bGuidDescriptorType
Discriminator, interpreted according to the semantic model specified by the GUID in the MDLM Function...
Definition: usb_cdcw.h:100
uint8_t bmOBEXRole
Represents the OBEX role to be played by the function.
Definition: usb_cdcw.h:125