Description
Configure endpoint with buffer to receive data.
Files
Every device driver’s usbd_drv.c
Prototype
Arguments
p_drv
Pointer to USB device driver structure.
ep_addr
Endpoint address.
p_buf
Pointer to data buffer.
buf_len
Length of the buffer.
p_err
Pointer to variable that will receive the return error code from this function.
Returned Value
Maximum number of octets that will be received, if NO error(s).
0, otherwise.
Callers
USB device core layer.
Notes / Warnings
- Typically, the function to configure the endpoint receive transaction performs the following operations:
- Determine maximum transaction length, given the specified length of the buffer (
buf_len
). - Setup receive transaction.
- Determine maximum transaction length, given the specified length of the buffer (