USBD_Vendor_Rd

Description

Receive data from host through Bulk OUT endpoint. This function is blocking.

Files

usbd_vendor.h / usbd_vendor.c

Prototype

CPU_INT32U  USBD_Vendor_Rd (CPU_INT08U   class_nbr,
                            void        *p_buf,
                            CPU_INT32U   buf_len,
                            CPU_INT16U   timeout,
                            USBD_ERR    *p_err);


Arguments

class_nbr

Class instance number.

p_buf

Pointer to receive buffer.

buf_len

Receive buffer length in octets.

timeout

Timeout in milliseconds.

p_err

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

USBD_ERR_NONE
USBD_ERR_NULL_PTR
USBD_ERR_INVALID_ARG
USBD_ERR_INVALID_CLASS_STATE
USBD_ERR_DEV_INVALID_NBR
USBD_ERR_EP_INVALID_NBR
USBD_ERR_DEV_INVALID_STATE
USBD_ERR_EP_INVALID_TYPE

Returned Value

Number of octets received, if NO error(s).

0, otherwise.

Callers

Application.

Notes / Warnings

None.