CDC class types

nRF5 SDK v17.0.2

nRF52840 only: Variable types used by the CDC class implementation. More...

Data Structures

struct app_usbd_cdc_desc_header_t
Header Functional Descriptor. More...
struct app_usbd_cdc_desc_call_mgmt_t
CDC Call Management Functional Descriptor. More...
struct app_usbd_cdc_desc_acm_t
CDC ACM Functional Descriptor. More...
struct app_usbd_cdc_desc_union_t
Union Functional Descriptor. More...
struct app_usbd_cdc_desc_country_sel_t
Country Selection Functional Descriptor. More...
struct app_usbd_cdc_notify_t
Notification sent via CDC COMM endpoint. More...
struct app_usbd_cdc_line_coding_t
CDC line coding structure. More...

Macros

#define APP_USBD_CDC_COMM_CLASS 0x02
Communications Interface Class code. More...
#define APP_USBD_CDC_DATA_CLASS 0x0A
Data Class Interface code. More...

Enumerations

enum app_usbd_cdc_subclass_t {
APP_USBD_CDC_SUBCLASS_RESERVED = 0x00,
APP_USBD_CDC_SUBCLASS_DLCM = 0x01,
APP_USBD_CDC_SUBCLASS_ACM = 0x02,
APP_USBD_CDC_SUBCLASS_TCM = 0x03,
APP_USBD_CDC_SUBCLASS_MCCM = 0x04,
APP_USBD_CDC_SUBCLASS_CAPI = 0x05,
APP_USBD_CDC_SUBCLASS_ENCM = 0x06,
APP_USBD_CDC_SUBCLASS_ATM = 0x07,
APP_USBD_CDC_SUBCLASS_WHCM = 0x08,
APP_USBD_CDC_SUBCLASS_DM = 0x09,
APP_USBD_CDC_SUBCLASS_MDLM = 0x0A,
APP_USBD_CDC_SUBCLASS_OBEX = 0x0B,
APP_USBD_CDC_SUBCLASS_EEM = 0x0C,
APP_USBD_CDC_SUBCLASS_NCM = 0x0D
}
CDC subclass possible values. More...
enum app_usbd_cdc_comm_protocol_t {
APP_USBD_CDC_COMM_PROTOCOL_NONE = 0x00,
APP_USBD_CDC_COMM_PROTOCOL_AT_V250 = 0x01,
APP_USBD_CDC_COMM_PROTOCOL_AT_PCCA101 = 0x02,
APP_USBD_CDC_COMM_PROTOCOL_AT_PCCA101_ANNEXO = 0x03,
APP_USBD_CDC_COMM_PROTOCOL_AT_GSM707 = 0x04,
APP_USBD_CDC_COMM_PROTOCOL_AT_3GPP_27007 = 0x05,
APP_USBD_CDC_COMM_PROTOCOL_AT_CDMA = 0x06,
APP_USBD_CDC_COMM_PROTOCOL_EEM = 0x07,
APP_USBD_CDC_COMM_PROTOCOL_EXTERNAL = 0xFE,
APP_USBD_CDC_COMM_PROTOCOL_VENDOR = 0xFF
}
CDC protocol possible values. More...
enum app_usbd_cdc_data_protocol_t {
APP_USBD_CDC_DATA_PROTOCOL_NONE = 0x00,
APP_USBD_CDC_DATA_PROTOCOL_NTB = 0x01,
APP_USBD_CDC_DATA_PROTOCOL_ISDN_BRI = 0x30,
APP_USBD_CDC_DATA_PROTOCOL_HDLC = 0x31,
APP_USBD_CDC_DATA_PROTOCOL_TRANSPARENT = 0x32,
APP_USBD_CDC_DATA_PROTOCOL_Q921M = 0x50,
APP_USBD_CDC_DATA_PROTOCOL_Q921 = 0x51,
APP_USBD_CDC_DATA_PROTOCOL_Q921TM = 0x52,
APP_USBD_CDC_DATA_PROTOCOL_V42BIS = 0x90,
APP_USBD_CDC_DATA_PROTOCOL_Q931 = 0x91,
APP_USBD_CDC_DATA_PROTOCOL_V120 = 0x92,
APP_USBD_CDC_DATA_PROTOCOL_CAPI20 = 0x93,
APP_USBD_CDC_DATA_PROTOCOL_HOST = 0xFD,
APP_USBD_CDC_DATA_PROTOCOL_EXTERNAL = 0xFE,
APP_USBD_CDC_DATA_PROTOCOL_VENDOR = 0xFF
}
CDC data interface protocols possible values. More...
enum app_usbd_cdc_func_type_t {
APP_USBD_CDC_CS_INTERFACE = 0x24,
APP_USBD_CDC_CS_ENDPOINT = 0x25
}
CDC Functional Descriptor types. More...
enum app_usbd_cdc_func_subtype_t {
APP_USBD_CDC_SCS_HEADER = 0x00,
APP_USBD_CDC_SCS_CALL_MGMT = 0x01,
APP_USBD_CDC_SCS_ACM = 0x02,
APP_USBD_CDC_SCS_DLM = 0x03,
APP_USBD_CDC_SCS_TEL_R = 0x04,
APP_USBD_CDC_SCS_TEL_CAP = 0x05,
APP_USBD_CDC_SCS_UNION = 0x06,
APP_USBD_CDC_SCS_COUNTRY_SEL = 0x07,
APP_USBD_CDC_SCS_TEL_OM = 0x08,
APP_USBD_CDC_SCS_USB_TERM = 0x09,
APP_USBD_CDC_SCS_NCT = 0x0A,
APP_USBD_CDC_SCS_PU = 0x0B,
APP_USBD_CDC_SCS_EU = 0x0C,
APP_USBD_CDC_SCS_MCM = 0x0D,
APP_USBD_CDC_SCS_CAPI = 0x0E,
APP_USBD_CDC_SCS_ETH = 0x0F,
APP_USBD_CDC_SCS_ATM = 0x10,
APP_USBD_CDC_SCS_WHCM = 0x11,
APP_USBD_CDC_SCS_MDLM = 0x12,
APP_USBD_CDC_SCS_MDLM_DET = 0x13,
APP_USBD_CDC_SCS_DMM = 0x14,
APP_USBD_CDC_SCS_OBEX = 0x15,
APP_USBD_CDC_SCS_CS = 0x16,
APP_USBD_CDC_SCS_CS_DET = 0x17,
APP_USBD_CDC_SCS_TEL_CM = 0x18,
APP_USBD_CDC_SCS_OBEX_SI = 0x19,
APP_USBD_CDC_SCS_NCM = 0x1A
}
CDC Functional Descriptor subtypes. More...
enum app_subd_cdc_call_mgmt_cap_t {
APP_USBD_CDC_CALL_MGMT_SUPPORTED = (1 << 0),
APP_USBD_CDC_CALL_MGMT_OVER_DCI = (1 << 1)
}
Call management capabilities. More...
enum app_subd_cdc_acm_cap_t {
APP_USBD_CDC_ACM_FEATURE_REQUESTS = (1 << 0),
APP_USBD_CDC_ACM_LINE_REQUESTS = (1 << 1),
APP_USBD_CDC_ACM_SENDBREAK_REQUESTS = (1 << 2),
APP_USBD_CDC_ACM_NOTIFY_REQUESTS = (1 << 3)
}
ACM capabilities. More...
enum app_usbd_cdc_req_id_t {
APP_USBD_CDC_REQ_SEND_ENCAPSULATED_COMMAND = 0x00,
APP_USBD_CDC_REQ_GET_ENCAPSULATED_RESPONSE = 0x01,
APP_USBD_CDC_REQ_SET_COMM_FEATURE = 0x02,
APP_USBD_CDC_REQ_GET_COMM_FEATURE = 0x03,
APP_USBD_CDC_REQ_CLEAR_COMM_FEATURE = 0x04,
APP_USBD_CDC_REQ_SET_AUX_LINE_STATE = 0x10,
APP_USBD_CDC_REQ_SET_HOOK_STATE = 0x11,
APP_USBD_CDC_REQ_PULSE_SETUP = 0x12,
APP_USBD_CDC_REQ_SEND_PULSE = 0x13,
APP_USBD_CDC_REQ_SET_PULSE_TIME = 0x14,
APP_USBD_CDC_REQ_RING_AUX_JACK = 0x15,
APP_USBD_CDC_REQ_SET_LINE_CODING = 0x20,
APP_USBD_CDC_REQ_GET_LINE_CODING = 0x21,
APP_USBD_CDC_REQ_SET_CONTROL_LINE_STATE = 0x22,
APP_USBD_CDC_REQ_SEND_BREAK = 0x23,
APP_USBD_CDC_REQ_SET_RINGER_PARMS = 0x30,
APP_USBD_CDC_REQ_GET_RINGER_PARMS = 0x31,
APP_USBD_CDC_REQ_SET_OPERATION_PARMS = 0x32,
APP_USBD_CDC_REQ_GET_OPERATION_PARMS = 0x33,
APP_USBD_CDC_REQ_SET_LINE_PARMS = 0x34,
APP_USBD_CDC_REQ_GET_LINE_PARMS = 0x35,
APP_USBD_CDC_REQ_DIAL_DIGITS = 0x36
}
CDC Requests. More...
enum app_usbd_cdc_notify_id_t {
APP_USBD_CDC_NOTIF_NETWORK_CONNECTION = 0x00,
APP_USBD_CDC_NOTIF_RESPONSE_AVAILABLE = 0x01,
APP_USBD_CDC_NOTIF_CONNECTION_SPEED_CHANGE = 0x2A,
APP_USBD_CDC_NOTIF_AUX_JACK_HOOK_STATE = 0x08,
APP_USBD_CDC_NOTIF_RING_DETECT = 0x09,
APP_USBD_CDC_NOTIF_SERIAL_STATE = 0x20,
APP_USBD_CDC_NOTIF_CALL_STATE_CHANGE = 0x28,
APP_USBD_CDC_NOTIF_LINE_STATE_CHANGE = 0x29
}
CDC Notifications. More...
enum app_usbd_cdc_line_stopbit_t {
APP_USBD_CDC_LINE_STOPBIT_1 = 0,
APP_USBD_CDC_LINE_STOPBIT_1_5 = 1,
APP_USBD_CDC_LINE_STOPBIT_2 = 2
}
Possible values of app_usbd_cdc_line_coding_t::bCharFormat . More...
enum app_usbd_cdc_line_parity_t {
APP_USBD_CDC_LINE_PARITY_NONE = 0,
APP_USBD_CDC_LINE_PARITY_ODD = 1,
APP_USBD_CDC_LINE_PARITY_EVEN = 2,
APP_USBD_CDC_LINE_PARITY_MARK = 3,
APP_USBD_CDC_LINE_PARITY_SPACE = 4
}
Possible values of app_usbd_cdc_line_coding_t::bParityType . More...

Detailed Description

nRF52840 only: Variable types used by the CDC class implementation.

Macro Definition Documentation

#define APP_USBD_CDC_COMM_CLASS   0x02

Communications Interface Class code.

Used for control interface in communication class. app_usbd_descriptor_iface_t::bInterfaceClass

#define APP_USBD_CDC_DATA_CLASS   0x0A

Data Class Interface code.

Used for data interface in communication class. app_usbd_descriptor_iface_t::bInterfaceClass

Enumeration Type Documentation

ACM capabilities.

app_usbd_cdc_desc_acm_t::bmCapabilities bit.

Enumerator
APP_USBD_CDC_ACM_FEATURE_REQUESTS

ACM capability bit FEATURE_REQUESTS.

APP_USBD_CDC_ACM_LINE_REQUESTS

ACM capability bit LINE_REQUESTS.

APP_USBD_CDC_ACM_SENDBREAK_REQUESTS

ACM capability bit SENDBREAK_REQUESTS.

APP_USBD_CDC_ACM_NOTIFY_REQUESTS

ACM capability bit NOTIFY_REQUESTS.

Call management capabilities.

app_usbd_cdc_desc_call_mgmt_t::bmCapabilities bit.

Enumerator
APP_USBD_CDC_CALL_MGMT_SUPPORTED

