#ifndef USBTMC_HEADER_PROTO_H
#define USBTMC_HEADER_PROTO_H
        void USB_Initialize(USB_DEVICE_INFO * udi,  BYTE * pEP0Buffer, BYTE * pEP2Buffer);
        void usbtmc_service( USB_DEVICE_INFO * udi, BOOL Tick );
        int usbtmc_parse( USB_DEVICE_INFO * udi, BOOL bCheckDataStage );
        int usbtmc_abort_bulkin_transfer ( USB_DEVICE_INFO * udi, int dwFlags );
        int usbtmc_abort_bulkout_transfer ( USB_DEVICE_INFO * udi, int dwFlags );
        int usbtmc_checkstatus_abort_bulkin (USB_DEVICE_INFO * udi );
        int usbtmc_checkstatus_abort_bulkout (USB_DEVICE_INFO * udi );
        int usbtmc_initiate_clear( USB_DEVICE_INFO * udi,  int dwFlags );
        void usbtmc_bulkout_stall_and_abort( USB_DEVICE_INFO * udi );
        void usbtmc_bulkin_stall_and_abort( USB_DEVICE_INFO * udi ); 
        void usbtmc_flush_buffer( TENDPOINT_LOG_ADDRESS apropriate_endpoint, USB_PIPE_ENTRY * pipe_entry );
        BOOL usbtmc_class_request(USB_DEVICE_INFO * udi);
        int usbtmc_checkstatus_clear( USB_DEVICE_INFO * udi );
        int usbtmc_getcapabilites ( USB_DEVICE_INFO * udi );
        int usbtmc_indicator_pulse ( USB_DEVICE_INFO * udi );
        int usbtmc_read_status_byte ( USB_DEVICE_INFO * udi );
        void usbtmc_reset_bulkmessage_status ( USB_BULKMESSAGE_STATUS * pBulkMessage );
        void usbtmc_reset_bulkrespond_status ( USB_BULKRESPOND_STATUS * pBulkRespond );
        int usbtmc_REQUEST_VENDOR_SPECIFIC_IN ( USB_DEVICE_INFO * udi );
        int usbtmc_VENDOR_SPECIFIC_OUT ( USB_DEVICE_INFO * udi );
        int usbtmc_REQUEST_DEV_DEP_MSG_IN ( USB_DEVICE_INFO * udi );
        int usbtmc_DEV_DEP_MSG_OUT ( USB_DEVICE_INFO * udi );
        int usbtmc_vendor_request ( USB_DEVICE_INFO * udi );
        int usbtmc_class_request_fault ( USB_DEVICE_INFO * udi );
        int USBTMC_StateMachine_Modified( USB_USBTMC_GPIBEMULATION_STATEMACHINE * pStateMachine);
        void usbtmc_state_machine_init( USB_USBTMC_GPIBEMULATION_STATEMACHINE * pStateMachine  );
        int usbtmc_GetErrorText( USB_DEVICE_INFO * udi, char * pText, unsigned int dwMaxSize);
        BOOL usbtmc_RaiseError( USB_DEVICE_INFO * udi, GPIB_ErrorClass_t errClass, int dwCode, const char * description, unsigned int desc_len );
        BOOL usbtmc_ErrorQueue_CreateCheckpoint( USB_DEVICE_INFO * udi );
        BOOL usbtmc_ErrorQueue_RestoreCheckpoint( USB_DEVICE_INFO * udi );
        BOOL usbtmc_RaiseError_CatDescription( USB_DEVICE_INFO * udi, const char * description, unsigned int desc_len );
        BOOL usbtmc_ClearLastError( USB_DEVICE_INFO * udi );
        int usbtmc_READ_STATUS_BYTE( USB_DEVICE_INFO * udi );
        unsigned int usbtmc_EndOfTransfer( void * vudi );
        void usbtmc_create_function_context( USB_DEVICE_INFO * udi, void * pFunction );
        void usbtmc_delete_function_context( USB_DEVICE_INFO * udi );
        void UsbtmcDevDepInit( USB_DEVICE_INFO * udi );
        void usbtmc_init_intransfer( USB_DEVICE_INFO * udi );
        void usbtmc_init_intransfer_newcmd( USB_DEVICE_INFO * udi ) ;        
        void usbtmc_GenRecieveError( USB_DEVICE_INFO * udi );
         void DevDepInit( void );
        #ifdef __SERIAL_POLL_SUPPORT__
          void usb_EP1_tx_int_func( USB_DEVICE_INFO *);
        #endif
#endif