Subversion Repositories f9daq

Rev

Rev 82 | Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
61 f9daq 1
#ifndef _WIVUSB_DLL_H
2
#define _WIVUSB_DLL_H
3
 
4
typedef unsigned short ADDRESS_MODIFIER;
5
 
6
#define Std_Sup_Data        (ADDRESS_MODIFIER)0x3d
7
#define Std_Sup_Prog        (ADDRESS_MODIFIER)0x3e
8
#define Std_NoPriv_Data     (ADDRESS_MODIFIER)0x39
9
#define Std_NoPriv_Prog     (ADDRESS_MODIFIER)0x3a
10
 
11
#define Short_Sup           (ADDRESS_MODIFIER)0x2d
12
#define Short_NoPriv        (ADDRESS_MODIFIER)0x29
13
 
14
#define Ext_Sup_Data        (ADDRESS_MODIFIER)0x0d
15
#define Ext_Sup_Prog        (ADDRESS_MODIFIER)0x0e
16
#define Ext_NoPriv_Data     (ADDRESS_MODIFIER)0x09
17
#define Ext_NoPriv_Prog     (ADDRESS_MODIFIER)0x0a
18
 
19
struct xxusb_device_typ
20
{
21
  struct usb_device *usbdev;
22
  char SerialString[7];
23
};
24
 
25
 
26
typedef struct xxusb_device_typ xxusb_device_type;
27
 
28
#define  xxusb_register_read       (*xxusb_register_read_Ptr)
29
#define  xxusb_stack_read          (*xxusb_stack_read_Ptr)
30
#define  xxusb_stack_write         (*xxusb_stack_write_Ptr)
31
#define  xxusb_stack_execute       (*xxusb_stack_execute_Ptr)
32
#define  xxusb_register_write      (*xxusb_register_write_Ptr)
33
#define  xxusb_usbfifo_read        (*xxusb_usbfifo_read_Ptr)
34
#define  xxusb_bulk_read               (*xxusb_bulk_read_Ptr)
35
#define  xxusb_bulk_write          (*xxusb_bulk_write_Ptr)
36
#define  xxusb_reset_toggle        (*xxusb_reset_toggle_Ptr)
37
 
38
#define  xxusb_devices_find                (*xxusb_devices_find_Ptr)
39
#define  xxusb_device_close                (*xxusb_device_close_Ptr)
40
#define  xxusb_device_open                 (*xxusb_device_open_Ptr)
41
#define  xxusb_flash_program       (*xxusb_flash_program_Ptr)
42
#define  xxusb_flashblock_program  (*xxusb_flashblock_program_Ptr)
43
#define  xxusb_serial_open                 (*xxusb_serial_open_Ptr)
44
 
45
#define  VME_register_write                (*VME_register_write_Ptr)
46
#define  VME_register_read                 (*VME_register_read_Ptr)
47
#define  VME_LED_settings                  (*VME_LED_settings_Ptr)
48
#define  VME_DGG                                   (*VME_DGG_Ptr)
49
#define  VME_Output_settings       (*VME_Output_settings_Ptr)
50
#define  VME_read_16                       (*VME_read_16_Ptr)
51
#define  VME_read_32                       (*VME_read_32_Ptr)
52
#define  VME_BLT_read_32                   (*VME_BLT_read_32_Ptr)
53
#define  VME_write_16                      (*VME_write_16_Ptr)
54
#define  VME_write_32                      (*VME_write_32_Ptr)
55
 
56
short __stdcall xxusb_register_read(usb_dev_handle *hDev, short RegAddr, long *RegData);
57
short __stdcall xxusb_stack_read(usb_dev_handle *hDev, short StackAddr, long *StackData);
58
short __stdcall xxusb_stack_write(usb_dev_handle *hDev, short StackAddr, long *StackData);
59
short __stdcall xxusb_stack_execute(usb_dev_handle *hDev, long *StackData);
60
short __stdcall xxusb_register_write(usb_dev_handle *hDev, short RegAddr, long RegData);
61
short __stdcall xxusb_usbfifo_read(usb_dev_handle *hDev, long *DataBuffer, short lDataLen, int timeout);
62
short __stdcall xxusb_bulk_read(usb_dev_handle *hDev, char *DataBuffer, short lDataLen, int timeout);
63
short __stdcall xxusb_bulk_write(usb_dev_handle *hDev, char *DataBuffer, short lDataLen, int timeout);
64
short __stdcall xxusb_reset_toggle(usb_dev_handle *hDev);
65
 
66
short __stdcall xxusb_devices_find(xxusb_device_type *xxusbDev);
67
short __stdcall xxusb_device_close(usb_dev_handle *hDev);
68
usb_dev_handle* __stdcall xxusb_device_open(struct usb_device *dev);
69
short __stdcall xxusb_flash_program(usb_dev_handle *hDev, char *config, short nsect);
70
short __stdcall xxusb_flashblock_program(usb_dev_handle *hDev, UCHAR *config);
71
usb_dev_handle* __stdcall xxusb_serial_open(char *SerialString);
72
 
73
short __stdcall VME_register_write(usb_dev_handle *hdev, long VME_Address, long Data);
74
short __stdcall VME_register_read(usb_dev_handle *hdev, long VME_Address, long *Data);
75
short __stdcall VME_LED_settings(usb_dev_handle *hdev, int LED, int code, int invert, int latch);
76
 
77
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);
78
 
79
short __stdcall VME_Output_settings(usb_dev_handle *hdev, int Channel, int code, int invert, int latch);
80
 
81
short __stdcall VME_read_16(usb_dev_handle *hdev,short Address_Modifier, long VME_Address, long *Data);
82
short __stdcall VME_read_32(usb_dev_handle *hdev, short Address_Modifier, long VME_Address, long *Data);
83
short __stdcall VME_BLT_read_32(usb_dev_handle *hdev, short Address_Modifier, int count, long VME_Address, long Data[]);
84
short __stdcall VME_write_16(usb_dev_handle *hdev, short Address_Modifier, long VME_Address, long Data);
85
short __stdcall VME_write_32(usb_dev_handle *hdev, short Address_Modifier, long VME_Address, long Data);
86
 
87
#endif