35#include "common/tusb_common.h"
143 CDC_REQUEST_SET_COMM_FEATURE = 0x02,
144 CDC_REQUEST_GET_COMM_FEATURE = 0x03,
145 CDC_REQUEST_CLEAR_COMM_FEATURE = 0x04,
147 CDC_REQUEST_SET_AUX_LINE_STATE = 0x10,
148 CDC_REQUEST_SET_HOOK_STATE = 0x11,
149 CDC_REQUEST_PULSE_SETUP = 0x12,
150 CDC_REQUEST_SEND_PULSE = 0x13,
151 CDC_REQUEST_SET_PULSE_TIME = 0x14,
152 CDC_REQUEST_RING_AUX_JACK = 0x15,
154 CDC_REQUEST_SET_LINE_CODING = 0x20,
155 CDC_REQUEST_GET_LINE_CODING = 0x21,
156 CDC_REQUEST_SET_CONTROL_LINE_STATE = 0x22,
157 CDC_REQUEST_SEND_BREAK = 0x23,
159 CDC_REQUEST_SET_RINGER_PARMS = 0x30,
160 CDC_REQUEST_GET_RINGER_PARMS = 0x31,
161 CDC_REQUEST_SET_OPERATION_PARMS = 0x32,
162 CDC_REQUEST_GET_OPERATION_PARMS = 0x33,
163 CDC_REQUEST_SET_LINE_PARMS = 0x34,
164 CDC_REQUEST_GET_LINE_PARMS = 0x35,
165 CDC_REQUEST_DIAL_DIGITS = 0x36,
166 CDC_REQUEST_SET_UNIT_PARAMETER = 0x37,
167 CDC_REQUEST_GET_UNIT_PARAMETER = 0x38,
168 CDC_REQUEST_CLEAR_UNIT_PARAMETER = 0x39,
169 CDC_REQUEST_GET_PROFILE = 0x3A,
171 CDC_REQUEST_SET_ETHERNET_MULTICAST_FILTERS = 0x40,
172 CDC_REQUEST_SET_ETHERNET_POWER_MANAGEMENT_PATTERN_FILTER = 0x41,
173 CDC_REQUEST_GET_ETHERNET_POWER_MANAGEMENT_PATTERN_FILTER = 0x42,
174 CDC_REQUEST_SET_ETHERNET_PACKET_FILTER = 0x43,
175 CDC_REQUEST_GET_ETHERNET_STATISTIC = 0x44,
177 CDC_REQUEST_SET_ATM_DATA_FORMAT = 0x50,
178 CDC_REQUEST_GET_ATM_DEVICE_STATISTICS = 0x51,
179 CDC_REQUEST_SET_ATM_DEFAULT_VC = 0x52,
180 CDC_REQUEST_GET_ATM_VC_STATISTICS = 0x53,
182 CDC_REQUEST_MDLM_SEMANTIC_MODEL = 0x60,
187 CDC_CONTROL_LINE_STATE_DTR = 0x01,
188 CDC_CONTROL_LINE_STATE_RTS = 0x02,
193 CDC_LINE_CONDING_STOP_BITS_1 = 0,
194 CDC_LINE_CONDING_STOP_BITS_1_5 = 1,
195 CDC_LINE_CONDING_STOP_BITS_2 = 2,
200 CDC_LINE_CODING_PARITY_NONE = 0,
201 CDC_LINE_CODING_PARITY_ODD = 1,
202 CDC_LINE_CODING_PARITY_EVEN = 2,
203 CDC_LINE_CODING_PARITY_MARK = 3,
204 CDC_LINE_CODING_PARITY_SPACE = 4,
216 CDC_NOTIF_AUX_JACK_HOOK_STATE = 0x08,
217 CDC_NOTIF_RING_DETECT = 0x09,
218 CDC_NOTIF_SERIAL_STATE = 0x20,
219 CDC_NOTIF_CALL_STATE_CHANGE = 0x28,
220 CDC_NOTIF_LINE_STATE_CHANGE = 0x29,
222 CDC_NOTIF_MDLM_SEMANTIC_MODEL_NOTIFICATION = 0x40,
231TU_ATTR_BIT_FIELD_ORDER_BEGIN
252#define cdc_desc_func_union_n_t(no_slave)\
253 struct TU_ATTR_PACKED { \
255 uint8_t bDescriptorType ;\
256 uint8_t bDescriptorSubType ;\
257 uint8_t bControlInterface ;\
258 uint8_t bSubordinateInterface[no_slave] ;\
271#define cdc_desc_func_country_selection_n_t(no_country) \
272 struct TU_ATTR_PACKED { \
274 uint8_t bDescriptorType ;\
275 uint8_t bDescriptorSubType ;\
276 uint8_t iCountryCodeRelDate ;\
277 uint16_t wCountryCode[no_country] ;\
295 uint8_t TU_RESERVED : 6;
298 uint8_t bDataInterface;
307 uint8_t TU_RESERVED : 4;
333 uint8_t TU_RESERVED : 5;
345 uint8_t bRingerVolSteps ;
346 uint8_t bNumRingerPatterns ;
358 uint8_t simple_mode : 1;
359 uint8_t standalone_mode : 1;
360 uint8_t computer_centric_mode : 1;
361 uint8_t TU_RESERVED : 5;
380 uint32_t TU_RESERVED0 : 2;
381 uint32_t TU_RESERVED1 : 16;
382 uint32_t TU_RESERVED2 : 8;
387static inline uint8_t cdc_functional_desc_typeof(uint8_t
const * p_desc)
416TU_ATTR_BIT_FIELD_ORDER_END
cdc_data_protocol_type_t
Definition cdc.h:119
TU_ATTR_PACKED_BEGIN TU_ATTR_BIT_FIELD_ORDER_BEGIN struct TU_ATTR_PACKED cdc_desc_func_header_t
Header Functional Descriptor (Communication Interface)
struct TU_ATTR_PACKED cdc_desc_func_telephone_operational_modes_t
Telephone Operational Modes Functional Descriptor.
cdc_management_request_t
Communication Interface Management Element Request Codes.
Definition cdc.h:140
struct TU_ATTR_PACKED cdc_desc_func_union_t
Union Functional Descriptor (Communication Interface)
struct TU_ATTR_PACKED cdc_desc_func_telephone_call_state_reporting_capabilities_t
Telephone Call and Line State Reporting Capabilities Descriptor.
cdc_comm_sublcass_type_t
Communication Interface Subclass Codes.
Definition cdc.h:50
struct TU_ATTR_PACKED cdc_desc_func_direct_line_management_t
Direct Line Management Functional Descriptor.
struct TU_ATTR_PACKED cdc_desc_func_telephone_ringer_t
Telephone Ringer Functional Descriptor.
cdc_comm_protocol_type_t
Communication Interface Protocol Codes.
Definition cdc.h:68
struct TU_ATTR_PACKED cdc_desc_func_call_management_t
Call Management Functional Descriptor.
struct TU_ATTR_PACKED cdc_desc_func_acm_t
struct TU_ATTR_PACKED cdc_desc_func_country_selection_t
Country Selection Functional Descriptor (Communication Interface)
cdc_func_desc_type_t
Communication Interface SubType Descriptor.
Definition cdc.h:82
cdc_notification_request_t
6.3 Notification Codes
Definition cdc.h:213
@ CDC_DATA_PROTOCOL_IN_PROTOCOL_UNIT_FUNCTIONAL_DESCRIPTOR
The protocol(s) are described using a ProtocolUnit Functional Descriptors on Communications Class Int...
Definition cdc.h:131
@ CDC_DATA_PROTOCOL_EURO_ISDN
Euro-ISDN protocol control.
Definition cdc.h:127
@ CDC_DATA_PROTOCOL_V42BIS_DATA_COMPRESSION
Data compression procedures.
Definition cdc.h:126
@ CDC_DATA_PROTOCOL_CAPI_COMMAND
CAPI Commands.
Definition cdc.h:129
@ CDC_DATA_PROTOCOL_Q921_DATA_LINK
Data link protocol for Q.931.
Definition cdc.h:124
@ CDC_DATA_PROTOCOL_HDLC
HDLC.
Definition cdc.h:121
@ CDC_DATA_PROTOCOL_Q921_MANAGEMENT
Management protocol for Q.921 data link protocol.
Definition cdc.h:123
@ CDC_DATA_PROTOCOL_V24_RATE_ADAPTION_TO_ISDN
V.24 rate adaptation to ISDN.
Definition cdc.h:128
@ CDC_DATA_PROTOCOL_ISDN_BRI
Physical interface protocol for ISDN BRI.
Definition cdc.h:120
@ CDC_DATA_PROTOCOL_Q921_TEI_MULTIPLEXOR
TEI-multiplexor for Q.921 data link protocol.
Definition cdc.h:125
@ CDC_DATA_PROTOCOL_TRANSPARENT
Transparent.
Definition cdc.h:122
@ CDC_DATA_PROTOCOL_HOST_BASED_DRIVER
Host based driver. Note: This protocol code should only be used in messages between host and device t...
Definition cdc.h:130
@ CDC_REQUEST_SEND_ENCAPSULATED_COMMAND
is used to issue a command in the format of the supported control protocol of the Communications Clas...
Definition cdc.h:141
@ CDC_REQUEST_GET_ENCAPSULATED_RESPONSE
is used to request a response in the format of the supported control protocol of the Communications C...
Definition cdc.h:142
@ CDC_COMM_SUBCLASS_ETHERNET_CONTROL_MODEL
Ethernet Networking Control Model [USBECM1.2].
Definition cdc.h:56
@ CDC_COMM_SUBCLASS_TELEPHONE_CONTROL_MODEL
Telephone Control Model [USBPSTN1.2].
Definition cdc.h:53
@ CDC_COMM_SUBCLASS_NETWORK_CONTROL_MODEL
Network Control Model [USBNCM1.0].
Definition cdc.h:63
@ CDC_COMM_SUBCLASS_DEVICE_MANAGEMENT
Device Management [USBWMC1.1].
Definition cdc.h:59
@ CDC_COMM_SUBCLASS_CAPI_CONTROL_MODEL
CAPI Control Model [USBISDN1.2].
Definition cdc.h:55
@ CDC_COMM_SUBCLASS_OBEX
OBEX [USBWMC1.1].
Definition cdc.h:61
@ CDC_COMM_SUBCLASS_ABSTRACT_CONTROL_MODEL
Abstract Control Model [USBPSTN1.2].
Definition cdc.h:52
@ CDC_COMM_SUBCLASS_DIRECT_LINE_CONTROL_MODEL
Direct Line Control Model [USBPSTN1.2].
Definition cdc.h:51
@ CDC_COMM_SUBCLASS_ATM_NETWORKING_CONTROL_MODEL
ATM Networking Control Model [USBATM1.2].
Definition cdc.h:57
@ CDC_COMM_SUBCLASS_MULTICHANNEL_CONTROL_MODEL
Multi-Channel Control Model [USBISDN1.2].
Definition cdc.h:54
@ CDC_COMM_SUBCLASS_MOBILE_DIRECT_LINE_MODEL
Mobile Direct Line Model [USBWMC1.1].
Definition cdc.h:60
@ CDC_COMM_SUBCLASS_ETHERNET_EMULATION_MODEL
Ethernet Emulation Model [USBEEM1.0].
Definition cdc.h:62
@ CDC_COMM_SUBCLASS_WIRELESS_HANDSET_CONTROL_MODEL
Wireless Handset Control Model [USBWMC1.1].
Definition cdc.h:58
@ CDC_COMM_PROTOCOL_NONE
No specific protocol.
Definition cdc.h:69
@ CDC_COMM_PROTOCOL_ATCOMMAND_GSM_707
AT Commands defined by GSM 07.07.
Definition cdc.h:73
@ CDC_COMM_PROTOCOL_ATCOMMAND
AT Commands: V.250 etc.
Definition cdc.h:70
@ CDC_COMM_PROTOCOL_ATCOMMAND_PCCA_101_AND_ANNEXO
AT Commands defined by PCCA-101 & Annex O.
Definition cdc.h:72
@ CDC_COMM_PROTOCOL_ETHERNET_EMULATION_MODEL
Ethernet Emulation Model.
Definition cdc.h:76
@ CDC_COMM_PROTOCOL_ATCOMMAND_3GPP_27007
AT Commands defined by 3GPP 27.007.
Definition cdc.h:74
@ CDC_COMM_PROTOCOL_ATCOMMAND_PCCA_101
AT Commands defined by PCCA-101.
Definition cdc.h:71
@ CDC_COMM_PROTOCOL_ATCOMMAND_CDMA
AT Commands defined by TIA for CDMA.
Definition cdc.h:75
@ CDC_FUNC_DESC_OBEX_SERVICE_IDENTIFIER
OBEX Service Identifier Functional Descriptor.
Definition cdc.h:108
@ CDC_FUNC_DESC_MULTICHANEL_MANAGEMENT
Multi-Channel Management Functional Descriptor.
Definition cdc.h:96
@ CDC_FUNC_DESC_OBEX
OBEX Functional Descriptor.
Definition cdc.h:104
@ CDC_FUNC_DESC_DIRECT_LINE_MANAGEMENT
Direct Line Management Functional Descriptor.
Definition cdc.h:86
@ CDC_FUNC_DESC_TELEPHONE_CONTROL_MODEL
Telephone Control Model Functional Descriptor.
Definition cdc.h:107
@ CDC_FUNC_DESC_COMMAND_SET_DETAIL
Command Set Detail Functional Descriptor.
Definition cdc.h:106
@ CDC_FUNC_DESC_UNION
Union Functional Descriptor.
Definition cdc.h:89
@ CDC_FUNC_DESC_TELEPHONE_RINGER
Telephone Ringer Functional Descriptor.
Definition cdc.h:87
@ CDC_FUNC_DESC_ABSTRACT_CONTROL_MANAGEMENT
Abstract Control Management Functional Descriptor.
Definition cdc.h:85
@ CDC_FUNC_DESC_MOBILE_DIRECT_LINE_MODEL_DETAIL
MDLM Detail Functional Descriptor.
Definition cdc.h:102
@ CDC_FUNC_DESC_CAPI_CONTROL_MANAGEMENT
CAPI Control Management Functional Descriptor.
Definition cdc.h:97
@ CDC_FUNC_DESC_ATM_NETWORKING
ATM Networking Functional Descriptor.
Definition cdc.h:99
@ CDC_FUNC_DESC_COMMAND_SET
Command Set Functional Descriptor.
Definition cdc.h:105
@ CDC_FUNC_DESC_MOBILE_DIRECT_LINE_MODEL
Mobile Direct Line Model Functional Descriptor.
Definition cdc.h:101
@ CDC_FUNC_DESC_CALL_MANAGEMENT
Call Management Functional Descriptor.
Definition cdc.h:84
@ CDC_FUNC_DESC_HEADER
Header Functional Descriptor, which marks the beginning of the concatenated set of functional descrip...
Definition cdc.h:83
@ CDC_FUNC_DESC_USB_TERMINAL
USB Terminal Functional Descriptor.
Definition cdc.h:92
@ CDC_FUNC_DESC_EXTENSION_UNIT
Extension Unit Functional Descriptor.
Definition cdc.h:95
@ CDC_FUNC_DESC_DEVICE_MANAGEMENT_MODEL
Device Management Model Functional Descriptor.
Definition cdc.h:103
@ CDC_FUNC_DESC_COUNTRY_SELECTION
Country Selection Functional Descriptor.
Definition cdc.h:90
@ CDC_FUNC_DESC_TELEPHONE_CALL_AND_LINE_STATE_REPORTING_CAPACITY
Telephone Call and Line State Reporting Capabilities Functional Descriptor.
Definition cdc.h:88
@ CDC_FUNC_DESC_ETHERNET_NETWORKING
Ethernet Networking Functional Descriptor.
Definition cdc.h:98
@ CDC_FUNC_DESC_NETWORK_CHANNEL_TERMINAL
Network Channel Terminal Descriptor.
Definition cdc.h:93
@ CDC_FUNC_DESC_NCM
NCM Functional Descriptor.
Definition cdc.h:109
@ CDC_FUNC_DESC_WIRELESS_HANDSET_CONTROL_MODEL
Wireless Handset Control Model Functional Descriptor.
Definition cdc.h:100
@ CDC_FUNC_DESC_TELEPHONE_OPERATIONAL_MODES
Telephone Operational ModesFunctional Descriptor.
Definition cdc.h:91
@ CDC_FUNC_DESC_PROTOCOL_UNIT
Protocol Unit Functional Descriptor.
Definition cdc.h:94
@ CDC_NOTIF_CONNECTION_SPEED_CHANGE
This notification allows the device to inform the host-networking driver that a change in either the ...
Definition cdc.h:221
@ CDC_NOTIF_NETWORK_CONNECTION
This notification allows the device to notify the host about network connection status.
Definition cdc.h:214
@ CDC_NOTIF_RESPONSE_AVAILABLE
This notification allows the device to notify the hostthat a response is available....
Definition cdc.h:215
uint32_t dual_tone_multi_freq
0 : Cannot report dual tone multi-frequency (DTMF) digits input remotely over the telephone line....
Definition cdc.h:378
uint8_t iCountryCodeRelDate
Index of a string giving the release date for the implemented ISO 3166 Country Codes.
Definition cdc.h:267
uint8_t support_comm_request
Device supports the request combination of Set_Comm_Feature, Clear_Comm_Feature, and Get_Comm_Feature...
Definition cdc.h:303
uint8_t support_send_break
Device supports the request Send_Break.
Definition cdc.h:305
uint8_t bDescriptorSubType
Descriptor SubType. Value: AUDIO_CS_AC_INTERFACE_HEADER.
Definition audio.h:658
uint8_t send_recv_call
0 - Device does not handle call management itself. 1 - Device handles call management itself.
Definition cdc.h:294
uint8_t handle_call
0 - Device sends/receives call management information only over the Communications Class interface....
Definition cdc.h:293
uint8_t require_pulse_setup
Device requires extra Pulse_Setup request during pulse dialing sequence to disengage holding circuit.
Definition cdc.h:330
uint16_t wCountryCode
Country code in the format as defined in [ISO3166], release date as specified inoffset 3 for the firs...
Definition cdc.h:268
uint32_t line_state_change
0 : Does not support line state change notification. 1 : Does support line state change notification
Definition cdc.h:379
uint8_t support_pulse_request
Device supports the request combination of Pulse_Setup, Send_Pulse, and Set_Pulse_Time.
Definition cdc.h:332
uint8_t stop_bits
0: 1 stop bit - 1: 1.5 stop bits - 2: 2 stop bits
Definition cdc.h:398
uint8_t support_line_request
Device supports the request combination of Set_Line_Coding, Set_Control_Line_State,...
Definition cdc.h:304
uint32_t ringback_busy_fastbusy
0 : Reports only dialing state. 1 : Reports ringback, busy, and fast busy states.
Definition cdc.h:375
uint8_t bControlInterface
Interface number of Communication Interface.
Definition cdc.h:248
uint8_t bDescriptorType
Descriptor Type. Value: TUSB_DESC_CS_INTERFACE.
Definition audio.h:657
uint8_t bSubordinateInterface
Array of Interface number of Data Interface.
Definition cdc.h:249
uint8_t bLength
Size of this descriptor in bytes: 9.
Definition audio.h:656
uint8_t parity
0: None - 1: Odd - 2: Even - 3: Mark - 4: Space
Definition cdc.h:399
uint8_t support_notification_network_connection
Device supports the notification Network_Connection.
Definition cdc.h:306
uint32_t caller_id
0 : Does not report caller ID. 1 : Reports caller ID information.
Definition cdc.h:376
uint8_t data_bits
can be 5, 6, 7, 8 or 16
Definition cdc.h:400
uint16_t bcdCDC
CDC release number in Binary-Coded Decimal.
Definition cdc.h:239
uint32_t incoming_distinctive
0 : Reports only incoming ringing. 1 : Reports incoming distinctive ringing patterns.
Definition cdc.h:377
uint8_t support_aux_request
Device supports the request combination of Set_Aux_Line_State, Ring_Aux_Jack, and notification Aux_Ja...
Definition cdc.h:331
uint32_t interrupted_dialtone
0 : Reports only dialtone (does not differentiate between normal and interrupted dialtone)....
Definition cdc.h:374
AUDIO Channel Cluster Descriptor (4.1)
Definition audio.h:647