CDC - USB communications device class

Generic USB CDC defines and helpers. More...

Detailed Description

Generic USB CDC defines and helpers.

Files

file  cdc.h
 Definition for USB CDC interfaces.
 

Data Structures

struct  usb_desc_ecm_t
 USB CDC ECM descriptor. More...
 
struct  usb_desc_acm_t
 USB CDC ACM descriptor. More...
 
struct  usb_desc_cdc_t
 Generic USB CDC descriptor. More...
 
struct  usb_desc_union_t
 USB union descriptor. More...
 
struct  usb_desc_call_mngt_t
 USB CDC call management functional descriptor. More...
 
struct  usb_desc_cdcecm_speed_t
 USB CDC ECM connection speed change notification. More...
 
struct  usb_req_cdcacm_coding_t
 USB CDC ACM line coding setup content. More...
 

Macros

#define USB_TYPE_DESCRIPTOR_CDC   0x24
 USB CDC type descriptor.
 
#define USB_CDC_VERSION_BCD   0x0120
 USB CDC version in BCD.
 

USB CDC subclass types

#define USB_CDC_SUBCLASS_NONE   0x00
 No subclass.
 
#define USB_CDC_SUBCLASS_DLCM   0x01
 Direct Line Control Model.
 
#define USB_CDC_SUBCLASS_ACM   0x02
 Abstract Control Model.
 
#define USB_CDC_SUBCLASS_TCM   0x03
 Telephone Control Model.
 
#define USB_CDC_SUBCLASS_MCCM   0x04
 Multi-Channel Control Model.
 
#define USB_CDC_SUBCLASS_CCM   0x05
 CAPI Control Mode.
 
#define USB_CDC_SUBCLASS_ENCM   0x06
 Eth Networking Control Model.
 
#define USB_CDC_SUBCLASS_ANCM   0x07
 ATM Networking Control Model.
 
#define USB_CDC_SUBCLASS_WHCM   0x08
 Wireless Handset Control Model.
 
#define USB_CDC_SUBCLASS_DM   0x09
 Device Management.
 
#define USB_CDC_SUBCLASS_MDLM   0x0A
 Mobile Direct Line Model.
 
#define USB_CDC_SUBCLASS_OBEX   0x0B
 OBEX.
 
#define USB_CDC_SUBCLASS_EEM   0x0C
 Ethernet Emulation Model.
 
#define USB_CDC_SUBCLASS_NCM   0x0D
 Network Control Model.
 

USB CDC protocol types

#define USB_CDC_PROTOCOL_NONE   0x00
 No protocol required.
 
#define USB_CDC_PROTOCOL_ITU   0x01
 AT Commands: V.250 etc.
 
#define USB_CDC_PROTOCOL_PCCA   0x02
 AT Commands defined by PCCA-101.
 
#define USB_CDC_PROTOCOL_PCCA_A   0x03
 AT Commands defined by PCCA-101 & Annex O.
 
#define USB_CDC_PROTOCOL_GSM   0x04
 AT Commands defined by GSM 07.07.
 
#define USB_CDC_PROTOCOL_3GPP   0x05
 AT Commands defined by 3GPP 27.007.
 
#define USB_CDC_PROTOCOL_CS   0x06
 AT Commands defined by TIA for CDMA.
 
#define USB_CDC_PROTOCOL_EEM   0x07
 Ethernet Emulation Model.
 
#define USB_CDC_PROTOCOL_EXT   0xFE
 External Protocol.
 
#define USB_CDC_PROTOCOL_VENDOR   0xFF
 Vendor-specific.
 

USB CDC descriptor subtypes

#define USB_CDC_DESCR_SUBTYPE_FUNCTIONAL   0x00
 functional descriptor
 
#define USB_CDC_DESCR_SUBTYPE_CALL_MGMT   0x01
 Call management descriptor.
 