Call management capability bit 0.

APP_USBD_CDC_CALL_MGMT_OVER_DCI

Call management capability bit 1.

CDC protocol possible values.

app_usbd_descriptor_iface_t::bInterfaceProtocol

Enumerator
APP_USBD_CDC_COMM_PROTOCOL_NONE

No class specific protocol required.

APP_USBD_CDC_COMM_PROTOCOL_AT_V250

AT Commands: V.250 etc.

APP_USBD_CDC_COMM_PROTOCOL_AT_PCCA101

AT Commands defined by PCCA-101.

APP_USBD_CDC_COMM_PROTOCOL_AT_PCCA101_ANNEXO

AT Commands defined by PCCA-101 & Annex O.

APP_USBD_CDC_COMM_PROTOCOL_AT_GSM707

AT Commands defined by GSM 07.07.

APP_USBD_CDC_COMM_PROTOCOL_AT_3GPP_27007

AT Commands defined by 3GPP 27.007.

APP_USBD_CDC_COMM_PROTOCOL_AT_CDMA

AT Commands defined by TIA for CDMA.

APP_USBD_CDC_COMM_PROTOCOL_EEM

Ethernet Emulation Model.

APP_USBD_CDC_COMM_PROTOCOL_EXTERNAL

External Protocol: Commands defined by Command Set Functional Descriptor.

