Subversion Repositories f9daq

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
52 f9daq 1
#ifndef _CAEN_V1718_H
2
#define _CAEN_V1718_H
3
 
4
#include <CAENVMElib.h>
5
 
6
extern int32_t udev;
7
extern int VMEerrors;
8
 
9
 
10
int VME_start (char*);
11
int VME_close (int);
12
int VME_stop (void);
13
int VME_reset (void);
14
 
15
int VME_BltRead(long Handle, unsigned long Address, void *Data,int size, CVAddressModifier AM, CVDataWidth DW);
16
int VME_read(long Handle, unsigned long Address, void *Data, CVAddressModifier AM, CVDataWidth DW);
17
int VME_write(long Handle, unsigned long Address, void *Data, CVAddressModifier AM, CVDataWidth DW);
18
int VME_appendread(unsigned long Address, void *Data, CVAddressModifier AM, CVDataWidth DW);
19
int VME_appendwrite(unsigned long Address, void *Data, CVAddressModifier AM, CVDataWidth DW);
20
 
21
int VME_MultiReadReset( void);
22
int VME_MultiWriteReset( void);
23
int VME_MultiReadExecute(long Handle,  uint32_t  *Data);
24
int VME_MultiWriteExecute(long Handle);
25
 
26
#define VME_START(NODE) VME_start((NODE))
27
#define VME_STOP() CAENVME_End(udev)
28
#define VME_RESET() CAENVME_SystemReset(udev)
29
 
30
#define VME_A16D8_R(VME,DATA) VME_read( udev, (VME), (DATA) , cvA16_U_DATA, cvD8)
31
#define VME_A16D16_R(VME,DATA) VME_read( udev, (VME), (DATA) , cvA16_U_DATA, cvD16)
32
#define VME_A16D32_R(VME,DATA) VME_read( udev, (VME), (DATA) , cvA16_U_DATA, cvD32)
33
 
34
#define VME_A24D8_R(VME,DATA) VME_read( udev, (VME), (DATA) , cvA24_U_DATA, cvD8)
35
#define VME_A24D16_R(VME,DATA) VME_read( udev, (VME), (DATA) , cvA24_U_DATA, cvD16)
36
#define VME_A24D32_R(VME,DATA) VME_read( udev, (VME), (DATA) , cvA24_U_DATA, cvD32)
37
 
38
#define VME_A32D8_R(VME,DATA) VME_read( udev, (VME), (DATA) , cvA32_U_DATA, cvD8)
39
#define VME_A32D16_R(VME,DATA) VME_read( udev, (VME), (DATA) , cvA32_U_DATA, cvD16)
40
#define VME_A32D32_R(VME,DATA) VME_read( udev, (VME), (DATA) , cvA32_U_DATA, cvD32)
41
 
42
#define VME_A16D8_W(VME,DATA) VME_write( udev, (VME), (DATA) , cvA16_U_DATA, cvD8)
43
#define VME_A16D16_W(VME,DATA) VME_write( udev, (VME), (DATA) , cvA16_U_DATA, cvD16)
44
#define VME_A16D32_W(VME,DATA) VME_write( udev, (VME), (DATA) , cvA16_U_DATA, cvD32)
45
 
46
#define VME_A24D8_W(VME,DATA) VME_write( udev, (VME), (DATA) , cvA24_U_DATA, cvD8)
47
#define VME_A24D16_W(VME,DATA) VME_write( udev, (VME), (DATA) , cvA24_U_DATA, cvD16)
48
#define VME_A24D32_W(VME,DATA) VME_write( udev, (VME), (DATA) , cvA24_U_DATA, cvD32)
49
 
50
#define VME_A32D8_W(VME,DATA) VME_write( udev, (VME), (DATA) , cvA32_U_DATA, cvD8)
51
#define VME_A32D16_W(VME,DATA) VME_write( udev, (VME), (DATA) , cvA32_U_DATA, cvD16)
52
#define VME_A32D32_W(VME,DATA) VME_write( udev, (VME), (DATA) , cvA32_U_DATA, cvD32)
53
 
