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 code | Description |
|---|---|
| No class specific protocol required. |
| Network Transfer Block. |
| Physical interface protocol for ISDN BRI. |
| HDLC. |
| Transparent. |
| Management protocol for Q.921 data link protocol. |
| Data link protocol for Q.921. |
| TEI-multiplexor for Q.921 data link protocol |
| Data compression procedures. |
| Euro-ISDN protocol control. |
| V.24 rate adaptation to ISDN. |
| CAPI Commands. |
| Host based driver. |
| The protocol(s) are described using a Protocol Unit Function Communication Class Interface. |
| 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.