APP_USBD_CDC_COMM_PROTOCOL_VENDOR

Vendor-specific.

CDC data interface protocols possible values.

Enumerator
APP_USBD_CDC_DATA_PROTOCOL_NONE

No class specific protocol required.

APP_USBD_CDC_DATA_PROTOCOL_NTB

Network Transfer Block.

APP_USBD_CDC_DATA_PROTOCOL_ISDN_BRI

Physical interface protocol for ISDN BRI.

APP_USBD_CDC_DATA_PROTOCOL_HDLC

HDLC.

APP_USBD_CDC_DATA_PROTOCOL_TRANSPARENT

Transparent.

APP_USBD_CDC_DATA_PROTOCOL_Q921M

Management protocol for Q.921 data link protocol.

APP_USBD_CDC_DATA_PROTOCOL_Q921

Data link protocol for Q.921.

APP_USBD_CDC_DATA_PROTOCOL_Q921TM

TEI-multiplexor for Q.921 data link protocol.

APP_USBD_CDC_DATA_PROTOCOL_V42BIS

Data compression procedures.

APP_USBD_CDC_DATA_PROTOCOL_Q931

Euro-ISDN protocol control.

APP_USBD_CDC_DATA_PROTOCOL_V120

V.24 rate adaptation to ISDN.

APP_USBD_CDC_DATA_PROTOCOL_CAPI20

CAPI Commands.

APP_USBD_CDC_DATA_PROTOCOL_HOST

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.
APP_USBD_CDC_DATA_PROTOCOL_EXTERNAL

The protocol(s) are described using a Protocol Unit Functional Descriptors on Communications Class Interface.

APP_USBD_CDC_DATA_PROTOCOL_VENDOR

Vendor-specific.

CDC Functional Descriptor subtypes.

Enumerator
APP_USBD_CDC_SCS_HEADER

Header Functional Descriptor, which marks the beginning of the concatenated set of functional descriptors for the interface.

APP_USBD_CDC_SCS_CALL_MGMT

Call Management Functional Descriptor.

APP_USBD_CDC_SCS_ACM

Abstract Control Management Functional Descriptor.

APP_USBD_CDC_SCS_DLM

Direct Line Management Functional Descriptor.

APP_USBD_CDC_SCS_TEL_R

Telephone Ringer Functional Descriptor.

APP_USBD_CDC_SCS_TEL_CAP

Telephone Call and Line State Reporting Capabilities Functional Descriptor.

APP_USBD_CDC_SCS_UNION

Union Functional Descriptor.

APP_USBD_CDC_SCS_COUNTRY_SEL

Country Selection Functional Descriptor.

APP_USBD_CDC_SCS_TEL_OM

Telephone Operational Modes Functional Descriptor.

APP_USBD_CDC_SCS_USB_TERM

USB Terminal Functional Descriptor.

APP_USBD_CDC_SCS_NCT

Network Channel Terminal Descriptor.

