#ifndef _WIVUSB_DLL_H
#define _WIVUSB_DLL_H
typedef unsigned short ADDRESS_MODIFIER;
#define Std_Sup_Data (ADDRESS_MODIFIER)0x3d
#define Std_Sup_Prog (ADDRESS_MODIFIER)0x3e
#define Std_NoPriv_Data (ADDRESS_MODIFIER)0x39
#define Std_NoPriv_Prog (ADDRESS_MODIFIER)0x3a
#define Short_Sup (ADDRESS_MODIFIER)0x2d
#define Short_NoPriv (ADDRESS_MODIFIER)0x29
#define Ext_Sup_Data (ADDRESS_MODIFIER)0x0d
#define Ext_Sup_Prog (ADDRESS_MODIFIER)0x0e
#define Ext_NoPriv_Data (ADDRESS_MODIFIER)0x09
#define Ext_NoPriv_Prog (ADDRESS_MODIFIER)0x0a
struct xxusb_device_typ
{
struct usb_device *usbdev;
char SerialString[7];
};
typedef struct xxusb_device_typ xxusb_device_type;
#define xxusb_register_read (*xxusb_register_read_Ptr)
#define xxusb_stack_read (*xxusb_stack_read_Ptr)
#define xxusb_stack_write (*xxusb_stack_write_Ptr)
#define xxusb_stack_execute (*xxusb_stack_execute_Ptr)
#define xxusb_longstack_execute (*xxusb_longstack_execute_Ptr)
#define xxusb_register_write (*xxusb_register_write_Ptr)
#define xxusb_usbfifo_read (*xxusb_usbfifo_read_Ptr)
#define xxusb_bulk_read (*xxusb_bulk_read_Ptr)
#define xxusb_bulk_write (*xxusb_bulk_write_Ptr)
#define xxusb_reset_toggle (*xxusb_reset_toggle_Ptr)
#define xxusb_devices_find (*xxusb_devices_find_Ptr)
#define xxusb_device_close (*xxusb_device_close_Ptr)
#define xxusb_device_open (*xxusb_device_open_Ptr)
#define xxusb_flash_program (*xxusb_flash_program_Ptr)
#define xxusb_flashblock_program (*xxusb_flashblock_program_Ptr)
#define xxusb_serial_open (*xxusb_serial_open_Ptr)
#define VME_register_write (*VME_register_write_Ptr)
#define VME_register_read (*VME_register_read_Ptr)
#define VME_LED_settings (*VME_LED_settings_Ptr)
#define VME_DGG (*VME_DGG_Ptr)
#define VME_Output_settings (*VME_Output_settings_Ptr)
#define VME_read_16 (*VME_read_16_Ptr)
#define VME_read_32 (*VME_read_32_Ptr)
#define VME_BLT_read_32 (*VME_BLT_read_32_Ptr)
#define VME_write_16 (*VME_write_16_Ptr)
#define VME_write_32 (*VME_write_32_Ptr)
short __stdcall xxusb_register_read(usb_dev_handle *hDev, short RegAddr, long *RegData);
short __stdcall xxusb_stack_read(usb_dev_handle *hDev, short StackAddr, long *StackData);
short __stdcall xxusb_stack_write(usb_dev_handle *hDev, short StackAddr, long *StackData);
short __stdcall xxusb_stack_execute(usb_dev_handle *hDev, long *StackData);
short __stdcall xxusb_longstack_execute(usb_dev_handle *hDev, void *DataBuffer, int lDataLen, int timeout);
short __stdcall xxusb_register_write(usb_dev_handle *hDev, short RegAddr, long RegData);
short __stdcall xxusb_usbfifo_read(usb_dev_handle *hDev, long *DataBuffer, short lDataLen, int timeout);
short __stdcall xxusb_bulk_read(usb_dev_handle *hDev, char *DataBuffer, short lDataLen, int timeout);
short __stdcall xxusb_bulk_write(usb_dev_handle *hDev, char *DataBuffer, short lDataLen, int timeout);
short __stdcall xxusb_reset_toggle(usb_dev_handle *hDev);
short __stdcall xxusb_devices_find(xxusb_device_type *xxusbDev);
short __stdcall xxusb_device_close(usb_dev_handle *hDev);
usb_dev_handle* __stdcall xxusb_device_open(struct usb_device *dev);
short __stdcall xxusb_flash_program(usb_dev_handle *hDev, char *config, short nsect);
short __stdcall xxusb_flashblock_program(usb_dev_handle *hDev, UCHAR *config);
usb_dev_handle* __stdcall xxusb_serial_open(char *SerialString);
short __stdcall VME_register_write(usb_dev_handle *hdev, long VME_Address, long Data);
short __stdcall VME_register_read(usb_dev_handle *hdev, long VME_Address, long *Data);
short __stdcall VME_LED_settings(usb_dev_handle *hdev, int LED, int code, int invert, int latch);
short __stdcall VME_DGG(usb_dev_handle *hdev, unsigned short channel, unsigned short trigger,unsigned short output, long delay, unsigned short gate, unsigned short invert, unsigned short latch);
short __stdcall VME_Output_settings(usb_dev_handle *hdev, int Channel, int code, int invert, int latch);
short __stdcall VME_read_16(usb_dev_handle *hdev,short Address_Modifier, long VME_Address, long *Data);
short __stdcall VME_read_32(usb_dev_handle *hdev, short Address_Modifier, long VME_Address, long *Data);
short __stdcall VME_BLT_read_32(usb_dev_handle *hdev, short Address_Modifier, int count, long VME_Address, long Data[]);
short __stdcall VME_write_16(usb_dev_handle *hdev, short Address_Modifier, long VME_Address, long Data);
short __stdcall VME_write_32(usb_dev_handle *hdev, short Address_Modifier, long VME_Address, long Data);
#endif