#define USB_CDC_DESCR_SUBTYPE_ACM   0x02
 Abstract control management descriptor.
 
#define USB_CDC_DESCR_SUBTYPE_UNION   0x06
 Union descriptor.
 
#define USB_CDC_DESCR_SUBTYPE_ETH_NET   0x0f
 Ethernet descriptor.
 

USB CDC management requests

#define USB_CDC_MGNT_REQUEST_SET_LINE_CODING   (0x20)
 Set line character formatting properties.
 
#define USB_CDC_MGNT_REQUEST_GET_LINE_CODING   (0x21)
 Request the currently configured line coding.
 
#define USB_CDC_MGNT_REQUEST_SET_CONTROL_LINE_STATE   (0x22)
 Set the control line state.
 
#define USB_CDC_MGNT_REQUEST_SET_ETH_MULTICAST_FILTER   0x40
 Set ethernet multicast filter request.
 
#define USB_CDC_MGNT_REQUEST_SET_ETH_PM_PATTERN_FILTER   0x41
 Set ethernet power management pattern filter.
 
#define USB_CDC_MGNT_REQUEST_GET_ETH_PM_PATTERN_FILTER   0x42
 Get ethernet power management pattern filter.
 
#define USB_CDC_MGNT_REQUEST_SET_ETH_PACKET_FILTER   0x43
 Set ethernet packet filter.
 
#define USB_CDC_MGNT_REQUEST_GET_ETH_STATISTICS   0x44
 Get ethernet statistics.
 

USB CDC ACM control line state flags

#define USB_CDC_ACM_CONTROL_LINE_DTE   (0x01)
 DTE (e.g. More...
 
#define USB_CDC_ACM_CONTROL_LINE_CARRIER   (0x02)
 Activate carrier control for half duplex modems.
 

USB CDC management notifications

#define USB_CDC_MGNT_NOTIF_NETWORK_CONNECTION   0x00
 Network connection status notification.
 
#define USB_CDC_MGNT_NOTIF_RESPONSE_AVAILABLE   0x01
 Response available notification.
 
#define USB_CDC_MGNT_NOTIF_AUX_JACK_HOOK_STATE   0x08
 Hook on the auxiliary phone changed notification.
 
#define USB_CDC_MGNT_NOTIF_RING_DETECT   0x09
 Ring voltage on the POTS line interface notification.
 
#define USB_CDC_MGNT_NOTIF_SERIAL_STATE   0x20
 Asynchronous UART status notification.
 
#define USB_CDC_MGNT_NOTIF_CALL_STATE_CHANGE   0x28
 Call state change notification.
 
#define USB_CDC_MGNT_NOTIF_LINE_STATE_CHANGE   0x29
 Line state change notification.
 
#define USB_CDC_MGNT_NOTIF_CONN_SPEED_CHANGE   0x2A
 Throughput change notification.
 

USB CDC ACM line coding setup defines

#define USB_CDC_ACM_CODING_STOP_BITS_1   0
 1 stop bit

 
#define USB_CDC_ACM_CODING_STOP_BITS_1_5   1
 1.5 stop bits
 
#define USB_CDC_ACM_CODING_STOP_BITS_2   2
 2 stop bits

 
#define USB_CDC_ACM_CODING_PARITY_NONE   0
 No parity bit.
 
#define USB_CDC_ACM_CODING_PARITY_ODD   1
 Odd parity

 
#define USB_CDC_ACM_CODING_PARITY_EVEN   2
 Even parity

 
#define USB_CDC_ACM_CODING_PARITY_MARK   3
 Mark parity

 
#define USB_CDC_ACM_CODING_PARITY_SPACE   4
 Space parity

 

Macro Definition Documentation

◆ USB_CDC_ACM_CONTROL_LINE_DTE

#define USB_CDC_ACM_CONTROL_LINE_DTE   (0x01)

DTE (e.g.

a PC) is present and listening

Definition at line 142 of file cdc.h.