USBD_IF_Add

USBD_IF_Add

Description

Send data on CDC data class interface.

Files

usbd_cdc.h/usbd_cdc.c

Prototype

CPU_INT08U USBD_IF_Add ( CPU_INT08U dev_nbr, CPU_INT08U cfg_nbr, USBD_CLASS_DRV *p_class_drv, void *p_class_arg, CPU_INT08U class_code, CPU_INT08U class_sub_code, CPU_INT08U class_protocol_code, const CPU_CHAR *p_name, USBD_ERR *p_err);

 

Arguments

dev_nbr

Device number.

cfg_nbr

Configuration index to add the interface.

p_class_drv

Pointer to interface driver.

p_class_arg

Pointer to interface driver argument.

class_code

Class code assigned by the USB-IF.

class_sub_code

Subclass code assigned by the USB-IF.

class_protocol_code

Protocol code assigned by the USB-IF.

p_name

Pointer to string describing the Interface.

p_err

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

USBD_ERR_NONE

USBD_ERR_INVALID_ARG

USBD_ERR_NULL_PTR

USBD_ERR_DEV_INVALID_NBR

USBD_ERR_DEV_INVALID_STATE

USBD_ERR_CFG_INVALID_NBR

USBD_ERR_IF_ALLOC

USBD_ERR_IF_ALT_ALLOC

Returned Value

Interface number, If no error(s).

USBD_IF_NBR_NONE, otherwise.

Callers

Classes.

Notes / Warnings

None.