54
 
55
 
56
#define VME_A16D8_MR(VME,DATA) VME_appendread(  (VME), (DATA) , cvA16_U_DATA, cvD8)
57
#define VME_A16D16_MR(VME,DATA) VME_appendread(  (VME), (DATA) , cvA16_U_DATA, cvD16)
58
#define VME_A16D32_MR(VME,DATA) VME_appendread(  (VME), (DATA) , cvA16_U_DATA, cvD32)
59
 
60
#define VME_A24D8_MR(VME,DATA) VME_appendread(  (VME), (DATA) , cvA24_U_DATA, cvD8)
61
#define VME_A24D16_MR(VME,DATA) VME_appendread(  (VME), (DATA) , cvA24_U_DATA, cvD16)
62
#define VME_A24D32_MR(VME,DATA) VME_appendread(  (VME), (DATA) , cvA24_U_DATA, cvD32)
63
 
64
#define VME_A32D8_MR(VME,DATA) VME_appendread(  (VME), (DATA) , cvA32_U_DATA, cvD8)
65
#define VME_A32D16_MR(VME,DATA) VME_appendread(  (VME), (DATA) , cvA32_U_DATA, cvD16)
66
#define VME_A32D32_MR(VME,DATA) VME_appendread(  (VME), (DATA) , cvA32_U_DATA, cvD32)
67
 
68
#define VME_A16D8_MW(VME,DATA) VME_appendwrite(  (VME), (DATA) , cvA16_U_DATA, cvD8)
69
#define VME_A16D16_MW(VME,DATA) VME_appendwrite(  (VME), (DATA) , cvA16_U_DATA, cvD16)
70
#define VME_A16D32_MW(VME,DATA) VME_appendwrite(  (VME), (DATA) , cvA16_U_DATA, cvD32)
71
 
72
#define VME_A24D8_MW(VME,DATA) VME_appendwrite( (VME), (DATA) , cvA24_U_DATA, cvD8)
73
#define VME_A24D16_MW(VME,DATA) VME_appendwrite(  (VME), (DATA) , cvA24_U_DATA, cvD16)
74
#define VME_A24D32_MW(VME,DATA) VME_appendwrite(  (VME), (DATA) , cvA24_U_DATA, cvD32)
75
 
76
#define VME_A32D8_MW(VME,DATA) VME_appendwrite( (VME), (DATA) , cvA32_U_DATA, cvD8)
77
#define VME_A32D16_MW(VME,DATA) VME_appendwrite( (VME), (DATA) , cvA32_U_DATA, cvD16)
78
#define VME_A32D32_MW(VME,DATA) VME_appendwrite(  (VME), (DATA) , cvA32_U_DATA, cvD32)
79
 
80
#define VME_MWRST() VME_MultiWriteReset()
81
#define VME_MWEXEC() VME_MultiWriteExecute(udev)
82
#define VME_MRRST() VME_MultiReadReset()
83
#define VME_MREXEC(DATA) VME_MultiReadExecute(udev, (DATA) )
84
 
85
#define VME_A32D16BLT_R(VME,DATA,SIZE) VME_BltRead( udev, (VME), (DATA) , (SIZE) , cvA32_U_BLT, cvD16)
86
#define VME_A24D16BLT_R(VME,DATA,SIZE) VME_BltRead( udev, (VME), (DATA) , (SIZE) , cvA24_U_BLT, cvD16)
87
 
88
#define VME_A32D32BLT_R(VME,DATA,SIZE) VME_BltRead( udev, (VME), (DATA) , (SIZE) , cvA32_U_BLT, cvD32)
89
#define VME_A24D32BLT_R(VME,DATA,SIZE) VME_BltRead( udev, (VME), (DATA) , (SIZE) , cvA24_U_DATA, cvD32)
90
 
91
#define VME_A24D32BLT_READ(VME,DATA,SIZE,COUNT)  CAENVME_BLTReadCycle(udev, (VME), (DATA), (SIZE), cvA24_U_BLT, cvD32 , (COUNT) )
92
 
93
 
94
#endif