APP_USBD_CDC_SCS_PU

Protocol Unit Functional Descriptor.

APP_USBD_CDC_SCS_EU

Extension Unit Functional Descriptor.

APP_USBD_CDC_SCS_MCM

Multi-Channel Management Functional Descriptor.

APP_USBD_CDC_SCS_CAPI

CAPI Control Management Functional Descriptor.

APP_USBD_CDC_SCS_ETH

Ethernet Networking Functional Descriptor.

APP_USBD_CDC_SCS_ATM

ATM Networking Functional Descriptor.

APP_USBD_CDC_SCS_WHCM

Wireless Handset Control Model Functional Descriptor.

APP_USBD_CDC_SCS_MDLM

Mobile Direct Line Model Functional Descriptor.

APP_USBD_CDC_SCS_MDLM_DET

MDLM Detail Functional Descriptor.

APP_USBD_CDC_SCS_DMM

Device Management Model Functional Descriptor.

APP_USBD_CDC_SCS_OBEX

OBEX Functional Descriptor.

APP_USBD_CDC_SCS_CS

Command Set Functional Descriptor.

APP_USBD_CDC_SCS_CS_DET

Command Set Detail Functional Descriptor.

APP_USBD_CDC_SCS_TEL_CM

Telephone Control Model Functional Descriptor.

APP_USBD_CDC_SCS_OBEX_SI

OBEX Service Identifier Functional Descriptor.

APP_USBD_CDC_SCS_NCM

NCM Functional Descriptor.

CDC Functional Descriptor types.

Enumerator
APP_USBD_CDC_CS_INTERFACE

Class specific interface descriptor type.

APP_USBD_CDC_CS_ENDPOINT

Class specific endpoint descriptor type.

Possible values of app_usbd_cdc_line_coding_t::bParityType .

Enumerator
APP_USBD_CDC_LINE_PARITY_NONE

No parity.

APP_USBD_CDC_LINE_PARITY_ODD

Odd parity.

APP_USBD_CDC_LINE_PARITY_EVEN

Even parity.

APP_USBD_CDC_LINE_PARITY_MARK

Parity forced to 0 (mark).

APP_USBD_CDC_LINE_PARITY_SPACE

Parity forced to 1 (space).

Possible values of app_usbd_cdc_line_coding_t::bCharFormat .

Enumerator
APP_USBD_CDC_LINE_STOPBIT_1

1 stop bit.

APP_USBD_CDC_LINE_STOPBIT_1_5

1.5 stop bits.

APP_USBD_CDC_LINE_STOPBIT_2

2 stop bits.

CDC Notifications.

Enumerator
APP_USBD_CDC_NOTIF_NETWORK_CONNECTION

This notification allows the device to notify the host about network connection status.

APP_USBD_CDC_NOTIF_RESPONSE_AVAILABLE

This notification allows the device to notify the host that a response is available. This response can be retrieved with a subsequent GetEncapsulatedResponse request. _

APP_USBD_CDC_NOTIF_CONNECTION_SPEED_CHANGE

This notification allows the device to inform the host-networking driver that a change in either the up-link or the down-link bit rate of the connection has occurred.

APP_USBD_CDC_NOTIF_AUX_JACK_HOOK_STATE

(DLM) This notification indicates the loop has changed on the auxiliary phone interface of the USB device.

APP_USBD_CDC_NOTIF_RING_DETECT

(DLM) This notification indicates ring voltage on the POTS line interface of the USB device.

APP_USBD_CDC_NOTIF_SERIAL_STATE

(ACM) This notification sends asynchronous notification of UART status.

APP_USBD_CDC_NOTIF_CALL_STATE_CHANGE

(TCM) This notification identifies that a change has occurred to the state of a call on the line corresponding to the interface or union for the line.

APP_USBD_CDC_NOTIF_LINE_STATE_CHANGE

(TCM) This notification identifies that a change has occurred to the state of the line corresponding to the interface or master interface of a union sending the notification message.

CDC Requests.

Enumerator
APP_USBD_CDC_REQ_SEND_ENCAPSULATED_COMMAND

This request is used to issue a command in the format of the supported control protocol of the Communications Class interface.

