USBD_CDC_DataIF_Add

Description

Add a data interface class to CDC.

Files

usbd_cdc.h/usbd_cdc.c

Prototype

CPU_INT08U  USBD_CDC_DataIF_Add (CPU_INT08U    class_nbr,
                                 CPU_BOOLEAN   isoc_en,
                                 CPU_INT08U    protocol,
                                 USBD_ERR     *p_err);


Arguments

class_nbr

CDC instance number.

isoc_en

Data interface isochronous enable.

DEF_ENABLED, Data interface uses isochronous endpoints.

DEF_DISABLED, Data interface uses bulk endpoints.

protocol

Data interface protocol code:

Data interface protocol codeDescription
USBD_CDC_DATA_PROTOCOL_NONE
No class specific protocol required.
USBD_CDC_DATA_PROTOCOL_NTB
Network Transfer Block.
USBD_CDC_DATA_PROTOCOL_PHY
Physical interface protocol for ISDN BRI.
USBD_CDC_DATA_PROTOCOL_HDLC
HDLC.
USBD_CDC_DATA_PROTOCOL_TRANS
Transparent.
USBD_CDC_DATA_PROTOCOL_Q921M
Management protocol for Q.921 data link protocol.
USBD_CDC_DATA_PROTOCOL_Q921
Data link protocol for Q.921.
USBD_CDC_DATA_PROTOCOL_Q921TM
TEI-multiplexor for Q.921 data link protocol
USBD_CDC_DATA_PROTOCOL_COMPRESS
Data compression procedures.
USBD_CDC_DATA_PROTOCOL_Q9131
Euro-ISDN protocol control.
USBD_CDC_DATA_PROTOCOL_V24
V.24 rate adaptation to ISDN.
USBD_CDC_DATA_PROTOCOL_CAPI
CAPI Commands.
USBD_CDC_DATA_PROTOCOL_HOST
Host based driver.
USBD_CDC_DATA_PROTOCOL_CDC
The protocol(s) are described using a Protocol Unit Function Communication Class Interface.
USBD_CDC_DATA_PROTOCOL_VENDOR
Vendor-specific.

CDC data interface class protocol codes are defined in the Universal Serial Bus Class Definitions for Communication Devices Revision 2.1 Table 7.

p_err

Pointer to variable that will receive the return error code from this function.

USBD_ERR_NONE
USBD_ERR_ALLOC
USBD_ERR_INVALID_ARG

Returned Value

Data interface number, if no errors.

USBD_CDC_DATA_IF_NBR_NONE, otherwise.

Callers

CDC Subclass drivers.

Notes / Warnings

None.