USBHandleBusy Macro

Microchip USB Device Library

USB Device Library Help
USBHandleBusy Macro
C
#define USBHandleBusy(handle) (handle==0?0:handle->STAT.UOWN)
Description

Checks to see if the input handle is busy 

Typical Usage

//make sure that the last transfer isn't busy by checking the handle
if(!USBHandleBusy(USBGenericInHandle))
{
    //Send the data contained in the INPacket[] array out on
    //  endpoint USBGEN_EP_NUM
    USBGenericInHandle = USBGenWrite(USBGEN_EP_NUM,(BYTE*)&INPacket[0],sizeof(INPacket));
}
Preconditions

None

Parameters
Parameters 
Description 
USB_HANDLE handle 
handle of the transfer that you want to check the status of 
Return Values
Return Values 
Description 
TRUE 
The specified handle is busy 
FALSE 
The specified handle is free and available for a transfer 
Remarks

None

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