USBD_Read
Default mainpageat91libusbdevicecoreUSBD_Read
Description Source Call Graph
USBD_Read
Reads incoming data on an USB endpoint This methods sets the transfer descriptor and activate the endpoint interrupt.
 
Syntax / parameters
char USBD_Read (unsigned char bEndpoint, void *pData, unsigned int dLength, TransferCallback fCallback, void *pArg)

Name Type Default Description
bEndpoint unsigned char
  Endpoint number.
pData void *
  Pointer to a data buffer.
dLength unsigned int
  Size of the data buffer in bytes.
fCallback TransferCallback
  Optional end-of-transfer callback function.
pArgument void *
  Optional argument to the callback function.
 
Return value char
  USBD_STATUS_SUCCESS if the read operation has been started; otherwise, the corresponding error code.
Description
Reads incoming data on an USB endpoint This methods sets the transfer descriptor and activate the endpoint interrupt.
The actual transfer is then carried out by the endpoint interrupt handler. The Read operation finishes either when the buffer is full, or a short packet (inferior to endpoint maximum size) is received.

The buffer must be kept allocated until the transfer is finished*.
 
Source
The documentation for this Member was generated from the following file:
  • USBD_UDP.c