USBD_CDC_CfgAdd

USBD_CDC_CfgAdd

Description

Add a CDC instance to specific USB configuration.

Files

usbd_cdc.h/usbd_cdc.c

Prototype

CPU_BOOLEAN USBD_CDC_CfgAdd (CPU_INT08U class_nbr, CPU_INT08U dev_nbr, CPU_INT08U cfg_nbr, USBD_ERR *p_err);

 

Arguments

class_nbr

CDC instance number.

dev_nbr

Device number.

cfg_nbr

Configuration number.

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

USBD_ERR_DEV_INVALID_NBR

USBD_ERR_DEV_INVALID_STATE

USBD_ERR_CFG_INVALID_NBR

USBD_ERR_IF_ALLOC

USBD_ERR_IF_ALT_ALLOC

USBD_ERR_IF_INVALID_NBR

USBD_ERR_IF_GRP_NBR_IN_USE

USBD_ERR_IF_GRP_ALLOC

USBD_ERR_EP_NONE_AVAIL

USBD_ERR_EP_ALLOC

Returned Value

DEF_OK, if CDC class instance was added to device configuration successfully.

DEF_FAIL, otherwise.

Callers

CDC Subclass drivers.

Notes / Warnings

None.