Subversion Repositories f9daq

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
317 f9daq 1
#ifndef _XXUSB_DLL_H
2
#define _XXUSB_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
#define CAMAC_DGG                                  (*CAMAC_DGG_Ptr)
57
#define CAMAC_register_read                (*CAMAC_register_read_Ptr)
58
#define CAMAC_register_write       (*CAMAC_register_write_Ptr)
59
#define CAMAC_LED_settings                 (*CAMAC_LED_settings_Ptr)
60
#define CAMAC_Output_settings      (*CAMAC_Output_settings_Ptr)
61
#define CAMAC_read_LAM_mask                (*CAMAC_read_LAM_mask_Ptr)
62
#define CAMAC_write_LAM_mask       (*CAMAC_write_LAM_mask_Ptr)
63
#define CAMAC_write                                (*CAMAC_write_Ptr)
64
#define CAMAC_read                                 (*CAMAC_read_Ptr)
65
#define CAMAC_Z                                    (*CAMAC_Z_Ptr)
66
#define CAMAC_C                                    (*CAMAC_C_Ptr)
67
#define CAMAC_I                                    (*CAMAC_I_Ptr)
68
 
69
short __stdcall xxusb_register_read(usb_dev_handle *hDev, short RegAddr, long *RegData);
70
short __stdcall xxusb_stack_read(usb_dev_handle *hDev, short StackAddr, long *StackData);
71
short __stdcall xxusb_stack_write(usb_dev_handle *hDev, short StackAddr, long *StackData);
72
short __stdcall xxusb_stack_execute(usb_dev_handle *hDev, long *StackData);
73
short __stdcall xxusb_register_write(usb_dev_handle *hDev, short RegAddr, long RegData);
74
short __stdcall xxusb_usbfifo_read(usb_dev_handle *hDev, long *DataBuffer, short lDataLen, int timeout);
75
short __stdcall xxusb_bulk_read(usb_dev_handle *hDev, char *DataBuffer, short lDataLen, int timeout);
76
short __stdcall xxusb_bulk_write(usb_dev_handle *hDev, char *DataBuffer, short lDataLen, int timeout);
77
short __stdcall xxusb_reset_toggle(usb_dev_handle *hDev);
78
 
79
short __stdcall xxusb_devices_find(xxusb_device_type *xxusbDev);
80
short __stdcall xxusb_device_close(usb_dev_handle *hDev);
81
usb_dev_handle* __stdcall xxusb_device_open(struct usb_device *dev);
82
short __stdcall xxusb_flash_program(usb_dev_handle *hDev, char *config, short nsect);
83
short __stdcall xxusb_flashblock_program(usb_dev_handle *hDev, UCHAR *config);
84
usb_dev_handle* __stdcall xxusb_serial_open(char *SerialString);
85
 
86
short __stdcall VME_register_write(usb_dev_handle *hdev, long VME_Address, long Data);
87
short __stdcall VME_register_read(usb_dev_handle *hdev, long VME_Address, long *Data);
88
short __stdcall VME_LED_settings(usb_dev_handle *hdev, int LED, int code, int invert, int latch);
89
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);
90
short __stdcall VME_Output_settings(usb_dev_handle *hdev, int Channel, int code, int invert, int latch);
91
 
92
short __stdcall VME_read_16(usb_dev_handle *hdev,short Address_Modifier, long VME_Address, long *Data);
93
short __stdcall VME_read_32(usb_dev_handle *hdev, short Address_Modifier, long VME_Address, long *Data);
94
short __stdcall VME_BLT_read_32(usb_dev_handle *hdev, short Address_Modifier, int count, long VME_Address, long Data[]);
95
short __stdcall VME_write_16(usb_dev_handle *hdev, short Address_Modifier, long VME_Address, long Data);
96
short __stdcall VME_write_32(usb_dev_handle *hdev, short Address_Modifier, long VME_Address, long Data);
97
 
98
short __stdcall CAMAC_DGG(usb_dev_handle *hdev, short channel, short trigger, short output, int delay, int gate, short invert, short latch);
99
short __stdcall CAMAC_register_read(usb_dev_handle *hdev, int A, long *Data);
100
short __stdcall CAMAC_register_write(usb_dev_handle *hdev, int A, long Data);
101
short __stdcall CAMAC_LED_settings(usb_dev_handle *hdev, int LED, int code, int invert, int latch);
102
short __stdcall CAMAC_Output_settings(usb_dev_handle *hdev, int Channel, int code, int invert, int latch);
103
short __stdcall CAMAC_read_LAM_mask(usb_dev_handle *hdev, long *Data);
104
short __stdcall CAMAC_write_LAM_mask(usb_dev_handle *hdev, long Data);
105
 
106
short __stdcall CAMAC_write(usb_dev_handle *hdev, int N, int A, int F, long Data, int *Q, int *X);
107
short __stdcall CAMAC_read(usb_dev_handle *hdev, int N, int A, int F, long *Data, int *Q, int *X);
108
short __stdcall CAMAC_Z(usb_dev_handle *hdev);
109
short __stdcall CAMAC_C(usb_dev_handle *hdev);
110
short __stdcall CAMAC_I(usb_dev_handle *hdev, int inhibit);
111
 
112
#endif