USBD_IntrRx

USBD_IntrRx

Description

Receives data on interrupt OUT endpoint.

Files

usbd_core.h/usbd_ep.c

Prototype

CPU_INT32U USBD_IntrRx (CPU_INT08U dev_nbr, CPU_INT08U ep_addr, void *p_buf, CPU_INT32U buf_len, CPU_INT16U timeout_ms, USBD_ERR *p_err);

 

Arguments

dev_nbr

Device number.

ep_addr

Endpoint address.

p_buf

Pointer to destination buffer to receive data

buf_len

Number of octets to receive.

timeout_ms

Timeout in milliseconds.

p_err

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

USBD_ERR_NONE

USBD_ERR_DEV_INVALID_NBR

USBD_ERR_DEVINVALID_STATE

USBD_ERR_EP_INVALID_ADDR

USBD_ERR_EP_INVALID_STATE

USBD_ERR_EP_INVALID_TYPE

USBD_ERR_OS_TIMEOUT

USBD_ERR_OS_ABORT

USBD_ERR_OS_FAIL

Returned Value

Number of octets received, If no error(s).

0, otherwise.

Callers

Classes.

Notes / Warnings

  1. This function blocks until:

    1. All data is received, or

    2. An error occurred.

    3. Transfer does not complete in the period specified by timeout_ms.