HIDTxPacket Macro

Microchip USB Device Library

USB Device Library Help
HIDTxPacket Macro
C
#define HIDTxPacket USBTxOnePacket
Description

This function sends the specified data out the specified endpoint and returns a handle to the transfer information. 

Typical Usage:

//make sure that the last transfer isn't busy by checking the handle
if(!HIDTxHandleBusy(USBInHandle))
{
    //Send the data contained in the ToSendDataBuffer[] array out on
    //  endpoint HID_EP
    USBInHandle = HIDTxPacket(HID_EP,(BYTE*)&ToSendDataBuffer[0],sizeof(ToSendDataBuffer));
}
Preconditions

None

Parameters
Parameters 
Description 
ep 
the endpoint you want to send the data out of 
data 
pointer to the data that you wish to send 
len 
the length of the data that you wish to send 
Return Values
Return Values 
Description 
a handle for the transfer. This information should be kept to track the status of the transfer 
Remarks

None

Microchip MCHPFSUSB v2.3 - Sept 20, 2008
Copyright © 2008 Microchip Technology, Inc.  All rights reserved.