USBD_IsocAdd

Description

Add an isochronous endpoint to alternate setting interface.

Files

usbd_core.h/usbd_core.c

Prototype

CPU_INT08U  USBD_IsocAdd (CPU_INT08U    dev_nbr,
                          CPU_INT08U    cfg_nbr,
                          CPU_INT08U    if_nbr,
                          CPU_INT08U    if_alt_nbr,
                          CPU_BOOLEAN   dir_in,
                          CPU_INT08U    attrib,
                          CPU_INT16U    max_pkt_len,
                          CPU_INT08U    transaction_frame,
                          CPU_INT16U    interval,
                          USBD_ERR     *p_err);


Arguments

dev_nbr

Device number.

cfg_nbr

Configuration number.

if_nbr

Interface number.

if_alt_nbr

Interface alternate setting number.

dir_in

Endpoint direction.

ValueDirection
DEF_YES
IN
DEF_NO
OUT

attrib

Isochronous endpoint synchronization and usage type attributes.

max_pkt_len

Endpoint maximum packet length (see Note #1).

transaction_frame

Endpoint transactions per (micro)frame (see Note #2).

interval

Endpoint interval in frames/microframes.

p_err

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

USBD_ERR_NONE
USBD_ERR_INVALID_ARG
USBD_ERR_DEV_INVALID_NBR
USBD_ERR_CFG_INVALID_NBR
USBD_ERR_IF_INVALID_NBR
USBD_ERR_EP_NONE_AVAIL
USBD_ERR_EP_ALLOC

Returned Value

Endpoint address, if no error(s).

USBD_EP_ADDR_NONE, otherwise.

Callers

Classes.

Notes / Warnings

  1. If the max_pkt_len argument is '0', the stack will allocate the first available interrupt endpoint regardless its maximum packet size.
  2. For full-speed endpoints, transaction_frame must be set to 1 since there is no support for high-bandwidth endpoints.