APP_USBD_CDC_REQ_GET_ENCAPSULATED_RESPONSE

This request is used to request a response in the format of the supported control protocol of the Communications Class interface.

APP_USBD_CDC_REQ_SET_COMM_FEATURE

This request controls the settings for a particular communications feature of a particular target.

APP_USBD_CDC_REQ_GET_COMM_FEATURE

This request returns the current settings for the communications feature as selected.

APP_USBD_CDC_REQ_CLEAR_COMM_FEATURE

This request controls the settings for a particular communications feature of a particular target, setting the selected feature to its default state.

APP_USBD_CDC_REQ_SET_AUX_LINE_STATE

This request is used to connect or disconnect a secondary jack to POTS circuit or CODEC, depending on hook state.

APP_USBD_CDC_REQ_SET_HOOK_STATE

This request is used to set the necessary PSTN line relay code for on-hook, off-hook, and caller ID states.

APP_USBD_CDC_REQ_PULSE_SETUP

This request is used to prepare for a pulse-dialing cycle.

APP_USBD_CDC_REQ_SEND_PULSE

This request is used to generate a specified number of make/break pulse cycles.

APP_USBD_CDC_REQ_SET_PULSE_TIME

This request sets the timing of the make and break periods for pulse dialing.

APP_USBD_CDC_REQ_RING_AUX_JACK

This request is used to generate a ring signal on a secondary phone jack.

APP_USBD_CDC_REQ_SET_LINE_CODING

This request allows the host to specify typical asynchronous line-character formatting properties.

APP_USBD_CDC_REQ_GET_LINE_CODING

This request allows the host to find out the currently configured line coding.

APP_USBD_CDC_REQ_SET_CONTROL_LINE_STATE

This request generates RS-232/V.24 style control signals.

APP_USBD_CDC_REQ_SEND_BREAK

This request sends special carrier modulation that generates an RS-232 style break.

APP_USBD_CDC_REQ_SET_RINGER_PARMS

This request configures the ringer for the communications device.

APP_USBD_CDC_REQ_GET_RINGER_PARMS

This request returns the ringer capabilities of the device and the current status of the device’s ringer.

APP_USBD_CDC_REQ_SET_OPERATION_PARMS

Sets the operational mode for the device, between a simple mode, standalone mode and a host centric mode.

APP_USBD_CDC_REQ_GET_OPERATION_PARMS

This request gets the current operational mode for the device.

APP_USBD_CDC_REQ_SET_LINE_PARMS

This request is used to change the state of the line, corresponding to the interface or master interface of a union to which the command was sent.

APP_USBD_CDC_REQ_GET_LINE_PARMS

This request is used to report the state of the line that corresponds to the interface or master interface of a union to which the command was sent.

APP_USBD_CDC_REQ_DIAL_DIGITS

This request dials the DTMF digits over the specified line.

CDC subclass possible values.

app_usbd_descriptor_iface_t::bInterfaceSubClass

Enumerator
APP_USBD_CDC_SUBCLASS_RESERVED

Reserved in documentation.

APP_USBD_CDC_SUBCLASS_DLCM

Direct Line Control Model.

APP_USBD_CDC_SUBCLASS_ACM

Abstract Control Model.

APP_USBD_CDC_SUBCLASS_TCM

Telephone Control Model.

APP_USBD_CDC_SUBCLASS_MCCM

Multi-Channel Control Model.

APP_USBD_CDC_SUBCLASS_CAPI

CAPI Control Model.

APP_USBD_CDC_SUBCLASS_ENCM

Ethernet Networking Control Model.

APP_USBD_CDC_SUBCLASS_ATM

ATM Networking Control Model.

APP_USBD_CDC_SUBCLASS_WHCM

Wireless Handset Control Model.

APP_USBD_CDC_SUBCLASS_DM

Device Management.

APP_USBD_CDC_SUBCLASS_MDLM

Mobile Direct Line Model.

APP_USBD_CDC_SUBCLASS_OBEX

OBEX.

APP_USBD_CDC_SUBCLASS_EEM

Ethernet Emulation Model.

APP_USBD_CDC_SUBCLASS_NCM

Network Control Model.