:: //Check if the endpoint has received any data from the host. :: if(!USBHandleBusy(USBGenericOutHandle)) { :: // ... USB OUT packet handling code goes here ... :: } Out of interest, what happens if you move the function call out of the IF statement and assign the result to a temporary variable? USB_result = USBGenericOutHandle(); if(!USB_result){ etc etc } Perhaps the compiler is removing something that it might not otherwise. -- cdb, colin@btech-online.co.uk on 11/15/2009 Web presence: www.btech-online.co.uk Hosted by: www.1and1.co.uk/?k_id=7988359 -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist