USB Library
USBRxOnePacket Function
Syntax
USB_HANDLE USBRxOnePacket(
    uint8_t ep, 
    uint8_t* data, 
    uint16_t len
);
Preconditions

None

Parameters
Parameters 
Description 
uint8_t ep 
The endpoint number you want to receive the data on. 
uint8_t* data 
Pointer to a user buffer where the data will go when it arrives from the host. Note: This RAM must be USB module accessible. 
uint16_t len 
The len parameter should always be set to the maximum endpoint packet size, specified in the USB descriptor for this endpoint. The host may send <= the number of bytes as the endpoint size in the endpoint descriptor. After the transaction is complete, the application firmware can call USBHandleGetLength() to determine how many bytes the host actually sent in the last transaction on this endpoint. 
Return Values
Return Values 
Description 
Returns a pointer to the BDT entry associated with the transaction. The firmware can check for completion of the transaction by using the USBHandleBusy() function, using the returned USB_HANDLE value. 
Remarks

None

MLA - USB Library Help Version : 2.16
http://www.microchip.com/mla