NetBurner 3.5.8
PDF Version
cdc.h
1/**************************************************************************/
31#ifndef __USB_CDC_H
32#define __USB_CDC_H
33
34enum class eCdc_Intf_t {
35 eCdc_Intf_Hdr = 0x00, // Header Functional Descriptor, which marks the beginning of the concatenated set of functional descriptors for the interface.
36 eCdc_Intf_CallMgmnt = 0x01, // Call Management Functional Descriptor.
37 eCdc_Intf_ACM = 0x02, // Abstract Control Management Functional Descriptor.
38 eCdc_Intf_DLM = 0x03, // Direct Line Management Functional Descriptor.
39 eCdc_Intf_Ringer = 0x04, // Telephone Ringer Functional Descriptor.
40 eCdc_Intf_RepCap = 0x05, // Telephone Call and Line State Reporting Capabilities Functional Descriptor.
41 eCdc_Intf_Union = 0x06, // Union Functional Descriptor
42 eCdc_Intf_CountrySelect = 0x07, // Country Selection Functional Descriptor
43 eCdc_Intf_OpModes = 0x08, // Telephone Operational Modes Functional Descriptor
44 eCdc_Intf_USBTerm = 0x09, // USB Terminal Functional Descriptor
45 eCdc_Intf_NetTerm = 0x0A, // Network Channel Terminal Descriptor
46 eCdc_Intf_ProtoUnit = 0x0B, // Protocol Unit Functional Descriptor
47 eCdc_Intf_Extension = 0x0C, // Extension Unit Functional Descriptor
48 eCdc_Intf_MultiChMgmnt = 0x0D, // Multi-Channel Management Functional Descriptor
49 eCdc_Intf_CAPICtlMgmnt = 0x0E, // CAPI Control Management Functional Descriptor
50 eCdc_Intf_EthNet = 0x0F, // Ethernet Networking Functional Descriptor
51 eCdc_Intf_ATMNet = 0x10, // ATM Networking Functional Descriptor
52 eCdc_Intf_WirelessCtl = 0x11, // Wireless Handset Control Model Functional Descriptor
53 eCdc_Intf_MobDLM = 0x12, // Mobile Direct Line Model Functional Descriptor
54 eCdc_Intf_MDLM_Detail = 0x13, // MDLM Detail Functional Descriptor
55 eCdc_Intf_DevMgmnt = 0x14, // Device Management Model Functional Descriptor
56 eCdc_Intf_OBEX = 0x15, // OBEX Functional Descriptor
57 eCdc_Intf_CmdSet = 0x16, // Command Set Functional Descriptor
58 eCdc_Intf_CmdSet_Detail = 0x17, // Command Set Detail Functional Descriptor
59 eCdc_Intf_TCM = 0x18, // Telephone Control Model Functional Descriptor
60 eCdc_Intf_OBEX_SvcID = 0x19, // OBEX Service Identifier Functional Descriptor
61 eCdc_Intf_NCM = 0x1A, // NCM Functional Descriptor
62 // 0x1Bh-7Fh RESERVED (future use)
63 // 0x80h-FEh RESERVED (vendor specific)
64};
65
66struct desc_cdc_fn_t {
67 uint8_t bFunctionLength; // Size of descriptor in bytes
68 uint8_t bDescriptorType; // Descriptor Type, dependant on function
69 uint8_t bDescriptorSubType; // Descriptor Subtype, dependant on function
70 uint8_t pData[]; // Function specific data;
71};
72
73struct desc_cdc_fn_hdr_t {
74 uint8_t bFunctionLength; // Size of descriptor in bytes
75 uint8_t bDescriptorType; // Descriptor Type, dependant on function
76 uint8_t bDescriptorSubType; // Descriptor Subtype, dependant on function
77 uint8_t bcdCDC; // USB CDC Specification compliant with, in Binary-Coded Decimal
78};
79
80struct desc_cdc_fn_union_t {
81 uint8_t bFunctionLength; // Size of descriptor in bytes
82 uint8_t bDescriptorType; // Descriptor Type, dependant on function
83 uint8_t bDescriptorSubType; // Descriptor Subtype, dependant on function
84 uint8_t bControlInterface; // Interface number for the controlling interface for this union
85 uint8_t bSubordinateInterface[1]; // Interface numbers for the subordinate interfaces
86};
87
88struct desc_cdc_fn_country_t {
89 uint8_t bFunctionLength; // Size of descriptor in bytes
90 uint8_t bDescriptorType; // Descriptor Type, dependant on function
91 uint8_t bDescriptorSubType; // Descriptor Subtype, dependant on function
92 uint8_t iCountryCodeRelDate;// Index of a String Descriptor giving the release
93 // date for the implemented ISO 3166 Country Codes.
94 uint16_t wCountryCode[1]; // Country Codes
95};
96
97
98/************************* Class Specific Messages ***************************/
99
100// Direct Line Control Model
101
102enum class eReq_CDC_t : uint8_t {
103 eReq_CDC_SendEncCmd = 0x00, // SEND_ENCAPSULATED_COMMAND 6.2.1
104 eReq_CDC_GetEncResp = 0x01, // GET_ENCAPSULATED_RESPONSE 6.2.2
105 eReq_CDC_SetCommFeat = 0x02, // SET_COMM_FEATURE [USBPSTN1.2]
106 eReq_CDC_GetCommFeat = 0x03, // GET_COMM_FEATURE [USBPSTN1.2]
107 eReq_CDC_ClrCommFeat = 0x04, // CLEAR_COMM_FEATURE [USBPSTN1.2]
108 eReq_CDC_SetAuxLineState = 0x10, // SET_AUX_LINE_STATE [USBPSTN1.2]
109 eReq_CDC_SetHookState = 0x11, // SET_HOOK_STATE [USBPSTN1.2]
110 eReq_CDC_PulseSetup = 0x12, // PULSE_SETUP [USBPSTN1.2]
111 eReq_CDC_SendPulse = 0x13, // SEND_PULSE [USBPSTN1.2]
112 eReq_CDC_SetPulseTime = 0x14, // SET_PULSE_TIME [USBPSTN1.2]
113 eReq_CDC_RingAuxJack = 0x15, // RING_AUX_JACK [USBPSTN1.2]
114 eReq_CDC_SetLineCoding = 0x20, // SET_LINE_CODING [USBPSTN1.2]
115 eReq_CDC_GetLineCoding = 0x21, // GET_LINE_CODING [USBPSTN1.2]
116 eReq_CDC_SetCtlLineState = 0x22, // SET_CONTROL_LINE_STATE [USBPSTN1.2]
117 eReq_CDC_SendBreak = 0x23, // SEND_BREAK [USBPSTN1.2]
118 eReq_CDC_SetRingerParams = 0x30, // SET_RINGER_PARMS [USBPSTN1.2]
119 eReq_CDC_GetRingerParams = 0x31, // GET_RINGER_PARMS [USBPSTN1.2]
120 eReq_CDC_SetOpParames = 0x32, // SET_OPERATION_PARMS [USBPSTN1.2]
121 eReq_CDC_GetOpParams = 0x33, // GET_OPERATION_PARMS [USBPSTN1.2]
122 eReq_CDC_SetLineParams = 0x34, // SET_LINE_PARMS [USBPSTN1.2]
123 eReq_CDC_GetLineParams = 0x35, // GET_LINE_PARMS [USBPSTN1.2]
124 eReq_CDC_DialDigits = 0x36, // DIAL_DIGITS [USBPSTN1.2]
125 eReq_CDC_SetUnitParam = 0x37, // SET_UNIT_PARAMETER [USBISDN1.2]
126 eReq_CDC_GetUnitParam = 0x38, // GET_UNIT_PARAMETER [USBISDN1.2]
127 eReq_CDC_ClrUnitParam = 0x39, // CLEAR_UNIT_PARAMETER [USBISDN1.2]
128 eReq_CDC_GetProfile = 0x3A, // GET_PROFILE [USBISDN1.2]
129 eReq_CDC_SetEthMCFilters = 0x40, // SET_ETHERNET_MULTICAST_FILTERS [USBECM1.2]
130 eReq_CDC_SetEthPwrMgmntFilt = 0x41, // SET_ETHERNET_POWER_MANAGEMENT_PATTERN_FILTER [USBECM1.2]
131 eReq_CDC_GetEthPwrMgmntFilt = 0x42, // GET_ETHERNET_POWER_MANAGEMENT_PATTERN_FILTER [USBECM1.2]
132 eReq_CDC_SetEthPktFilt = 0x43, // SET_ETHERNET_PACKET_FILTER [USBECM1.2]
133 eReq_CDC_GetEthStats = 0x44, // GET_ETHERNET_STATISTIC [USBECM1.2]
134 eReq_CDC_SetATMDataFmt = 0x50, // SET_ATM_DATA_FORMAT [USBATM1.2]
135 eReq_CDC_GetATMDevStats = 0x51, // GET_ATM_DEVICE_STATISTICS [USBATM1.2]
136 eReq_CDC_SetATMDefVC = 0x52, // SET_ATM_DEFAULT_VC [USBATM1.2]
137 eReq_CDC_GetATMVCStats = 0x53, // GET_ATM_VC_STATISTICS [USBATM1.2]
138};
139
140enum class eNotif_CDC_t : uint8_t {
141 eNotif_CDC_NetConn = 0x00, // NETWORK_CONNECTION 6.3.1
142 eNotif_CDC_RespAvail = 0x01, // RESPONSE_AVAILABLE 6.3.2
143 eNotif_CDC_AuxJackHookState = 0x08, // AUX_JACK_HOOK_STATE [USBPSTN1.2]
144 eNotif_CDC_RingDetect = 0x09, // RING_DETECT [USBPSTN12]
145 eNotif_CDC_SerState = 0x20, // SERIAL_STATE [USBPSTN1.2]
146 eNotif_CDC_CallStateChange = 0x28, // CALL_STATE_CHANGE [USBPSTN1.2]
147 eNotif_CDC_LineStateChange = 0x29, // LINE_STATE_CHANGE [USBPSTN1.2]
148 eNotif_CDC_ConnSpeedChange = 0x2A, // CONNECTION_SPEED_CHANGE 6.3.3
149};
150
151#endif /* ----- #ifndef __USB_CDC_H ----- */
152