HIDRxHandleBusy Macro

Microchip USB Device Library

USB Device Library Help
HIDRxHandleBusy Macro
C
#define HIDRxHandleBusy(handle) USBHandleBusy(handle)
Description

Retreives the status of the buffer ownership. This function will indicate if the previous transfer is complete or not. 

This function will take the input handle (pointer to a BDT entry) and will check the UOWN bit. If the UOWN bit is set then that indicates that the transfer is not complete and the USB module still owns the data memory. If the UOWN bit is clear that means that the transfer is complete and that the CPU now owns the data memory. 

For more information about the BDT, please refer to the appropriate datasheet for the device in use. 

Typical Usage:

if(!HIDRxHandleBusy(USBOutHandle))
{
    //The data is available in the buffer that was specified when the
    //  HIDRxPacket() was called.
}
Preconditions

None

Return Values
Return Values 
Description 
TRUE 
the HID handle is still busy 
FALSE 
the HID handle is not busy and is ready to receive additional data. 
Remarks

None

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