CDC_COMM_SUBCLASS_MOBILE_DIRECT_LINE_MODEL,///< Mobile Direct Line Model [USBWMC1.1]
CDC_COMM_SUBCLASS_OBEX,///< OBEX [USBWMC1.1]
CDC_COMM_SUBCLASS_ETHERNET_EMULATION_MODEL///< Ethernet Emulation Model [USBEEM1.0]
}cdc_comm_sublcass_type_t;
/// Communication Interface Protocol Codes
typedefenum
{
CDC_COMM_PROTOCOL_NONE=0x00,///< No specific protocol
CDC_COMM_PROTOCOL_ATCOMMAND,///< AT Commands: V.250 etc
CDC_COMM_PROTOCOL_ATCOMMAND_PCCA_101,///< AT Commands defined by PCCA-101
CDC_COMM_PROTOCOL_ATCOMMAND_PCCA_101_AND_ANNEXO,///< AT Commands defined by PCCA-101 & Annex O
CDC_COMM_PROTOCOL_ATCOMMAND_GSM_707,///< AT Commands defined by GSM 07.07
CDC_COMM_PROTOCOL_ATCOMMAND_3GPP_27007,///< AT Commands defined by 3GPP 27.007
CDC_COMM_PROTOCOL_ATCOMMAND_CDMA,///< AT Commands defined by TIA for CDMA
CDC_COMM_PROTOCOL_ETHERNET_EMULATION_MODEL///< Ethernet Emulation Model
}cdc_comm_protocol_type_t;
//------------- SubType Descriptor in COMM Functional Descriptor -------------//
/// Communication Interface SubType Descriptor
typedefenum
{
CDC_FUNC_DESC_HEADER=0x00,///< Header Functional Descriptor, which marks the beginning of the concatenated set of functional descriptors for the interface.
CDC_DATA_PROTOCOL_HOST_BASED_DRIVER=0xFD,///< Host based driver. Note: This protocol code should only be used in messages between host and device to identify the host driver portion of a protocol stack.
CDC_DATA_PROTOCOL_IN_PROTOCOL_UNIT_FUNCTIONAL_DESCRIPTOR=0xFE///< The protocol(s) are described using a ProtocolUnit Functional Descriptors on Communications Class Interface
/// Communication Interface Management Element Request Codes
typedefenum
{
CDC_REQUEST_SEND_ENCAPSULATED_COMMAND=0x00,///< is used to issue a command in the format of the supported control protocol of the Communications Class interface
CDC_REQUEST_GET_ENCAPSULATED_RESPONSE=0x01,///< is used to request a response in the format of the supported control protocol of the Communications Class interface.
/// Communication Interface Management Element Notification Codes
typedefenum
{
NETWORK_CONNECTION=0x00,///< This notification allows the device to notify the host about network connection status.
RESPONSE_AVAILABLE=0x01,///< This notification allows the device to notify the hostthat a response is available. This response can be retrieved with a subsequent \ref CDC_REQUEST_GET_ENCAPSULATED_RESPONSE request.
AUX_JACK_HOOK_STATE=0x08,
RING_DETECT=0x09,
SERIAL_STATE=0x20,
CALL_STATE_CHANGE=0x28,
LINE_STATE_CHANGE=0x29,
CONNECTION_SPEED_CHANGE=0x2A,///< This notification allows the device to inform the host-networking driver that a change in either the upstream or the downstream bit rate of the connection has occurred
/// \details This functional descriptor describes the processing of calls for the Communications Class interface.
typedefstructTU_ATTR_PACKED
{
uint8_tbLength;///< Size of this descriptor in bytes.
uint8_tbDescriptorType;///< Descriptor Type, must be Class-Specific
uint8_tbDescriptorSubType;///< Descriptor SubType one of above CDC_FUCN_DESC_
struct{
uint8_thandle_call:1;///< 0 - Device sends/receives call management information only over the Communications Class interface. 1 - Device can send/receive call management information over a Data Class interface.
uint8_tsend_recv_call:1;///< 0 - Device does not handle call management itself. 1 - Device handles call management itself.
uint8_t:0;
}bmCapabilities;
uint8_tbDataInterface;
}cdc_desc_func_call_management_t;
typedefstructTU_ATTR_PACKED
{
uint8_tsupport_comm_request:1;///< Device supports the request combination of Set_Comm_Feature, Clear_Comm_Feature, and Get_Comm_Feature.
uint8_tsupport_line_request:1;///< Device supports the request combination of Set_Line_Coding, Set_Control_Line_State, Get_Line_Coding, and the notification Serial_State.
uint8_tsupport_send_break:1;///< Device supports the request Send_Break
uint8_tsupport_notification_network_connection:1;///< Device supports the notification Network_Connection.
uint8_t:0;
}cdc_acm_capability_t;
TU_VERIFY_STATIC(sizeof(cdc_acm_capability_t)==1,"mostly problem with compiler");
/// \brief Abstract Control Management Functional Descriptor
/// \details This functional descriptor describes the commands supported by by the Communications Class interface with SubClass code of \ref CDC_COMM_SUBCLASS_ABSTRACT_CONTROL_MODEL
typedefstructTU_ATTR_PACKED
{
uint8_tbLength;///< Size of this descriptor in bytes.
uint8_tbDescriptorType;///< Descriptor Type, must be Class-Specific
uint8_tbDescriptorSubType;///< Descriptor SubType one of above CDC_FUCN_DESC_
cdc_acm_capability_tbmCapabilities;
}cdc_desc_func_acm_t;
/// \brief Direct Line Management Functional Descriptor
/// \details This functional descriptor describes the commands supported by the Communications Class interface with SubClass code of \ref CDC_FUNC_DESC_DIRECT_LINE_MANAGEMENT
typedefstructTU_ATTR_PACKED
{
uint8_tbLength;///< Size of this descriptor in bytes.
uint8_tbDescriptorType;///< Descriptor Type, must be Class-Specific
uint8_tbDescriptorSubType;///< Descriptor SubType one of above CDC_FUCN_DESC_
struct{
uint8_trequire_pulse_setup:1;///< Device requires extra Pulse_Setup request during pulse dialing sequence to disengage holding circuit.
uint8_tsupport_aux_request:1;///< Device supports the request combination of Set_Aux_Line_State, Ring_Aux_Jack, and notification Aux_Jack_Hook_State.
uint8_tsupport_pulse_request:1;///< Device supports the request combination of Pulse_Setup, Send_Pulse, and Set_Pulse_Time.
uint8_t:0;
}bmCapabilities;
}cdc_desc_func_direct_line_management_t;
/// \brief Telephone Ringer Functional Descriptor
/// \details The Telephone Ringer functional descriptor describes the ringer capabilities supported by the Communications Class interface,
/// with the SubClass code of \ref CDC_COMM_SUBCLASS_TELEPHONE_CONTROL_MODEL
typedefstructTU_ATTR_PACKED
{
uint8_tbLength;///< Size of this descriptor in bytes.
uint8_tbDescriptorType;///< Descriptor Type, must be Class-Specific
uint8_tbDescriptorSubType;///< Descriptor SubType one of above CDC_FUCN_DESC_
/// \details The Telephone Operational Modes functional descriptor describes the operational modes supported by
/// the Communications Class interface, with the SubClass code of \ref CDC_COMM_SUBCLASS_TELEPHONE_CONTROL_MODEL
typedefstructTU_ATTR_PACKED
{
uint8_tbLength;///< Size of this descriptor in bytes.
uint8_tbDescriptorType;///< Descriptor Type, must be Class-Specific
uint8_tbDescriptorSubType;///< Descriptor SubType one of above CDC_FUCN_DESC_
struct{
uint8_tsimple_mode:1;
uint8_tstandalone_mode:1;
uint8_tcomputer_centric_mode:1;
uint8_t:0;
}bmCapabilities;
}cdc_desc_func_telephone_operational_modes_t;
/// \brief Telephone Call and Line State Reporting Capabilities Descriptor
/// \details The Telephone Call and Line State Reporting Capabilities functional descriptor describes the abilities of a
/// telephone device to report optional call and line states.
typedefstructTU_ATTR_PACKED
{
uint8_tbLength;///< Size of this descriptor in bytes.
uint8_tbDescriptorType;///< Descriptor Type, must be Class-Specific
uint8_tbDescriptorSubType;///< Descriptor SubType one of above CDC_FUCN_DESC_
struct{
uint32_tinterrupted_dialtone:1;///< 0 : Reports only dialtone (does not differentiate between normal and interrupted dialtone). 1 : Reports interrupted dialtone in addition to normal dialtone
uint32_tringback_busy_fastbusy:1;///< 0 : Reports only dialing state. 1 : Reports ringback, busy, and fast busy states.
uint32_tcaller_id:1;///< 0 : Does not report caller ID. 1 : Reports caller ID information.
uint32_tdual_tone_multi_freq:1;///< 0 : Cannot report dual tone multi-frequency (DTMF) digits input remotely over the telephone line. 1 : Can report DTMF digits input remotely over the telephone line.
uint32_tline_state_change:1;///< 0 : Does not support line state change notification. 1 : Does support line state change notification